Skip to content
Developer
Sign inSign up

Retrieve a receipt

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

Ask AI about this page

Returns the data behind a payment's hosted receipt. Every payment has one, whatever its status.

It's public: anyone with the payment's ID can read it, so it leaves out the fees you pay, the deposit and the customer's details.

Path

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

Fields to know

  • amount string
    With currency, the price.
  • breakdown object
    The price and any processing fee the customer paid, adding up to its total. Its network_fee is always null, since the wallet paid that.
  • crypto object
    The coin, network and amount quoted, or null for a card, whose details are entered on the secure payment page. When the transfer came on another network than quoted, it names the network it arrived on.
  • received_amount string
    Stays null until something arrives.
  • transfers array
    Every transfer the customer sent, the first also in transaction. Each names the asset that arrived, which can differ from the quote's when the customer sent another coin. A card receipt lists none, since the card-payment deposit isn't the customer's.
  • paid_at timestamp
    Set once the payment succeeds or you accept it.
  • back_url string
    Where the receipt's button goes: the success URL, or else your website.
  • pay_url string
    Where the customer can still pay: the open attempt, or for an unpaid payment the page it came from while that page takes payments. null otherwise.
  • canceled_by string
    customer or business when the payment was canceled.

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://api.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": "49.00",    "currency": "USD",    "breakdown": {      "currency": "USD",      "price": "49.00",      "processing_fee": null,      "network_fee": null,      "total": "49.00"    },    "rail": "crypto",    "crypto": {      "asset": "USDC",      "network": "ethereum",      "amount": "49.00"    },    "received_amount": "49.00",    "overpaid_amount": null,    "failure_code": null,    "canceled_by": null,    "transaction": {      "hash": "0xc16a611d90302ba917593ed9743f5e734a556e8d2f35bb0d60a2ca02ac99bb20",      "url": "https://etherscan.io/tx/0xc16a611d90302ba917593ed9743f5e734a556e8d2f35bb0d60a2ca02ac99bb20"    },    "transfers": [      {        "hash": "0xc16a611d90302ba917593ed9743f5e734a556e8d2f35bb0d60a2ca02ac99bb20",        "url": "https://etherscan.io/tx/0xc16a611d90302ba917593ed9743f5e734a556e8d2f35bb0d60a2ca02ac99bb20",        "network": "ethereum",        "asset": "USDC",        "amount": "49.00"      }    ],    "business": {      "name": "Acme Studio",      "support_email": "billing@example.com"    },    "back_url": "https://example.com/thanks",    "pay_url": null,    "paid_at": "2026-09-26T21:23:10.247Z",    "created_at": "2026-09-26T21:22:47.038Z"  }}