Payment Status
GET/payments/:paymentId/statusDescription
Retrieve the current status of an existing payment using its unique ID. This provides real-time updates on whether the payment is pending, completed, or failed, allowing merchants to track the transaction’s progress and generate the invoice when successful.
Headers
| Header | Description | Required |
|---|---|---|
| Content-Type | application/json | yes |
| x-api-key | Your API key | yes |
Path Parameters
| Name | Type | Description |
|---|---|---|
| paymentId | string | Payment ID (UUID) |
Example Request
const paymentId = 'e0611550-0935-40f1-9cad-63096476207d';
const response = await fetch(`https://merchant.grateful.me/api/payments/${paymentId}/status`, {
method: 'GET',
headers: {
'Content-Type': 'application/json',
'x-api-key': '<your-api-key>',
},
});
const status = await response.json();Response
Success (200)
PAYMENT STATUS
{
"status": "success"
}Status Values
| Status | Description |
|---|---|
processing | Payment is being processed on-chain |
success | Payment confirmed successfully |
failed | Payment failed |
expired | Payment expired before completion |
Error Responses
MISSING PAYMENT ID (400)
{
"error": "Payment ID is required"
}PAYMENT NOT FOUND (404)
{
"error": "Payment not found"
}SERVER ERROR (500)
{
"error": "Failed to fetch payment data"
}💡
For real-time updates without polling, configure a webhook notification URL in your integration settings.
