#screwlewse-subscription

1 messages · Page 1 of 1 (latest)

twin leaf
thorn lion
#

Thank you all for the quick replies.

winged flower
#

This is what you need to follow

#

its kind of counter intuitive imo but the payment comes last when doing subscriptions

#

you need a Price Obj, a Cust Obj and a subscription, to collect payments for

#

it sounds like you can create all of that in one go

#

so one api call to create the price, customer and subscription and then one to do the payment

thorn lion
#

I see, so we will want to wait to create the subscription until we have all the final user data, yeah?
So essentially we will want to wait to do all that until the user clicks the "pay" button and not start any of the process beforehand yeah?

twin leaf
#

well you want to collect card details before they click pay but after they create the subscription

#

1/ Ask them about the Price they want to pay
2/ Create a Customer server-side
3/ Create a Subscription for that Price + payment_behavior: 'default_incomplete'
4/ Get the latest invoice's PaymentIntent's client_secret
5/ Client-side, collect card details and confirm that PaymentIntent