Hanzo
OpenapiBilling

Void a draft or issued invoice

Voids a draft or issued invoice — the cancel. A paid invoice cannot be voided: money has moved, and the correction for that is a refund, not an erasure.

POST /v1/billing/invoices/{id}/void

Addresshttps://api.hanzo.ai/v1/billing/invoices/{id}/void
MethodPOST
OperationvoidInvoice
AuthAuthorization: Bearer $HANZO_API_KEY

Voids a draft or issued invoice — the cancel.

A paid invoice cannot be voided: money has moved, and the correction for that is a refund, not an erasure. The state machine refuses it and that refusal is the answer.

A named handler, not a closure, so zipdoc can lift this prose into the registry.

Request

1 field.

FieldInTypeRequiredDescription
idpathstringyesID is the invoice id.

Response

StatusBodyMeaning
200Invoiceok

200 body — 16 fields.

FieldInTypeAlwaysDescription
amountDueCentsbodyintegerAmountDueCents is what remains collectible.
amountPaidCentsbodyintegerAmountPaidCents is what has been collected so far.
createdAtbodystringCreatedAt is when the draft was raised, RFC3339.
currencybodystringCurrency is the ISO 4217 code.
customerEmailbodystringCustomerEmail is where it is sent.
idbodystringID is the invoice id — what the issue, collect and void ops address.
linesbodyInvoiceLine[]Lines are the charges on the invoice.
lines[].amountbodyintegerAmount is the line total in whole cents (250000 is $2,500.00).
lines[].descriptionbodystringDescription is the human-readable line, e.g.
lines[].quantitybodyintegerQuantity is the number of units, when the line is metered.
lines[].unitPricebodyintegerUnitPrice is the per-unit price in cents, when the line is metered.
numberbodystringNumber is the human-facing invoice number, e.g.
paymentRefbodystringPaymentRef is the processor reference for the collection, once paid.
statusbodystringStatus is draft, open, paid, void or uncollectible.
subtotalCentsbodyintegerSubtotalCents is the sum of the lines.
userIdbodystringUserID is the customer billed.

Failure carries the platform error shape — see Errors.

Examples

hanzo billing invoices void <id>

Billing API · All Hanzo APIs · Interactive reference

How is this guide?

On this page