Skip to Content

Get Payment

GET/payments/:paymentId

Description

Retrieve payment information for checkout processes. This endpoint accepts a payment ID as a URL parameter and returns the complete payment details.

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}`, {
  method: 'GET',
});
 
const payment = await response.json();

Response

SUCCESSFUL RESPONSE (200)
{
  "id": "e0611550-0935-40f1-9cad-63096476207d",
  "recipient": "0x549A9021661a85B6BC51c07B3A451135848d0048",
  "fiatAmount": 50.0,
  "fiatCurrency": "USD",
  "customUsdPriceRate": null,
  "tokenAmount": 50.0,
  "enabledTokens": {
    "DAI": [42161, 8453, 137, 10],
    "USDC": [56, 8453, 42161, 137, 10],
    "USDT": [137, 42161, 56, 8453]
  },
  "selectedToken": "USDC",
  "selectedChainId": 42161,
  "depositAddress": "0x1234567890abcdef1234567890abcdef12345678",
  "expiresAt": "2025-09-09T03:57:43.053Z",
  "status": "AwaitingPayment",
  "error": null,
  "contractPaymentId": "298251156122803456481887845141481660541",
  "merchantId": "2aab0e4a-cb50-44ac-88ef-8a5b79fd7d75",
  "createdAt": "2025-09-08T19:37:43.053Z",
  "updatedAt": "2025-09-08T19:45:00.000Z",
  "processing": false,
  "posId": null,
  "externalReferenceId": "order-12345",
  "isYieldingFunds": false,
  "gratefulFee": null,
  "callbackUrl": "https://yoursite.com/payment-complete",
  "merchant": {
    "name": "Your Store",
    "avatarUrl": "https://example.com/avatar.png"
  },
  "transactions": [
    {
      "hash": "0xabc123...",
      "fromAddress": "0x9876543210fedcba9876543210fedcba98765432",
      "tokens": {},
      "chainId": 42161,
      "status": "pending",
      "type": "payment",
      "updatedAt": "2025-09-08T19:50:00.000Z"
    }
  ]
}

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