Skip to main content

API Reference

Call the Peer Pay API from your backend. The SDK wraps order creation, payouts and merchant reads; these pages document the HTTP endpoints behind them and the ones it doesn't wrap.

Base URL​

https://api.pay.peer.xyz

Every path on these pages is relative to that host and lives under /api/v1.

Authentication​

Send your API key in the X-API-Key header. The key is under Settings, Developer in the merchant dashboard; see API keys and webhooks for rotation.

curl https://api.pay.peer.xyz/api/v1/merchants/me/orders \
-H "X-API-Key: $ZKPAY_API_KEY"
Server-side only

An API key reads and creates orders and payouts for your whole account. Send it only from a trusted backend, never from browser or mobile code.

Sandbox and live are separate accounts with separate keys. A sandbox key sees only sandbox data, and a live key only live data. A missing or unknown key returns 401 with the message Missing API key or Invalid API key.

Get an order by id takes no key: the order id is the credential.

IP allowlist​

Owners can restrict the API key to specific source addresses under Settings, Developer, API key IP allowlist. Entries are public IPv4 or IPv6 addresses or CIDR blocks (IPv4 prefix 8–32, IPv6 prefix 32–128), up to 50. A bare address is stored as /32 or /128. Live and sandbox keys have separate lists, and an empty list turns the allowlist off. Dashboard sessions and the Peer Pay Telegram bot are not affected.

The API accepts IPv6 as well as IPv4, and the allowlist sees the address your server connects from. An entry only matches addresses of its own family, so an IPv4 entry never matches a call made over IPv6. If your servers' network has IPv6, add their IPv6 addresses or your /64 too, or make your HTTP client connect over IPv4.

A request from an address outside the list gets 403:

{
"success": false,
"message": "IP address 203.0.114.7 is not in this merchant's API key IP allowlist",
"responseObject": { "ip": "203.0.114.7", "reason": "IP_NOT_ALLOWED" },
"statusCode": 403,
"errorCode": "IP_NOT_ALLOWED"
}

responseObject.ip is the address to add if the caller is yours. reason is CLIENT_IP_UNRESOLVED instead when the API could not determine the caller's address.

Response envelope​

Every response, success or failure, is a JSON object with the same four fields:

{
"success": true,
"message": "Merchant orders retrieved",
"responseObject": { "...": "..." },
"statusCode": 200
}
FieldTypeDescription
successbooleantrue for a 2xx response
messagestringFor logs. Don't match on it
responseObjectobject | nullThe payload. null on most failures
statusCodenumberMirrors the HTTP status

The examples on these pages use this type:

type Envelope<T> = { success: boolean; message: string; responseObject: T | null; statusCode: number };

A 400 from query or body validation carries the details in responseObject:

{
"success": false,
"message": "Invalid request",
"responseObject": {
"formErrors": [],
"fieldErrors": { "limit": ["Number must be less than or equal to 100"] }
},
"statusCode": 400
}

Some failures also carry a top-level errorCode to branch on. Order creation codes, such as AMOUNT_ABOVE_MAX for an order above the order maximum, are listed under createCheckout errors. The same maximum applies to each customer payment, fees included: when customer-paid fees push a bank or app payment above it, the customer can't start that payment (INTENT_ABOVE_MAX).

Common errors​

The endpoint pages cover additional errors specific to each operation.

StatusCause
400A path parameter, query parameter, or body failed validation. Details in responseObject.fieldErrors
401Missing or invalid API key. Never returned by the keyless order read
403IP_NOT_ALLOWED if the IP allowlist refused the request, MERCHANT_SUSPENDED if the API key belongs to a suspended account, or MERCHANT_IDENTITY_REQUIRED / MERCHANT_IDENTITY_OVERDUE if a live key's owner has not verified their identity and the endpoint starts live money movement
429Rate limit exceeded

Pagination​

The order, payment and payout lists take two query parameters and report the total. List payments for an order returns every row and takes neither.

ParameterDefaultMaxDescription
page1none1-based page number
limit20100Rows per page. Above 100 returns 400; it is not clamped

The payload carries the rows, total matching rows across all pages, and the page and limit applied. Rows are newest first.

Dates and amounts​

Timestamps are ISO 8601 strings in UTC, for example 2026-09-03T10:15:42.318Z. Amounts are decimal strings, never floats, such as "25", "12.5" or "23.14". The number of decimals varies, so parse amounts instead of comparing strings. Chain ids on orders are decimal strings too, so Base is "8453"; payouts use numbers (8453).

Rate limits​

The API allows 1,200 requests per minute per source IP across all endpoints. An IPv6 caller's whole /64 counts as one source. Past that it returns 429 with the message Too many requests. Responses carry these headers:

HeaderValue
x-retry-afterSeconds until you may retry
x-rate-limit-remainingRequests left in the current window
x-rate-limiter-resets-atISO 8601 time the window resets

For this limit, use x-retry-after on a 429 response. Remediation endpoints add a per-merchant limit with the same 429 shape, and checkout grants have an hourly limit per merchant.

Use webhooks to learn that something changed, and these endpoints to reconcile.

Endpoints​

EndpointAuthDocumented at
POST /api/v1/ordersAPI keycreateCheckout, open-amount orders
GET /api/v1/merchants/me/ordersAPI keyList orders
GET /api/v1/orders/{orderId}NoneGet an order by id
GET /api/v1/merchants/me/paymentsAPI keyList payments
GET /api/v1/merchants/me/orders/{orderId}/paymentsAPI keyList payments for an order
GET /api/v1/merchants/me/payouts/summaryAPI keyDeferred payout state
GET /api/v1/merchants/me/invoiceAPI keyGet an invoice
POST /api/v1/merchants/me/orders/{orderId}/payments/{paymentId}/recreateAPI keyRecreate
POST /api/v1/merchants/me/orders/{orderId}/payments/{paymentId}/extendAPI keyExtend
POST /api/v1/merchants/me/orders/{orderId}/payments/{paymentId}/fulfill-sarAPI keyFulfill from a transaction id
GET /api/v1/merchants/me/orders/{orderId}/actions/{actionId}API keyPoll an action
POST /api/v1/payoutsAPI keyCreate a payout
GET /api/v1/payoutsAPI keyList payouts
GET /api/v1/payouts/{id}API keyGet a payout
POST /api/v1/payouts/{id}/cancelAPI keyCancel a payout
POST /api/v1/checkout-grantsAPI keyCreate a grant
GET /api/v1/merchants/meAPI keygetMerchant
GET /api/v1/merchants/me/tier-usageAPI keyWatching your usage
POST /api/v1/merchants/me/quotes/availabilityAPI keycheckQuoteAvailability
POST, GET /api/v1/webhooks; PATCH, DELETE /api/v1/webhooks/{webhookId}API keyWebhooks
POST /api/v1/webhooks/{webhookId}/test, GET /api/v1/webhooks/{webhookId}/deliveriesAPI keyManage webhooks
POST /api/v1/sandbox/test-orderSandbox keyLet a coding agent integrate
GET /api/v1/integration/statusAPI keyLet a coding agent integrate
POST /api/v1/integration/setup-runs, POST /api/v1/integration/setup-runs/{runId}/eventsAPI keypeer-pay-cli progress

Cancelling an order and the merchant-scoped single-order read need a dashboard session; see what you can't do with an API key.