POST
/api/public/v1/invoices/{invoiceId}/voidVoid an invoice
Closes an invoice out without collecting on it, and cancels the Stripe subscription behind any recurring lines so no further installment is charged. A fully paid invoice cannot be voided — there is nothing left to stop. Voiding one that is already void is a no-op rather than an error, so a retry is safe.
Required scope
The access token must carry this scope. A token missing it gets 403 Forbidden. Grant them to an API client under Settings → Company → API, and to a teammate under Employee → Permissions.
invoices:write
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
invoiceId | string | Required | Invoice ID. |
POSTExample request
curl
curl -X POST "https://www.pxb.app/api/public/v1/invoices/{invoiceId}/void" \
-H "Authorization: Bearer your_access_token"200Example response
json
{
"message": "Invoice voided.",
"content": {
"invoiceId": "9f1c2f4e-6b3a-4f28-9c11-0a2b3c4d5e6f"
}
}400Example response
json
{
"message": "A fully paid invoice cannot be voided."
}In the console
The same thing done by hand, for anyone comparing the API against the screen they already use.