Payer API
GET
/v2/pay_stat/{id}Get payment status
Returns what is left to pay on a payment intent and the cryptos it can be paid with. No API key: the intent ID is the payer's only credential, so a browser or an AI agent can call this directly.
Safe to poll. due_amount drops as soon as a payment is detected, while status only becomes paid once payments are confirmed.
The merchant-only fields store_id, extra_data and payments are never returned.
Path Parameters
idstringrequiredID of the payment intent
Responses
idpath · stringrequiredID of the payment intent
Response will appear here
Request
curl -X GET \
"https://www.blockonomics.co/api/v2/pay_stat/pi_5GfD5m1b8khzFSLza91VR6"const response = await fetch('https://www.blockonomics.co/api/v2/pay_stat/pi_5GfD5m1b8khzFSLza91VR6', {
method: 'GET',
headers: {
}
})
const data = await response.json()
console.log(data)import requests
headers = {}
response = requests.get(
"https://www.blockonomics.co/api/v2/pay_stat/pi_5GfD5m1b8khzFSLza91VR6",
headers=headers
)
print(response.json())Response
{
"data": {
"id": "pi_5GfD5m1b8khzFSLza91VR6",
"amount": "10.00",
"currency": "USD",
"status": "processing",
"due_amount": "5.01",
"created_at": 1793615164,
"accepted_cryptos": [
"BTC",
"USDT"
],
"testmode": false
}
}