Write an open invoice off as bad debt, moving it to uncollectible. This is terminal: an uncollectible invoice cannot be paid, voided or credited afterwards.
The invoice's line items are deleted in the same transaction and their ledger journal entries are released back to the uninvoiced pool, so the response always carries an empty line_items array.
Invoicing is opt-in per organization: unless the invoicing feature flag is enabled for your organization this endpoint returns 403.
400The invoice cannot move to uncollectible from its current status. Only an open invoice can be written off.
403Invoicing is not enabled for the organization, or the caller is missing the invoices:mark_uncollectible permission.
404No such invoice, or the caller's user group does not grant access to its policy.
409The invoice's linked payment has already gone to the bank and can no longer be cancelled, or the invoice was modified by a concurrent writer. Reconcile the payment first.