Feature proposal #9108
closedStripe: redo how recurring subscriptions are paid
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.
Redoing this will solve the issue of having to use start_date to defer the recurring payments and avoid $0 invoices.
Updated by krileon almost 2 years ago
See the below for further guidance. Seams entire subscription creation and payment handling process will need further changes.
https://stripe.com/docs/billing/migration/strong-customer-authentication#upgrading-integration
Updated by krileon almost 2 years ago
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.
Updated by krileon almost 2 years ago
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).
Updated by krileon almost 2 years ago
- % Done changed from 0 to 80
SubscriptionSchedules almost complete. All other recurring payments now properly use SetupIntents instead of an initial PaymentIntent.
Updated by krileon over 1 year ago
- Status changed from Assigned to Resolved
- % Done changed from 90 to 100