BlockonomicsAPI Reference

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

object

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_idinteger

Store the intent belongs to

amountinteger

Amount to collect, in the smallest unit of currency (for example cents)

currencystring

Fiat currency code

statusstring

unpaid = 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_amountinteger

Confirmed payments, in the smallest unit of currency. Never more than amount.

extra_datastring

Your own reference, as passed when creating the intent

amount_dueinteger

Amount still to be paid once payments waiting for confirmation are counted. Only returned by Get a payment intent.

provisional_paid_amountinteger

Amount that payments still waiting for confirmation will add to paid_amount. Only returned by Get a payment intent.

payment_quotesarray of objects

Every 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

amountinteger

Amount to pay, in the crypto's smallest unit: satoshis for BTC (8 decimals), 1/1,000,000 USDT for USDT (6 decimals)

paid_amountinteger

Amount received, in the same unit as amount. Can be higher than amount if the customer overpaid.

cryptostring

Cryptocurrency of the quote

Allowed: BTCUSDT

addressstring

Address to pay. A new address for each BTC quote. For USDT, the store's wallet address.

statusstring

pending = 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

txidstring

Transaction that paid the quote

paid_timestampinteger

Unix time of the latest payment status change on this quote

expires_ininteger

Seconds 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
    }
  ]
}
object

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

statusinteger

0 = Unconfirmed, 1 = Partially confirmed, 2 = Confirmed (final)

Allowed: 012

txidstring

Transaction ID on the blockchain

valueinteger

Amount received, in the crypto's smallest unit

cryptostring

Cryptocurrency 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"
}