Developer docs

Errors & OpenAPI

Errors use a stable envelope. Always log meta.requestId (and the PeerPay-Request-Id response header) so support can reconcile calls with PeerPay audit trails.

Error envelope

Example error
{
  "error": {
    "code": "duplicate_transaction",
    "message": "This transaction has already been used for a deposit.",
    "type": "conflict_error",
    "retryable": false
  },
  "meta": {
    "requestId": "req_9f3a2c1b",
    "apiVersion": "2026-06-01"
  }
}
  • code — stable machine code
  • type — category such as request_error, conflict_error, provider_error
  • retryable — whether a later retry may succeed
  • details — optional structured context

Request Validation

  • JSON request objects reject unknown keys.
  • Deposit amounts accept a decimal string or JSON number with at most 2 decimal places; withdrawal amounts are decimal strings only.
  • metadata is supported on withdrawal creation; deposit creation currently returns metadata but does not accept it as input.
  • created_from and created_to must be ISO 8601 date-time values. Treat cursors as opaque and reuse them unchanged.
  • Optional response fields such as checkout_url, assignment, destination, reference, and verification details may be absent until their lifecycle stage exists.

Common error codes

CodeHTTPTypeRetry
invalid_request400request_errorno
invalid_api_version400request_errorno
validation_failed422request_errorno
authentication_required401authentication_errorno
invalid_api_key401authentication_errorno
forbidden403authorization_errorno
resource_not_found404not_found_errorno
idempotency_conflict409conflict_errorno
duplicate_transaction409conflict_errorno
checkout_expired410conflict_errorno
rate_limited429rate_limit_erroryes
order_routing_unavailable503availability_erroryes
provider_unavailable503provider_erroryes
provider_timeout504provider_erroryes
internal_server_error500server_erroryes

Also watch for 429 rate_limited with RateLimit-* / Retry-After headers, and 413 request_body_too_large when the body exceeds 1 MB.

OpenAPI contract

Versioned OpenAPI 3.1 document (unauthenticated):

OpenAPI URL
GET https://api.peerpayment.org/openapi/public-api.json
  • API version: 2026-06-01
  • Paths: capabilities; create/list/get deposits + events; create/list/get withdrawals + events
  • Documents bearer auth, idempotency, error envelopes, and polling filters