Skip to Content

Payment Status

GET/payments/:paymentId/status

Description

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

HeaderDescriptionRequired
Content-Typeapplication/jsonyes
x-api-keyYour API keyyes

Path Parameters

NameTypeDescription
paymentIdstringPayment 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

StatusDescription
processingPayment is being processed on-chain
successPayment confirmed successfully
failedPayment failed
expiredPayment 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.

Start building

XO

Request Demo

Schedule a call with our team

Select a product
Arrow right

Start building
Grateful

Contact Us

We're here to help