#Rafal-subscriptions
1 messages · Page 1 of 1 (latest)
Hi @timber magnet! The Payment Element form needs a client secret. So creating the Subscription first allow us to directly use the latest_invoice.payment_intent.client_secret of the subscription on the Payment Element. This is the recommended way.
Hey
yep, but what if the user doesn't complete the registration/subscription flow?
We will create customer and subscription.
If needed, after some amount of time you can delete the customer and delete the subscription. But you don't have to.
ok, is it possible to modify that flow? If the Payment Element form needs a client secret, can I create payment intent/setup intent manually and provide secret to frontend?
it will not disturb the subscription state if change flow?
Yes this should work.
You first collect the payment information, and then when you create the subscription, you pass the corresponding customer and the default_payment_method option https://stripe.com/docs/api/subscriptions/create#create_subscription-default_payment_method