#j_r_e
1 messages · Page 1 of 1 (latest)
Hi there!
Hi Soma !
I'm confused. Do you want to use Checkout Session to create the Subscription, or do you want to create the Subscription yourself?
lol sorry
my backend is creating he Customer and the Subscription, that's fine
but I would like to use Checkout Session to let the end user enter its bank details to complete its payment details for this subscription
No that's not how it works.
If you want to use Checkout Session, then only create a Checkout Session in subscirption mode, and redirect the users to the Checkout Session url. And that's it. The Checkout Session will take care of everything.
but I would prefer to use Stripe Checkout
Yes we recommend using Checkout Session because it's simpler.
here's our documentation on Checkout Session + Subscriptions: https://stripe.com/docs/billing/subscriptions/build-subscriptions?ui=checkout
ok...but with Stripe elements I've got more information on customer (like adress, etc...)
You can ask the same information on the Checkout Sesison if you want
ok, so in fact, I juste need to Create a Checkout Session, send back this URL to my Frontend and the subscription will be created on the same way as the Stripe Elements and I'll retrieve subscription ID from webhooks in fact
Correct. And you have many options on the Checkout Session to collect more information if you want. Like https://stripe.com/docs/api/checkout/sessions/create?lang=cli#create_checkout_session-billing_address_collection
perfect, thanks Soma