Skip to content
Docs menu

Endpoints

Retrieve a receipt

Get a payment's public receipt, the data behind its hosted receipt page.

Public: the data behind a payment's hosted receipt. Anyone with the payment's ID can read it, so it leaves out the fees you pay, the deposit and the customer's details. Every payment has one, whatever its status.

amount and currency are the price, and breakdown adds any processing fee the customer paid to reach its total (its network_fee is always null, since the wallet paid that). crypto is the coin, network and amount quoted, and null for a card, whose details are entered on the secure payment page. When the transfer came on another network than quoted, crypto names the network it arrived on. received_amount stays null until something arrives, and transfers lists every transfer the customer sent, the first also in transaction. A card receipt lists none, since the card-payment deposit isn't the customer's. paid_at is set once the payment succeeds or you accept it, and back_url is where the receipt's button goes: the success URL, or else your website.

Path

  • id string Required
    The payment's ID, such as pmt_QI02vLdJGd48hBbg.

Errors

  • 404 not_found
    No payment has that ID.

Any request can also fail on its key or its body. See errors.

Request
curl "https://dash.402pay.co/api/v1/public/receipts/pmt_QI02vLdJGd48hBbg"
Response200 OK
{  "data": {    "kind": "receipt",    "id": "pmt_QI02vLdJGd48hBbg",    "status": "succeeded",    "description": "Pro plan, monthly",    "reference": "order_1042",    "amount": 4900,    "currency": "USD",    "breakdown": {      "currency": "USD",      "price": 4900,      "processing_fee": null,      "network_fee": null,      "total": 4900    },    "rail": "crypto",    "crypto": {      "asset": "USDC",      "network": "polygon",      "amount": "49.00"    },    "received_amount": "49.00",    "overpaid_amount": null,    "failure_code": null,    "transaction": {      "hash": "0xc16a611d90302ba917593ed9743f5e734a556e8d2f35bb0d60a2ca02ac99bb20",      "url": "https://polygonscan.com/tx/0xc16a611d90302ba917593ed9743f5e734a556e8d2f35bb0d60a2ca02ac99bb20"    },    "transfers": [      {        "hash": "0xc16a611d90302ba917593ed9743f5e734a556e8d2f35bb0d60a2ca02ac99bb20",        "network": "polygon",        "url": "https://polygonscan.com/tx/0xc16a611d90302ba917593ed9743f5e734a556e8d2f35bb0d60a2ca02ac99bb20",        "amount": "49.00"      }    ],    "business": {      "name": "Acme Studio",      "support_email": "billing@example.com"    },    "back_url": "https://example.com/thanks",    "paid_at": "2026-09-26T21:23:13.447Z",    "created_at": "2026-09-26T21:22:47.038Z"  }}