Permanently deletes an invoice. This cannot be undone. Only an invoice that nothing has been paid, charged or billed against can be deleted. The request fails with a 400, and the invoice is left unchanged, when the invoice:
- is paid in full, or has any premium or platform fee payment
recorded against it (
invoice_already_paid); - has been charged to the contractor's card, including a charge
that is still pending (
invoice_already_paid); - has been billed on an agency pay invoice
(
agency_pay_invoice_exists).
A declined charge, or a card check that was never captured, does not prevent deletion.
DELETE
/api/v1/invoices/{invoice}
curl \
--request DELETE 'https://api.1099policy.com/api/v1/invoices/in_4RviYgc2Wt'
Response examples (200)
{
"deleted": true,
"deleted_at": 1640995200,
"id": "in_4RviYgc2Wt",
"object": "invoice"
}