Payment Intents
Create a fiat amount to collect, let the customer pay it in BTC or USDT, and track it through underpayments to paid.
4 endpoints
Endpoints
/v2/payment_intentsAuthList payment intents
Returns the payment intents across all stores on your account, or for one store.
/v2/payment_intentsAuthCreate a payment intent
Creates a payment intent: a fiat amount you want to collect from a customer. The intent is not tied to any cryptocurrency yet. Once the customer picks one, you create a payment quo
/v2/payment_intents/{intent_id}AuthGet a payment intent
Returns a payment intent with every quote raised against it and how much is still due.
/v2/payment_intents/{intent_id}AuthUpdate a payment intent
Changes the amount or currency of a payment intent. Pass at least one of them.
The payment_intent object
A fiat amount you want to collect, tracked from creation until confirmed payments cover it.
Attributes
idstring (uuid)Unique identifier of the payment intent
store_idintegerStore the intent belongs to
amountintegerAmount to collect, in the smallest unit of currency (for example cents)
currencystringFiat currency code
statusstringunpaid = nothing confirmed yet. processing = a payment is waiting for confirmation. underpaid = confirmed payments cover part of amount. paid = confirmed payments cover amount.
Allowed: unpaidprocessingunderpaidpaid
paid_amountintegerConfirmed payments, in the smallest unit of currency. Never more than amount.
extra_datastringYour own reference, as passed when creating the intent
amount_dueintegerAmount still to be paid once payments waiting for confirmation are counted. Only returned by Get a payment intent.
provisional_paid_amountintegerAmount that payments still waiting for confirmation will add to paid_amount. Only returned by Get a payment intent.
payment_quotesarray of objectsEvery quote on the intent, without expires_in. Only returned by Get a payment intent.
▶Show item fields
idstring (uuid)Unique identifier of the quote
payment_intent_idstring (uuid)Payment intent the quote belongs to
amountintegerAmount to pay, in the crypto's smallest unit: satoshis for BTC (8 decimals), 1/1,000,000 USDT for USDT (6 decimals)
paid_amountintegerAmount received, in the same unit as amount. Can be higher than amount if the customer overpaid.
cryptostringCryptocurrency of the quote
Allowed: BTCUSDT
addressstringAddress to pay. A new address for each BTC quote. For USDT, the store's wallet address.
statusstringpending = waiting for payment. unconfirmed = payment seen, not yet confirmed. partially_confirmed = 1 confirmation. confirmed = final, counted towards the intent. expired = price lock ran out with no payment, can be refreshed. failed = the payment was dropped or reverted.
Allowed: pendingunconfirmedpartially_confirmedconfirmedexpiredfailed
txidstringTransaction that paid the quote
paid_timestampintegerUnix time of the latest payment status change on this quote
expires_inintegerSeconds left on the price lock, 0 once it has run out. Only returned when a single quote is returned.
Example object
{
"id": "d5e88bd4-2964-4554-9a81-ab64c391d174",
"store_id": 1243,
"amount": 1000,
"currency": "USD",
"status": "unpaid",
"paid_amount": 0,
"extra_data": "order-1042",
"amount_due": 1000,
"provisional_paid_amount": 0,
"payment_quotes": [
{
"id": "d81111b2-0165-4831-bd12-7a09011d4aa6",
"payment_intent_id": "d5e88bd4-2964-4554-9a81-ab64c391d174",
"amount": 11982,
"paid_amount": 0,
"crypto": "BTC",
"address": "bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh",
"status": "pending",
"expires_in": 299
}
]
}The payment_intent_callback object
The callback sent to your store when the status of a payment on a payment quote changes.
Attributes
payment_intent_idstring (uuid)Payment intent the payment belongs to
payment_quote_idstring (uuid)Quote that was paid
statusinteger0 = Unconfirmed, 1 = Partially confirmed, 2 = Confirmed (final)
Allowed: 012
txidstringTransaction ID on the blockchain
valueintegerAmount received, in the crypto's smallest unit
cryptostringCryptocurrency of the payment
Allowed: BTCUSDT
Example object
{
"payment_intent_id": "d5e88bd4-2964-4554-9a81-ab64c391d174",
"payment_quote_id": "d81111b2-0165-4831-bd12-7a09011d4aa6",
"status": 2,
"txid": "c4978bfc9b4cd632fb37eb5f69c7c686ae364d9cb1b32ec01c0f8bae72530a4e",
"value": 11982,
"crypto": "BTC"
}