> For the complete index of the 402pay docs, see [llms.txt](https://developer.402pay.co/llms.txt).

# Receipts

The hosted receipt every paid payment gets, and the same receipt as data.

Every paid payment has a hosted receipt, so you don't have to build one. Checkout opens it after payment when there's no `success_url`. 402pay doesn't email receipts, so link customers to the page, or send your own confirmation from your webhook.

## The receipt page

Each receipt lives at `/checkout/receipt/{payment_id}`, such as `https://checkout.402pay.co/checkout/receipt/pmt_QI02vLdJGd48hBbg`. It shows your business, the amount, how the customer paid and, for crypto, the transaction. Customers can print it or save it as a PDF.

## Read it as data

[`GET /public/receipts/{payment_id}`](https://developer.402pay.co/api/checkouts/receipt.md) returns what the page shows, without a key, to build your own confirmation. Anyone with the payment's ID can read it, so it leaves out fees, the deposit and customer details.

Retrieve a receipt, cURL:

```bash
curl "https://dash.402pay.co/api/v1/public/receipts/pmt_QI02vLdJGd48hBbg"
```

Retrieve a receipt, Node.js:

```js
const response = await fetch("https://dash.402pay.co/api/v1/public/receipts/pmt_QI02vLdJGd48hBbg");
const { data } = await response.json();
```

Retrieve a receipt, Python:

```python
import requests

response = requests.get(
    "https://dash.402pay.co/api/v1/public/receipts/pmt_QI02vLdJGd48hBbg",
)
data = response.json()["data"]
```
