Buy an offer
Prices the offer and pays for it.
payment_source: wallet. If the wallet (including any overdraft) covers
the price, it is debited at once, the quote is fulfilled, and an order is
created and fulfilled in the background: poll the order or wait for its
webhook. If not, nothing is charged and the response is 402. While the
account is overdue its overdraft is frozen, and the response is
403 account_overdue until the debits past their terms are paid down.
usdt, usdc or bank_transfer. The quote is awaiting_funds and
payment says where to send price. Every payment credits the wallet, and
waiting quotes are then paid from the balance (never from an overdraft): the
one priced exactly at what arrived first, then the oldest that fit. Money
already in the wallet counts, so the quote may come back fulfilled at once.
Unpaid by expires_at, it becomes expired; money that arrives later stays
in the wallet.
Authorization
ApiKey An account API key, sent as Authorization: Bearer tz_live_…. The prefix
selects the mode: tz_test_ for sandbox, tz_live_ for real money.
In: header
Header Parameters
A client-generated key, unique per intended operation, that makes this request
safe to retry. The same key returns the original response; the same key with a
different request is rejected. Missing: 400 idempotency_key_required.
1 <= length <= 255Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/quotes" \ -H "Idempotency-Key: string" \ -H "Content-Type: application/json" \ -d '{ "offer_id": "off_jp_5gb_30d", "payment_source": "wallet" }'{ "id": "string", "object": "quote", "status": "awaiting_funds", "offer_id": "string", "payment_source": "wallet", "price": { "amount": 1450, "currency": "USD" }, "wallet": { "debited": 0, "balance_after": 0 }, "payment": { "rail": "usdt", "amount": { "amount": 1450, "currency": "USD" }, "asset": "USDT", "asset_amount": "14.40", "destinations": [ { "id": "string", "object": "funding_destination", "type": "bank_account", "bank_name": "string", "account_number": "string", "account_name": "string" } ], "lightning": { "bolt11": "lnbc144u1p...", "payment_hash": "string", "amount_sats": 22656, "expires_at": "2019-08-24T14:15:22Z" } }, "expires_at": "2019-08-24T14:15:22Z", "order_id": "string", "metadata": { "property1": "string", "property2": "string" }, "created_at": "2019-08-24T14:15:22Z"}