ChargebeeAPI

Write off an invoice

Idempotency Supported
Try in API Explorer

Write 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 status must be payment_due, posted, or not_paid.

Impacts

Invoice

  • Chargebee sets the invoice status to paid.
  • Chargebee sets the invoice write_off_amount to the invoice amount_due.

Credit Note

  • Chargebee creates a credit note with the following attributes:
    • type is adjustment.
    • create_reason_code is Write Off.
    • total is invoice.amount_due.

Payment Schedules

RevRec

Accounting Integrations

  • Write-offs sync to accounting platforms based on configured sync rules. For more details, see the following documentation:

Implementation Notes

Before calling this API, ensure the following:

  • invoice.status is payment_due, posted, or not_paid.
  • invoice.linked_payments[i].txn_status is not in_progress. If it is, then wait for the txn_status to be finalized.

Sample Request

URL Format

POST https://[site].chargebee.com/api/v2/invoices/{invoice-id}/write_off

Input Parameters

comment
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