Place an order paid from the wallet
Requires orders:write. Spends real money from the prepaid wallet. All or nothing: the order, the wallet debit and the brief are written in one transaction, and nothing is bought if any outlet is unavailable (422 items_unavailable), the price changed (409 price_changed) or the balance is too low (402 insufficient_funds). Idempotency: the same Idempotency-Key with the same body replays the stored response with the header Idempotent-Replayed: true; the same key with a different body is 422 idempotency_key_reused; a concurrent duplicate with the same body is 409 idempotency_in_progress (until it finishes, at most 15 minutes; retry with the same key). A request refused before an order is paid releases the key. If anything fails after the order was paid, the key is kept: the response is 201 with the order, or 500 internal_error with order_may_exist true, and you retry with the SAME key to get the order back. Keys are kept for 24 hours. Always quote first and pass the quoted total as expected_total_usd.
Request
- Base URL: https://essentras.com
- URL: https://essentras.com/api/agent/v1/orders
- Auth: HTTP bearer
Headers
A unique value per intended order, for example a UUID.
Request body
Response
Order placed, or a replay of an earlier identical request (then the Idempotent-Replayed: true header is set)
Changes
No recorded changes to this operation across all 1 revision of this API.