Pay: invoices
Create an invoice
/v1/invoicesPrice in USDT or in an enabled display currency (see GET /v1/rates); the exchange rate is
frozen at creation. One deposit address per offered chain (variant A), or the merchant's
shared address with a unique amount (variant B, one chain only). Errors:
chain_not_available, amount_below_minimum, amount_above_cap, ttl_out_of_range,
duplicate_external_ref, unique_amount_exhausted (409, variant B), currency_suspended
(409, USDT/USD guard or missing rate), kyb_required (403, live mode).
- Safe to retry with the Idempotency-Key header: see Idempotency.
Headers#
Idempotency-KeystringrequiredRequired on every Pay POST; makes it safe to retry for 24 hours. Scoped to the key's environment.
Request body#
currencystringrequiredUSDT, or an enabled display currency (USD,EUR,XOF…).price_e6stringrequiredPrice in millionths of the currency, e.g.
12500000= 12.50. No more decimals than the currency has (XOF: none).chain_idsarray of integerrequiredChains offered to the payer.
variantstringA: one deposit address per invoice.B: shared address and unique amount, one chain only.ttl_secondsintegerValidity; default 3600, from 900 to 604800.
external_refstringYour reference, unique per environment.
descriptionstringmetadataobject8 KiB at most.
Responses#
Response headers
Locationstring/v1/invoices/{id}.
Object fields
idstring · uuidobjectstringstatusstringenvironmentstringexternal_refstringnullablevariantstringchain_idintegernullableChain of the payment (set at creation when one chain is offered).
tokenstringnullabledecimalsintegernullableamount_dueanyamount_receivedanyamount_pendinganydifferencestringnullableSigned difference to the amount due, native units.
priceobjectnullableObject fields
currencystringprice_e6stringfx_rate_e6stringUnits of the currency for 1 USDT, in millionths, frozen at creation.
fx_sourcestringfx_as_ofstring · date-time
chainsarray of objectFields of each item
amountstringNative units, e.g.
12500000for 12.5 USDT with 6 decimals.amount_formattedstringdecimalsintegerchain_idintegertokenstringdeposit_addressstringBase58
T…on TRON.payment_uristringnullableEIP-681 URI for a QR code (EVM chains).
expires_atstring · date-timepaid_atstring · date-timenullablecreated_atstring · date-timemetadataobject
Standard error format: see Errors.