Stripe | Financial Infrastructure to Grow Your Revenue

Stripe | Financial Infrastructure to Grow Your Revenue

4466 articles

Delete a draft invoice


Delete a draft invoice

DELETE / v1 / invoices /:id

Permanently deletes a one-off invoice draft. This cannot be undone. Attempts to delete invoices that are no longer in a draft state will fail; once an invoice has been finalized or if an invoice is for a subscription, it must be voided.

Parameters

No parameters.

Returns

A successfully deleted invoice. Otherwise, this call raises an error, such as if the invoice has already been deleted.

Response

{ "id": "in_1MtHbELkdIwHu7ixl4OzzPMv", "object": "invoice", "deleted": true}

Attach a payment to an Invoice

POST / v1 / invoices /:id / attach_payment

Attaches a PaymentIntent or an Out of Band Payment to the invoice, adding it to the list of payments.

For the PaymentIntent, when the PaymentIntent’s status changes to succeeded, the payment is credited to the invoice, increasing its amount_paid. When the invoice is fully paid, the invoice’s status becomes paid.

If the PaymentIntent’s status is already succeeded when it’s attached, it’s credited to the invoice immediately.

See: Partial payments to learn more.

Parameters

  • payment _ intent string The ID of the PaymentIntent to attach to the invoice.
  • payment _ record string The ID of the PaymentRecord to attach to the invoice.

Returns

Returns the invoice object that the payment was attached to.

Response

Finalize an invoice

POST / v1 / invoices /:id / finalize

Stripe automatically finalizes drafts before sending and attempting payment on invoices. However, if you’d like to finalize a draft invoice manually, you can do so using this method.

Parameters

  • auto _ advance boolean Controls whether Stripe performs automatic collection of the invoice. If false, the invoice’s state doesn’t automatically advance without an explicit action.

Returns

Returns an invoice object with status=open.

Response

Last verified 2026-09-24

Is this helpful?