Skip to main content

Orders

You create an order with createCheckout. This page covers reading it back:

EndpointAuthUse it when
GET /api/v1/merchants/me/ordersAPI keyYou want one order by id, or a filtered page of orders
GET /api/v1/orders/{orderId}NoneYou hold an order id and want the hosted checkout view, including the customer's current payment attempt

Both return the CheckoutOrder shape. Webhooks tell you that an order changed; use these reads to reconcile or answer a support question.

Amount mode​

Every order carries amountMode. Read it before the amounts:

amountModeCreated withAmounts
FIXEDrequestedUsdcAmount, or requestedFiatAmount with requestedFiatCurrencyrequestedUsdcAmount and remainingUsdcAmount are always set
OPENopenAmountrequestedUsdcAmount and remainingUsdcAmount are null until the customer starts a payment. The order also carries openAmount (your currency, minAmount, maxAmount and presets) and amountVersion, the number of times the amount was saved

See open-amount orders.

Order status​

status is CREATED, PARTIALLY_FULFILLED, FULFILLED, or CANCELLED. It tracks how much of the order's value has settled, not where the customer is in the payment flow. See order status for what moves it and which webhook fires.

An order never expires unless you created it with expiresInMinutes; then expiresAt is set, and an order with no payment attempt is cancelled once it passes. When the customer's payment window closes, the payment attempt expires and the order stays CREATED, so a late settlement can still fulfil it, including after expiresAt. Where the customer is right now lives on the payment: the hosted read returns it as currentPayment, and the Payments API lists every attempt.

Chargebacks and refunds never move status; they sit in chargebackStatus, chargebacks and the refund* fields. See chargeback status.

List orders​

GET /api/v1/merchants/me/orders
X-API-Key: <your key>

Returns your orders, newest first. Pass a full order id in orderId to fetch one order.

Query parameters​

ParameterTypeDescription
orderIdstringCase-insensitive substring match on the order id, up to 128 characters. A full id matches one order. Ignored when search is set
statusCheckoutOrderStatusCREATED, PARTIALLY_FULFILLED, FULFILLED, or CANCELLED. Ignored when displayStatus is set
displayStatusstringACTIVE, EXPIRED or CREATED; see display status
chargebackStatusOrderChargebackStatusNONE, PARTIALLY_CHARGEBACKED, or CHARGEBACKED
searchstringFree-text search, 3 to 128 characters. Shorter values are ignored. See search

page and limit follow the shared pagination rules.

Display status​

displayStatus slices CREATED orders by payment activity:

ValueMatches a CREATED order that
ACTIVEHas a payment attempt in progress
EXPIREDHas at least one expired attempt and none in progress
CREATEDHas no attempt in progress and none expired: the customer never picked a payment method, or every attempt was cancelled or failed

search is a case-insensitive substring match across:

  • the order id, the notes you attached at creation, and the order's metadata
  • each payment's rail, by identifier or display name (venmo or Venmo), id, payTo, railIdentifier, railTransactionId (the payment app's transaction id) and fulfillTransaction (the settlement transaction hash)

crypto, zec or zcash match every order with a crypto payment attempt. A plain non-negative decimal, optionally prefixed with $, also matches requestedUsdcAmount or the requested fiat amount exactly, so $20 and 20.00 both match 20 (20 alone is too short). % and _ match literally.

Put your own order reference in notes, as the recommended backend pattern does, to find orders by it.

Response​

responseObject is a page:

type MerchantOrderList = {
orders: MerchantOrderListItem[];
total: number;
page: number;
limit: number;
};

type MerchantOrderListItem = CheckoutOrder & {
hasActivePayment: boolean;
hasExpiredPayment: boolean;
paymentSelectedRail: string | null;
netSettledUsdcAmount: string | null;
settledPaymentRails: string[];
settledPaymentCount: number;
fromPreviousOwner: boolean;
};

The extra fields are derived from the order's payments and appear only on list rows:

FieldDescription
hasActivePaymentA payment attempt is in progress
hasExpiredPaymentAt least one attempt expired
paymentSelectedRailRail of the newest attempt in progress, else of the newest expired one, else null
netSettledUsdcAmountUSDC credited to you across settled payments, after fees. Chargebacks and refunds are not subtracted. null when nothing settled or a settled payment has no recorded amount
settledPaymentRailsDistinct rails of the settled payments, oldest payment first. Empty when nothing settled
settledPaymentCountNumber of settled payments, counting repeats of the same rail
fromPreviousOwnerThe order was created before your account changed owners. It takes no new payments and can't be refunded from this account

bridgeInfo on a list row describes the newest settled payment that has a conversion to another chain or token, or is null. The hosted read uses the current payment instead.

Example​

curl "https://api.pay.peer.xyz/api/v1/merchants/me/orders?orderId=cmf5k2x9d0001abcd1234efgh" \
-H "X-API-Key: $ZKPAY_API_KEY"

Envelope<T> is the shared response envelope.

async function getOrder(orderId: string) {
const url = new URL('https://api.pay.peer.xyz/api/v1/merchants/me/orders');
url.searchParams.set('orderId', orderId);
url.searchParams.set('limit', '1');

const response = await fetch(url, {
headers: { 'X-API-Key': process.env.ZKPAY_API_KEY! },
signal: AbortSignal.timeout(8_000),
});
const body = (await response.json()) as Envelope<MerchantOrderList>;

if (!body.success || body.responseObject === null) {
throw new Error(`${body.statusCode}: ${body.message}`);
}
return body.responseObject.orders[0] ?? null;
}

Every open order a customer is paying right now:

