Idempotency Supported
Try in API ExplorerWrite off the specified invoice.
Use this operation to mark invoices as settled when they remain unpaid after multiple attempts to collect payment.
Reverse a write-off
You can reverse the write-off by removing the linked credit note.
Prerequisites & Constraints
- There must be no in-progress payments for the invoice.
- The invoice
statusmust bepayment_due,posted, ornot_paid.
Impacts
Invoice
- Chargebee sets the invoice
statustopaid. - Chargebee sets the invoice
write_off_amountto the invoiceamount_due.
Credit Note
- Chargebee creates a credit note with the following attributes:
typeisadjustment.create_reason_codeisWrite Off.totalisinvoice.amount_due.
Payment Schedules
- If the invoice has an associated
payment_schedulecreated against it, Chargebee marks the schedule as paid. Chargebee setsschedule_entries[].statustopaid.
RevRec
- To understand how write-offs sync to RevRec, see the write-off sync documentation.
- To understand how write-offs affect bad debt expenses in RevRec, see the bad debt expense documentation.
Implementation Notes
Before calling this API, ensure the following:
invoice.statusispayment_due,posted, ornot_paid.invoice.linked_payments[i].txn_statusis notin_progress. If it is, then wait for thetxn_statusto be finalized.
Sample Request
URL Format
POST https://[site].chargebee.com/api/v2/invoices/{invoice-id}/write_off
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