Skip to content

Void an invoice

Request

Voids an open or unpaid invoice, so that Acme stops collecting it. Acme cancels the scheduled payment retries and sets amountDue to 0. You cannot void a paid invoice or an invoice that is already void: the API returns 409. This action is permanent.

Security
ApiKey
Path
invoiceIdstring^INV-[0-9]+$required

The ID of the invoice, for example INV-2041.

Bodyapplication/json
reasonstring

Why you void the invoice. Acme shows the reason in the dashboard.

Enum:"duplicate""uncollectible""created_by_mistake""other"
curl -i -X POST \
  'https://acme-billing.redocly.app/_mock/apis/billing/invoices/{invoiceId}/void' \
  -H 'Content-Type: application/json' \
  -H 'X-API-Key: YOUR_API_KEY_HERE' \
  -d '{
    "reason": "duplicate"
  }'

Responses

The voided invoice.

Bodyapplication/json
objectstringrequired
Value:"invoice"
idstring^INV-[0-9]+$required

The invoice number, which is also its unique ID.

customerIdstring^cus_[A-Za-z0-9]+$required

The ID of the customer that the invoice bills.

customerNamestringrequired

The name of the customer, copied from the customer when the invoice was finalized.

statusstring(InvoiceStatus)required

The status of the invoice. See the invoice lifecycle guide.

Enum:"draft""open""unpaid""paid""void"
currencystring(Currency)^[a-z]{3}$required

The three-letter ISO 4217 currency code, in lowercase.

Example:"usd"
totalintegerrequired

The sum of the line items, in the smallest currency unit.

amountPaidintegerrequired

The amount captured so far, in the smallest currency unit.

amountDueintegerrequired

total minus amountPaid. 0 for a paid or void invoice.

issueDatestring, (date)required

The date Acme sends, or sent, the invoice to the customer.

dueDatestring, (date)required

The date by which the customer must pay.

pastDuebooleanrequired

true when the invoice is unpaid and its due date has passed.

collectionMethodstringrequired

How Acme collects the invoice. charge_automatically charges the payment method on file on the due date. send_invoice emails the invoice, and the customer pays by card or bank transfer.

Enum:"charge_automatically""send_invoice"
nextRetryAtstring or null, (date-time)required

When Acme retries the failed card payment next. null when no retry is scheduled.

paidAtstring or null, (date-time)required

When Acme captured the payment that paid the invoice in full.

voidedAtstring or null, (date-time)required

When the invoice was voided.

lineItemsarray of objects(LineItem)required
createdAtstring, (date-time)required

When the invoice was created.

Response
{ "object": "invoice", "id": "INV-2048", "customerId": "cus_U7m1Fh5Gd", "customerName": "Umbrella Corporation", "status": "void", "currency": "usd", "total": 80000, "amountPaid": 0, "amountDue": 0, "issueDate": "2026-09-30", "dueDate": "2026-10-30", "pastDue": false, "collectionMethod": "send_invoice", "nextRetryAt": null, "paidAt": null, "voidedAt": "2026-10-27T10:15:00Z", "lineItems": [ { … } ], "createdAt": "2026-09-30T08:00:00Z" }