Project

General

Profile

Actions

Feature proposal #9108

closed

Stripe: redo how recurring subscriptions are paid

Added by krileon over 1 year ago. Updated 9 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
12 January 2023
Due date:
% Done:

100%

Estimated time:

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.

Actions #1

Updated by krileon over 1 year 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

Actions #2

Updated by krileon over 1 year 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.

Actions #3

Updated by krileon over 1 year 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).

Actions #4

Updated by krileon about 1 year ago

  • % Done changed from 0 to 80

SubscriptionSchedules almost complete. All other recurring payments now properly use SetupIntents instead of an initial PaymentIntent.

Actions #5

Updated by krileon about 1 year ago

  • % Done changed from 80 to 90
Actions #6

Updated by krileon almost 1 year ago

  • Status changed from Assigned to Resolved
  • % Done changed from 90 to 100
Actions #7

Updated by beat 9 months ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF