Idempotency Supported
Try in API ExplorerVoids the specified invoice.
Use this operation when:
- The invoice was generated in error.
- The invoice amount is incorrect.
- The customer requests a change to the invoice.
- The customer cancels the order.
Voiding preserves the audit trail and allows for future reference and compliance without removing the original record.
Regenerate or import an invoice
- If the invoice is for the current term of a subscription, you can regenerate it using the Regenerate an invoice API.
- If the invoice is not for the current term of a subscription, you can import it using the Import an invoice API or the UI bulk import action.
Prerequisites & Constraints
- The invoice
statusmust bepayment_due,posted, ornot_paid. - The invoice must not have any
linked_paymentswithtxn_statusset tosuccessorin_progress. - The
amount_adjustedon the invoice must be zero. - The invoice must not have any
applied_creditswithcn_statusset torefundedorrefund_due. - The invoice must not have any
issued_credit_noteswithcn_statusset torefundedorrefund_due. - The invoice must not have any
linked_taxes_withheld.
Impacts
Invoices
- Chargebee sets the invoice
statustovoided.
Subscription
- If the invoice is for the current term of a subscription and you change the subscription later within the same term with proration enabled, Chargebee does not issue prorated credits.
Customer
- Chargebee adds back any promotional credits that were applied to the invoice to
customer.balances.promotional_credits.
Credit Note
- If the Void invoices with credit note setting is enabled, Chargebee creates a credit note for the voided invoice:
- The credit note
typeisadjustment. - The credit note
statusisadjusted. - The credit note
create_reason_codeisInvoice Void.
- The credit note
Usages
- Chargebee delinks the
usageresources associated with the invoice by clearing theinvoice_idattribute.
Integrations
- Review how voiding an invoice impacts your accounting integrations.
Implementation Notes
Before calling this API, ensure the following:
- The invoice
statusispayment_due,posted, ornot_paid. - Remove any
linked_paymentswithtxn_statusset tosuccessorin_progress. - Remove the following credits:
- any
applied_creditswithcn_statusset torefundedorrefund_due - any
issued_credit_noteswithcn_statusset torefundedorrefund_due - any
adjustment_credit_noteswithcn_statusset toadjusted
- any
- Remove any
linked_taxes_withheld.
Sample Request
URL Format
POST https://[site].chargebee.com/api/v2/invoices/{invoice-id}/void
Input Parameters
optional, string, max chars=300
An internal comment to be added for this operation, to the invoice. This comment is displayed on the Chargebee UI. It is not displayed on any customer-facing Hosted Page or any document such as the Invoice PDF .
Returns
invoiceInvoice object
Resource object representing invoice
credit_noteCredit note object
Resource object representing credit_note