Feature proposal #9108
closed
Stripe: redo how recurring subscriptions are paid
Added by krileon almost 2 years ago.
Updated over 1 year ago.
Start date:
12 January 2023
Description
Currently a PaymentIntent is created, paid, then a subscription is created and attached to the payment method of that payment intent. However this has been improved between the time this was implemented and now. Now appears the recommended approach is first create the subscription and let the subscription create the payment intent.
https://stripe.com/docs/billing/subscriptions/build-subscriptions?ui=elements#how-to-model-it-on-stripe
Redoing this will solve the issue of having to use start_date to defer the recurring payments and avoid $0 invoices.
Appears creating the subscription first with payment_behavior=default_incomplete will return a pending_setup_intent in the subscription object which can be used for payment. Effectively don't need to manually create a payment intent or setup intent for recurring payments then.
Best approach seams to be to just replace the PaymentIntent with a SetupIntent when the payment is for a recurring subscription. This avoids creating a plan, customer, and subscription object for a payment that may be cancelled (e.g. backing out of the pay form).
- % Done changed from 0 to 80
SubscriptionSchedules almost complete. All other recurring payments now properly use SetupIntents instead of an initial PaymentIntent.
- % Done changed from 80 to 90
- Status changed from Assigned to Resolved
- % Done changed from 90 to 100
- Status changed from Resolved to Closed
Also available in: Atom
PDF