order-1042 with your order’s tracking_id or public_id and https://your-exchange with the exchanger’s origin. The request.mjs script is in the quickstart. For the HTTP example, calculate an HMAC v2 signature.
1. Get payment instructions
Reading instructions requirespublic-api:exchange:payment-instructions:read. Operation reference
Request with signature placeholders
result.payment_instructions. Read and preparation responses include the private and no-store directives in Cache-Control.
200 OK · response excerpt
Start preparation when available
Checkallowed_actions.prepare_payment with GET /api/v3/private/exchange/orders/{order}/actions. Before sending the request, check for allowed: true and authorized: true. Preparation requires public-api:exchange:payment-instructions:write. Operation reference
Prepare with an empty body
details: null even when it returns status: "ready". Send another GET for the payment details. If you receive 503 with Retry-After, wait for the indicated interval. Reuse the key and sign the retry again. Retry rules
Attach a receipt if the route accepts it
Attach a new receipt before confirming payment. The order must still be inpending_payment and the route’s result.capabilities.files.receipts_allowed must be true. An archived order or an expired applicable deadline blocks a new upload.
Send one file in the multipart file field with the public-api:files:write scope. Sign the SHA-256 digest of the file contents. Include an Idempotency-Key for safe retries. Operation reference
SIGNATURE contains the hexadecimal signature without its prefix, and RECEIPT_KEY matches the key in the signed string. An HTTP 201 response returns result.receipt with id, mime_type, size_bytes, and created_at. Retry from the same integration with the original path, key, and file, and sign the new request. The API returns the same receipt with the Idempotency-Replayed: true header. If the receipt is deleted or ownership changes, the retry returns 404 and the key stays associated with the operation.
To list receipts, send GET /api/v3/private/exchange/orders/{order}/receipts with public-api:files:read. Entries in result.receipts are sorted by ascending ID. Set limit from 1 to 100, with a default of 25. Pass result.next_after_id as after_id to read the next page. A value of null marks the end of the list.
2. Record the customer’s decision
Readresult.actions.allowed_actions. allowed reflects the order state, while authorized reflects the key’s permissions. To read actions, the key needs any one of public-api:exchange:orders:actions:read, public-api:orders:detail:read, or public-api:orders:read.
Mark the order as paid
result.order. Paying and waiting for payment details can have separate deadlines in result.actions.payment_timing and result.actions.request_payment_timing. If the action returns 422, reload actions and check the deadline. Confirmation operation reference
3. Check whether funds arrived
Read payment progress
public-api:exchange:payment-instructions:read. In this example, the transaction has been found and is awaiting confirmation. The excerpt shows fields from result.payment. Operation reference
200 OK · response excerpt
- For confirmed receipt of funds, use
provider_confirmed: trueand theprovider_confirmed_attimestamp.type: "paid"records the customer’s report. - For
provider_confirmed: false, usecurrent_statusto display the current step. An older order may have received funds before confirmation was recorded by the API. timelineshows the steps from recent verification records. When there are more than 50 records,timeline_truncatedistrue.
GET /api/v3/private/exchange/orders/{order}/status-summary. Read the saved state in result.status.key and use result.status.is_final to identify a final state. The key needs either public-api:orders:detail:read or public-api:orders:read. Get the full order from GET /api/v3/private/exchange/orders/{order}. The /status operation also returns the full order in result.order. Status summary operation reference
The order.payment_received event reports confirmed receipt of funds. After order.status_changed, read the order status again. Webhook events and delivery
Treat the exchange as complete once the order reaches completed. For a late or disputed transfer, refresh the order and payment information, then send the details to the exchanger for reconciliation. Statuses, deadlines, and payment exceptions
Next steps
Files and verification
Read the order requirements and submit verification data.
Payment events
Update the order after payment is confirmed.
Prompt for your coding agent
Create an order and reconcile payment
Create an order and reconcile payment