Loading the API documentation
No notifications.
Language
English
No other language is available yet.
Loading the API documentation
/v1/buy/ordersPlace an order from a quote
The quote's message signed by the wallet (EIP-191 personal_sign) proves the address. A quote buys once and only before it expires (quote_unusable, 409). The daily limit per address is limit_exceeded (422). Orders of one address are placed one at a time; when another order of the same address holds that turn for over a second the answer is rate_limited (429, Retry-After: 1). The answer carries the payment instructions (a QR string or a virtual account number).
No parameters.
| Name | Required | Type and limits | Description |
|---|---|---|---|
quoteId | Yes | string (uuid) | None |
paymentMethod | Yes | string, one of qris, va | None |
signature | Yes | string | 65 bytes of hex, 0x prefixed |
| Status | Meaning | Body |
|---|---|---|
| 201 | Created | BuyOrderResponse |
| 403 | The signature does not match the quote's address | Error |
| 409 | Quote unknown, used or expired ( | Error |
| 422 | Daily limit ( | Error |
| 429 | Rate limit hit (code | Error |
| 503 | The payment gateway is not available | Error |
curl -s -X POST 'https://exchange.zethareum.com/v1/buy/orders' \
-H 'Content-Type: application/json' \
--data '{"quoteId":"<quoteId>","paymentMethod":"qris","signature":"<signature>"}'