#Lucas974
1 messages · Page 1 of 1 (latest)
Stripe don't provide login mechanisme to Checkout Session Customer, you need to implement your own frontend/backend that handle your customers authentication
can you advice me just in such case what could be the easiest way to do that?
I suppose I will need the stripe webhook
In order to create login/auth to your application no need for webhooks. Checkout Session Webhooks are used for post event tracking and order fulfillment. But in your case just in your existing application add a form that gets your customer credentials and login them to your application.
yes, but to get an account, they need to pay before creating an account
Or you mean redirect them to the signup page after the payment done? (success)
Yes you can let the customer pays and then you redirect them to a register page
The disadventage, is when they pay, actually they enter name,email,address ; if after payment done, they need again to fill the signup form ...
the best way would be to use the same datas they filled in the Stripe form
Yes for sure, you can refer to the Customer API, and once the customer make the Payment you can retrieve their details
You are using what Stripe Product exactly for your checkout? Stripe Checkout or Elements ?
Stripe checkout
what are the benefits to use Elements?? in a react project, could this solve my issue (allow me to save name/email)
Great, so when creating the Checkout Session, you need to set this customer_creation=always
https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-customer_creation
Once the customer complete the payment, a new customer will be created by that Checkout Session and you can reuse their details ro your registration page
https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-customer
Nope you can achieve this by using both approach, just when using Elements you need to code more
ok
and then I need to parse in js the json file and check which one is not in my database?
right ? or there's a better way to do that?
yes you parse the event body as json and do a check in your integration (database)