Orders
Create an order
Pre-flight the recipient, quote the price, and create an order in awaiting_payment. The response payment block tells you exactly how much to send, to which address, and with which memo (the order id). An ineligible recipient returns 422 recipient_ineligible and creates no order (you are never charged for an undeliverable recipient). If eligibility cannot be verified right now (a transient upstream blip), the call returns a retryable 503 and creates no order — retry shortly with the same Idempotency-Key.
post/v1/orders
Headers
Idempotency-Keystring required
A unique key for this create attempt. Retrying with the same key and an identical body returns the original order; a different body is a 409.
Request body
Example request
{
"recipient": {
"username": "durov"
}
}Response
Idempotent replay — the same key + body returns the original order.
Example response
{
"quantity": 500,
"payment": {
"chain": "ton",
"amount": "5.757",
"fee": {
"subtotal": "13.18",
"processing_fee": "0.92",
"total": "14.1",
"description": "1% swap + 0.5 GRAM gas"
}
}
}