#_pathin
1 messages · Page 1 of 1 (latest)
hi! it's up to you really. You need a Customer cus_xxx object in order to create a Subscription so it has to be created at some point before that, and then you'd want to store the ID in your database. It's up to you at what point in your flow it makes sense to set that up.
Ok cool, Could I also create the customer even later at the moment they have sumbitted their payment? Because in this doc on point 4 it says: "Create a Customer object when your customer creates an account with your business" But could not the customer be created when submiting the payment or will that interfere possible cases where user buys mutiple subscriptions? https://stripe.com/docs/payments/accept-a-payment-deferred?platform=web&type=setup#create-pm
if you're using the deferred flow then yes you could delay the Customer creation until after the card details are submitted
you'd want to use paymentMethodCreation: 'manual' on the PaymentElement(as the link in the prevous step of that guide to the "build a two step flow" is talking about
the text about creating the customer when they create an account unfortunately doesn't make sense in that doc, it's because we re-use the same generic text/code snippets in multiple docs and in context for that one it doesn't make sense, sorry that it's overall confusing