Skip to main content
Create the order after the customer approves the amount and account details and preflight returns can_create_order: true. The API returns the order number and initial status.
HTTP request excerpt
The key needs the public-api:exchange:orders:create scope. The order belongs to the key owner. Generate an HMAC v2 signature for every request. Request and response reference

1. Prepare the body and save a retry key

Send one field from each pair of aliases. If you send both, their values must match. You can omit outcome_amount and its alias receive_amount. The exchange calculates the final amount to receive. This example uses files from preflight. Store a separate body and key for each new order. Adapt the example to your test installation and account details.
Prepare
The method accepts an optional Idempotency-Key. For a safe retry after a lost response, generate a key once for this order and save it alongside the request body.
Key for a new order

2. Send the request

Request
201 Created · response excerpt
Save tracking_id for order requests and public_id to display the order number. The example order is awaiting payment. Read the actual status and available actions from the API, then get the payment instructions. Order creation recalculates the amounts and checks the current limits and reserve. If result.order.amounts differs from the quote, show the customer the current order terms before payment. Use the amount and account details returned in the payment instructions.

When the customer selects a city

Read city_id from the id_<ID> key in result.operation.attributes.city_detail for the chosen route. If cash handover is enabled for the city, include the agreed handover object in preflight as well.

Split the amount across receiving accounts

When result.operation.attributes.sell_currency.attributes.extra_out.enabled is true in the route details, read min_trigger_amount, min_payout_amount, and max_fields. Send extra_out in preflight and order creation in place of one receiving account.
Order body excerpt
Substitute account details for the selected currency and the amount for each share. The API truncates each share to that currency’s precision. During creation, it checks that the allocation total equals the actual amount to receive. Adjust the shares if the rate or fee changes that amount. An AML check required for the receiving account rejects the split. Use one account and run preflight again.

Retries and errors

If the original request created the order, a retry with the same key and body returns the saved answer even after the snapshot expires. If the API explicitly rejected the original request because of its snapshot, request a fresh quote and prepare a corrected request.

Get payment instructions

Payment details, payment state, and available actions.

Retry without a duplicate

Key format, replay behavior, and errors.