Billing
Download an invoice or receipt as a PDF
The PDF Stripe made for the invoice, as a file to save.
GET
/user/billing/documents/{id}/pdfTL;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 |
| 401 | Not signed in. | ErrorResponse |
| 404 | No such document for this account, or it has no PDF. | ErrorResponse |
| 429 | Too many requests. | ErrorResponse |
| 502 | Stripe could not supply the PDF. | ErrorResponse |
| 503 | Billing is not set up on this server. | ErrorResponse |
See also
| Doc | Why |
|---|---|
| API reference | Every endpoint, and the error envelope |
| Schemas | Every request and response type |
| Tool reference | The operations as callable tools |