Checkout (public)
Get a deposit address
Returns a one-time deposit address and the exact amount to send for the chosen coin. The quote is valid for 20 minutes, or until the invoice expires if that is sooner.
Asking again for the same coin and refund address returns the open quote instead of a new one. A quote for a different coin or refund address retires the previous unused one; the old address is watched for 24 hours in case a payment still arrives. The invoice needs at least 2 minutes of lifetime left.
When the business has private payments on, the quote is a NEAR Intents confidential quote and the payment has confidential: true. If NEAR Intents refuses it, or this server is not set up for confidential quotes, the answer is a quote_unavailable error without param; Solverr never falls back to a public payment.
Rate limits: 120 per minute per IP address and per network, 10 per minute per invoice, 120 new addresses per minute per business, and 10 new addresses per invoice per hour.
id*stringInvoice id, starting with inv_.
application/json- body
origin_asset*stringAsset id of the coin the payer sends, from the tokens list.
1 <= length <= 200refund_address*stringThe payer's own address on the coin's chain. Refunds go here. It is checked against the chain's address format.
1 <= length <= 200The deposit details for this payment attempt.
application/json- response
One payment attempt on an invoice, with its deposit address and latest status.
id*stringobject*stringstatus*PaymentStatusThe NEAR Intents status of this attempt, in lowercase.
"pending_deposit""known_deposit_tx""incomplete_deposit""processing""success""refunded""failed"coin*amount_in*stringThe exact amount to send, as a decimal string.
amount_in_base*stringThe same amount in the coin's smallest unit.
min_amount_in_base*stringBelow this amount the payment is refunded.
amount_in_usd*string|nulldeposit_address*stringOne-time address for this attempt only. Demo store invoices get addresses that start with TEST-, which cannot receive funds.
deposit_memo*|A memo that must be included with the transfer, when present.
refund_address*stringconfidential*booleanTrue when NEAR Intents quoted this attempt as a confidential intent (private payments). The public checkout state then leaves out destination_transactions, so the payment cannot be linked to the payout.
deadline*stringSend before this time.
date-timetime_estimate_seconds*integerdeposited_amount*string|nullrefunded_amount*string|nullrefund_fee*|Fee NEAR Intents kept when it returned the payment, in the payment's coin. Set only for refunded payments.
refund_reason*string|nullorigin_transactions*array<>destination_transactions*array<>correlation_id*stringNEAR Intents reference for support.
quote_signature*stringNEAR Intents signature of the quote, kept as proof of the terms.
created_at*stringdate-timecurl -X POST 'https://example.com/api/v1/invoices/string/quote' \ -H 'Content-Type: application/json' \ -d '{ "origin_asset": "nep141:arb-0xaf88d065e77c8cc2239327c5edb3a432268e5831.omft.near", "refund_address": "0x1111111111111111111111111111111111111111"}'{ "id": "quo_4kT9mW2xQpL7vN3rB8sZ", "object": "payment", "status": "pending_deposit", "coin": { "asset_id": "string", "symbol": "string", "blockchain": "string", "chain_name": "string", "decimals": 0 }, "amount_in": "string", "amount_in_base": "string", "min_amount_in_base": "string", "amount_in_usd": "string", "deposit_address": "string", "deposit_memo": "string", "refund_address": "string", "confidential": true, "deadline": "2019-08-24T14:15:22Z", "time_estimate_seconds": 0, "deposited_amount": "string", "refunded_amount": "string", "refund_fee": "string", "refund_reason": "string", "origin_transactions": [ { "hash": "string", "url": "string" } ], "destination_transactions": [ { "hash": "string", "url": "string" } ], "correlation_id": "string", "quote_signature": "string", "created_at": "2019-08-24T14:15:22Z"}