Legacy Invoices
Read invoices and update eligible Stripe invoice statuses.
Legacy (v1) API. This page describes the Stripe-first legacy API. It stays supported for existing integrations but is frozen: new features ship only in v2. Prefer v2 for new work: v2 reference.
Invoice status mutations are available to BillStack owners, admins, billing-role members, and API callers with the matching invoice permissions. The invoice must still be open when the request reaches Stripe.
Update a project invoice
POST /api/billstack/teams/{teamId}/projects/{projectId}/invoices/{invoiceId}/actionsHere, invoiceId is the BillStack project invoice ID returned by the project invoice endpoint.
Body:
{
"action": "void"
}Use "uncollectible" instead of "void" to mark the invoice uncollectible.
Update a team invoice
POST /api/billstack/teams/{teamId}/stripe/invoices/{stripeInvoiceId}/actionsHere, stripeInvoiceId is the Stripe invoice ID, such as in_....
The body and response are the same as for the project endpoint.
Response
{
"action": "void",
"previousStatus": "open",
"invoice": {
"id": "in_123",
"status": "void"
}
}Errors
| Status | Meaning |
|---|---|
400 | The body is invalid or the action is not void or uncollectible |
403 | The caller is not authorized for the corresponding invoice mutation |
404 | The project invoice or Stripe invoice was not found |
409 | The invoice is no longer open; refresh the invoice before retrying |
The dashboard hides both actions for draft, paid, void, and uncollectible invoices. It also re-checks the live Stripe status during the request to handle stale list data safely.
Download a team invoice PDF
GET /api/billstack/teams/{teamId}/stripe/invoices/{invoiceId}/pdfThis endpoint retrieves the invoice from Stripe at request time and streams the PDF directly. It does not rely on the time-limited invoice_pdf URL stored in the billing mirror.
The caller must have the invoice:GetInvoice permission for the team. The response is an application/pdf download with a safe invoice filename and is not cached.
| Status | Code | Meaning |
|---|---|---|
401 | — | The caller is not authenticated or authorized |
404 | INVOICE_NOT_FOUND | The Stripe invoice was not found |
409 | INVOICE_PDF_UNAVAILABLE | Stripe has no PDF URL for this invoice |
502 | INVOICE_PDF_EXPIRED or INVOICE_PDF_DOWNLOAD_FAILED | Stripe could not provide a usable PDF |