Billing
List your invoices and receipts
The invoices Stripe issued for this account's Plotwork subscription, newest first.
GET
/user/billing/documentsTL;DR
| Question | Answer |
|---|---|
| What does it do? | List your invoices and receipts. |
| What does it take? | Nothing. |
| What does it return? | Status 200 with a body of type BillingDocumentList. |
| What can go wrong? | 401 not signed in; 429 too many requests; 502 stripe could not complete the request; 503 billing is not set up on this server. Every failure uses the one error envelope. |
What it does
The invoices Stripe issued for this account's Plotwork subscription, newest first. Amounts are whole cents with a currency. A paid invoice is a receipt. Nothing of another product on the shared Stripe account is ever listed.
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | The account's documents. | BillingDocumentList |
| 401 | Not signed in. | ErrorResponse |
| 429 | Too many requests. | ErrorResponse |
| 502 | Stripe could not complete the request. | ErrorResponse |
| 503 | Billing is not set up on this server. | ErrorResponse |
Response body
A 200 answer has the type BillingDocumentList.
| Field | Type | Required | Description |
|---|---|---|---|
items | BillingDocument[] | yes | |
items[].id | string | yes | The id to ask for the document and its PDF with. |
items[].kind | "invoice" | "receipt" | yes | A receipt is an invoice that has been paid; anything else is an invoice. |
items[].number | string | yes | The number printed on the document, which an accounts department quotes back. |
items[].description | string | yes | What it was for, such as the plan. Empty when Stripe names nothing. |
items[].currency | string | yes | The three-letter currency, in capitals. at least 3 characters; at most 3 characters. |
items[].totalCents | integer | yes | The total in whole cents (the currency's minor unit). |
items[].status | string | yes | The invoice's own word: paid, open, void, or uncollectible. A draft is never listed. |
items[].issuedAt | integer | yes | When it was issued, in milliseconds since the epoch. |
items[].paidAt | integer | null | yes | When it was paid, in milliseconds since the epoch, or null while it is not. |
items[].downloadable | boolean | yes | False when there is no PDF to fetch, so the PDF route would answer 404. |
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 |