Payment Intents
GET
/v2/payment_intents/{intent_id}Auth requiredGet a payment intent
Returns a payment intent with every quote raised against it and how much is still due.
This is the source of truth for whether an order is paid. When a callback arrives, fetch the intent and fulfil the order only when status is paid.
paid_amount only counts confirmed payments. provisional_paid_amount is what payments still waiting for confirmation will add, and amount_due is what is left once those are counted.
Requires Bearer token authentication. Include Authorization: Bearer YOUR_API_KEY in the request header.
Path Parameters
intent_idstringrequiredID of the payment intent
Responses
intent_idpath · stringrequiredID of the payment intent
Response will appear here
Request
curl -X GET \
"https://www.blockonomics.co/api/v2/payment_intents/d5e88bd4-2964-4554-9a81-ab64c391d174" \
-H "Authorization: Bearer YOUR_API_KEY"const response = await fetch('https://www.blockonomics.co/api/v2/payment_intents/d5e88bd4-2964-4554-9a81-ab64c391d174', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
})
const data = await response.json()
console.log(data)import requests
headers = {
"Authorization": "Bearer YOUR_API_KEY"
}
response = requests.get(
"https://www.blockonomics.co/api/v2/payment_intents/d5e88bd4-2964-4554-9a81-ab64c391d174",
headers=headers
)
print(response.json())Response
{
"data": {
"id": "d5e88bd4-2964-4554-9a81-ab64c391d174",
"store_id": 1243,
"amount": 1000,
"currency": "USD",
"status": "underpaid",
"paid_amount": 500,
"extra_data": "order-1042",
"amount_due": 500,
"provisional_paid_amount": 0,
"payment_quotes": [
{
"id": "5d5b245f-41d9-4917-b720-60ba67a34e0b",
"payment_intent_id": "d5e88bd4-2964-4554-9a81-ab64c391d174",
"amount": 5000000,
"paid_amount": 5000000,
"crypto": "USDT",
"address": "0x3f5CE5FBFe3E9af3971dD833D26bA9b5C936f0bE",
"status": "confirmed",
"txid": "0x712f876339d877e7558f25b4c0b684c5e1d1a11472d407a175c231894b280714",
"paid_timestamp": 1790219553
},
{
"id": "d81111b2-0165-4831-bd12-7a09011d4aa6",
"payment_intent_id": "d5e88bd4-2964-4554-9a81-ab64c391d174",
"amount": 5991,
"paid_amount": 0,
"crypto": "BTC",
"address": "bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh",
"status": "pending",
"txid": null,
"paid_timestamp": null
}
]
}
}