curl "https://api.pay.peer.xyz/api/v1/merchants/me/orders?displayStatus=ACTIVE&limit=100" \
-H "X-API-Key: $ZKPAY_API_KEY"

Errors​

Only the common errors. An orderId that matches nothing returns 200 with an empty orders array and total: 0.

Get an order by id​

GET /api/v1/orders/{orderId}

Returns what the hosted checkout page shows: the order, your branding, and the customer's current payment attempt. No API key is needed and one sent along is ignored; the order id is the credential. Order ids are random, so treat them like any capability URL and don't publish them.

Use it when all you hold is an order id, for example from a checkout.closed event or a success redirect, and you want to know whether the customer paid.

Response​

type HostedOrder = {
order: CheckoutOrder;
merchant: CheckoutMerchant;
currentPayment: CheckoutPayment | null;
paymentCreationPaused: boolean;
};

type CheckoutMerchant = {
id: string;
name: string;
logoUrl: string | null;
environment: 'LIVE' | 'SANDBOX';
disableBranding: boolean;
checkoutTheme: unknown | null;
defaultPaymentCurrency: string | null;
verified: boolean;
};
FieldDescription
orderThe CheckoutOrder, plus four fields only this read returns: requestedFiat, bridgeInfo, applePayChargeUsdcAmount and zellePaymentMethodIds. See below
merchantWhat checkout shows about you. environment tells you whether this is a sandbox order
currentPaymentThe customer's newest CheckoutPayment, or null if they never picked a payment method. If the newest attempt was cancelled, expired or failed, an older fiat attempt that is still open takes its place; after a closed fiat attempt with none open, the newest settled attempt does. A funded Zcash deposit always takes priority. paymentAmount is "0" until the attempt settles
paymentCreationPausedtrue while Peer has paused new customer payments. The customer can't start a payment; checkout and POST /api/v1/sandbox/test-order return 503 PAYMENTS_PAUSED. Order creation and payments already in progress are unaffected

Hosted-only order fields:

FieldDescription
requestedFiatThe fiat price you asked for, { amount, currency }. Set only on a fiat-priced order that has not been resized or partly paid; on an open-amount order, the saved amount in the currency the customer typed. Otherwise null
bridgeInfoConversion of the current payment to your payout chain or token, or null
applePayChargeUsdcAmountUSDC the customer would send in the Peer window to pay the rest of the order, including their share of fees. null when Peer (Apple Pay or Balance) is off for the order, the amount can't be priced, or an open-amount order has no amount yet
zellePaymentMethodIdsThe Zelle banks the order accepts (zelle-bofa, zelle-capitalone, zelle-chase, zelle-citi). For a Seller Automated Release only order, this is [] when email quotes are disabled, or ["zelle-bofa","zelle-capitalone"] when enabled. Scan to Pay uses the same two banks when email quotes are enabled for the order

An open-amount order also carries amountLock (null while the customer can change the amount) and, inside openAmount, effectiveMin and effectiveMax (the allowed range in openAmount.currency; null while the amount is locked, once the order is fulfilled or cancelled, or while no exchange rate is available) and savedInput (the amount the customer saved, in the currency they typed).

When the latest settlement transaction for currentPayment failed onchain, the payment carries errorCode: "FULFILL_INTENT_FAILED" and a readable errorMessage. Every attempt, not only the current one, is in the Payments API.

Example​

curl https://api.pay.peer.xyz/api/v1/orders/cmf5k2x9d0001abcd1234efgh
{
"success": true,
"message": "Order retrieved",
"responseObject": {
"order": {
"id": "cmf5k2x9d0001abcd1234efgh",
"checkoutGrantId": null,
"status": "CREATED",
"amountMode": "FIXED",
"requestedUsdcAmount": "25",
"remainingUsdcAmount": "25",
"applePayChargeUsdcAmount": "26.31579",
"zellePaymentMethodIds": ["zelle-bofa", "zelle-capitalone", "zelle-chase", "zelle-citi"],
"requestedFiat": null,
"notes": { "merchantOrderId": "order_12345" },
"createdAt": "2026-09-03T10:15:42.318Z",
"...": "..."
},
"merchant": {
"id": "cmf1abc...",
"name": "Example Store",
"environment": "LIVE",
"...": "..."
},
"currentPayment": {
"id": "cmf5k3...",
"status": "CREATED",
"rail": "venmo",
"paymentAmount": "0",
"currency": "USD",
"quoteExpiresAt": "2026-09-03T11:15:42.318Z",
"...": "..."
},
"paymentCreationPaused": false
},
"statusCode": 200
}

An open-amount order that no customer has started paying has currentPayment: null and an order like this:

{
"id": "cmf5k2x9d0001abcd1234efgh",
"status": "CREATED",
"amountMode": "OPEN",
"requestedUsdcAmount": null,
"remainingUsdcAmount": null,
"amountVersion": 0,
"openAmount": {
"currency": "USD",
"minAmount": "10.00",
"maxAmount": "2000.00",
"presets": ["25.00", "50.00", "100.00"],
"effectiveMin": "10.00",
"effectiveMax": "2000.00",
"savedInput": null
},
"amountLock": null,
"applePayChargeUsdcAmount": null,
"requestedFiat": null,
"...": "..."
}

Errors​

StatusCause
404No order with that id

The common errors also apply, except 401.

What you cannot do with an API key​

  • Cancel an order. Cancel from the dashboard's order list. Only a CREATED order with no payment attempts can be cancelled. An order you never cancel stays CREATED; it costs nothing and reserves no liquidity until a customer starts paying.
  • Read GET /api/v1/merchants/me/orders/{orderId}. This route needs a dashboard session. Use the orderId filter on list orders instead.