# Download an invoice or receipt as a PDF

> Page: https://docs.plotwork.dev/api/get-user-billing-documents-id-pdf. Index of every page: https://docs.plotwork.dev/llms.txt

The PDF Stripe made for the invoice, as a file to save.

`GET /user/billing/documents/{id}/pdf`

## TL;DR

| Question | Answer |
|---|---|
| What does it do? | Download an invoice or receipt as a PDF. |
| What does it take? | `id` in the path. |
| What does it return? | Status 200 with no body. |
| What can go wrong? | `400` the id is not shaped like an invoice id; `401` not signed in; `404` no such document for this account, or it has no pdf; `429` too many requests; `502` stripe could not supply the pdf; `503` billing is not set up on this server. Every failure uses the one error envelope. |

## What it does

The PDF Stripe made for the invoice, as a file to save. Only the address Stripe returned on this account's own invoice is fetched, and only if it is https on a Stripe host. Never cached. 404 for a document with no PDF.

## Path parameters

| Field | Type | Required | Description |
|---|---|---|---|
| `id` | `string` | yes | The document id, as the list gave it. |

## Responses

| Status | Meaning | Body |
|---|---|---|
| 200 | The PDF. | none |
| 400 | The id is not shaped like an invoice id. | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |
| 401 | Not signed in. | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |
| 404 | No such document for this account, or it has no PDF. | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |
| 429 | Too many requests. | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |
| 502 | Stripe could not supply the PDF. | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |
| 503 | Billing is not set up on this server. | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |

## See also

| Doc | Why |
|---|---|
| [API reference](https://docs.plotwork.dev/api/reference.md) | Every endpoint, and the error envelope |
| [Schemas](https://docs.plotwork.dev/api/schemas.md) | Every request and response type |
| [Tool reference](https://docs.plotwork.dev/mcp/tools.md) | The operations as callable tools |
