API/API reference/Gateway/Get payment status
Get payment status
Read a gateway payment's details and payment status.
GET
/gateway/payments/{id}Required scope: gateway:read.
Request
Replace payment-123 with the ID returned when creating the payment.
curl "https://api.nodana.io/v1/gateway/payments/payment-123" \
-H "Authorization: Bearer YOUR_API_KEY"Response
200 OK
{
"id": "payment-123",
"nodeId": "node-123",
"protocol": "mpp",
"amountSat": 100,
"description": "Generate image",
"status": "paid"
}Both protocols return the same fields. protocol is mpp or l402.
| Status | Meaning |
|---|---|
payment_required | Payment has not yet been confirmed. |
paid | Payment has been confirmed. |
expired | The unpaid payment attempt has expired. |
If payment has not been confirmed, the node must be running so Nodana can check it. Previously confirmed payments can be read while the node is stopped.
To authorise paid access, validate the customer's credential. A status lookup does not authorise a new execution.
Errors
| Status | Code | What to do |
|---|---|---|
401 | unauthorized | Check your API key and gateway:read permission. |
404 | gateway_payment_not_found | Use a payment ID created in the key's account. |
404 | node_not_found | The receiving node is no longer available in the account. |
502 | payment_service_unavailable | Make sure the receiving node is running before checking an unconfirmed payment. |
See Error handling and Rate limiting for other errors and retry guidance.