sincecutoff.com
← all changes

Stripe API detach payment from invoice

Introduced 2026-01-28 · score 0.98

HOW TO USE IT

When changing payment or reconciliation flows, POST to detach a PaymentIntent from its invoice; if this creates an unpaid balance, the invoice reopens as `open` and Stripe generates a default PaymentIntent for the remaining amount. Listen for `invoice_payment.detached` to track detachment.

curl https://api.stripe.com/v1/invoices/<INVOICE_ID>/detach_payment \ -u "<YOUR_SECRET_KEY>" \ -H "Stripe-Version: 2026-01-28.preview" \ -d payment_intent=<PAYMENT_INTENT_ID>
Listen for the `invoice_payment.detached` event.

WHY THIS HELPS

When changing payment and reconciliation flows, detach a PaymentIntent from an invoice so it can be used in another invoice or payment flow.

REQUIREMENTS AND LIMITATIONS

  • invoice ID (path) (required): Invoice from which to detach the payment.
  • payment_intent: ID of the PaymentIntent to detach from the invoice.
  • Stripe-Version (required): Set to `2026-01-28.preview` for the documented API version.
  • secret key (required): Authenticate the API request.
  • Prerequisite: Have a Stripe secret key and the invoice and PaymentIntent IDs. The endpoint reference lists customer, invoice, and PaymentIntent creation as prerequisite API objects.
  • Prerequisite: For REST requests, use API version `2026-01-28.preview`; the changelog says to include it in the `Stripe-Version` request header when not using an SDK.

FIRST-PARTY EVIDENCE

Check the installed version and the source before using it. Entry JSON

Report a problem with this card