---
title: "codespar receipts"
description: "Receipts: the receipt document (comprovante) of a payment, as PDF or PNG"
---

Receipts: the receipt document (comprovante) of a payment, as PDF or PNG

1 command in `@codespar/cli 0.22.1`.

Each one prints what its operation answered. [What a command prints](/docs/cli/reference#what-a-command-prints) has the rule, and [Configuration](/docs/cli/config#what-a-script-gets-when-a-command-fails) has the exit codes and the shape of a failure.

### `codespar receipts document`

Download the comprovante of the payment this receipt seals; served only once the payment is confirmed

```bash
codespar receipts document [options] <receiptId>
```

| option | what it does |
|---|---|
| `--format <format>` | pdf (default) or png (the same page as an image) (default: "pdf") |
| `--out <file>` | Where to write it (default: the server's filename in the current directory) |
