Sample - Stripe API
DELETE/v1/invoices/{invoice}

Delete a draft invoice

Deletes a draft one-off invoice permanently. Use this operation only for invoices that are still in draft state; finalized or subscription invoices must be voided instead, and deletion cannot be undone.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

1 parameter
invoicestringrequired
The identifier of the draft invoice to permanently delete. Maximum 5,000 characters.

2 status codes
200Returns a deleted invoice object containing its identifier, the invoice object type, and `deleted: true`.
deletedbooleanrequired
Always true for a deleted object
Allowed:true
idstringrequired
Unique identifier for the object.
objectstringrequired
String representing the object's type. Objects of the same type share the same value.
Allowed:invoice
defaultError response.
errorobjectrequired

Error handling

invoice must be an invoice identifier of no more than 5,000 characters. The identifier must refer to a one-off invoice that remains in draft state; finalized invoices and subscription invoices cannot be deleted.