Adds the ability to detach a PaymentIntent from an InvoicePublic preview
What’s new
You can now detach a PaymentIntent from an Invoice using the new detach payment API method. When you detach a payment from an invoice, the PaymentIntent becomes available for use with other invoices or payment flows, and the invoice returns to an unpaid state.
When you detach a payment, Stripe generates an invoice_payment.detached event.
Impact
You can now detach a payment from an invoice, allowing you to reopen paid invoices. This provides more flexibility in managing payment and reconciliation flows.
Detaching a payment reopens an invoice if it creates an unpaid balance, transitioning the invoice’s status from paid to open. Stripe automatically generates a new default PaymentIntent for the remaining amount.