Skip to content

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}/actions

Here, 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}/actions

Here, 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

StatusMeaning
400The body is invalid or the action is not void or uncollectible
403The caller is not authorized for the corresponding invoice mutation
404The project invoice or Stripe invoice was not found
409The 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}/pdf

This 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.

StatusCodeMeaning
401—The caller is not authenticated or authorized
404INVOICE_NOT_FOUNDThe Stripe invoice was not found
409INVOICE_PDF_UNAVAILABLEStripe has no PDF URL for this invoice
502INVOICE_PDF_EXPIRED or INVOICE_PDF_DOWNLOAD_FAILEDStripe could not provide a usable PDF