#zonixo
1 messages · Page 1 of 1 (latest)
Hi 👋 I'm not sure I'm grasping what is being asked, would you mind trying to rephrase the question?
Hello. I also try to pass the user Id from my database into the session to know which user have successfully a subscription payment in order to update it. From what i saw with the workflow implementation with Card the customer is created right before to intend any payment but with Stripe Checkout the example in the documentation there is not customer creation before the session. I wonder if i can create the customer and join it to the session so i will store the customer id right before the session creation.
Yup, you can create a Customer before creating the session, and pass the ID of that Customer into the customer field when creating the Checkout Session:
https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-customer
Thank you. This is generally the best way to do this or people are using another method like storing the session ID until any subscription success have been passed ? From the documentation it says that the session id is stored in the database https://stripe.com/docs/billing/quickstart?client=react&lang=node
Manging customer creation yourself is probably the easiest way to do this