#Herobrine
1 messages ยท Page 1 of 1 (latest)
Unfortunately there isn't a pre-made setting for this so you will need some custom code. The first thing that I can think of is that you will want to see if the user already has an active Checkout Session in which case you can just direct them to the same link again
Or you can expire the existing Checkout Session and create a new one but re-serving the original would likely be easier
Thank's a lot! That's a good idea, I'll re-serve the existing checkout session. I'll find how to get existing checkout sessions for a customer.
(You guys are so fast, thanks a lot for the support!)
Do you happen to know how to get existing checkout sessions for a user? Or should I store a session id in my DB?
๐ stepping in as Pompey needs to step away
Thanks!
What I'd recommend is to have an authentication process on your site before you redirect to Checkout
You create a Customer within Stripe to correspond to that Authentication process
Then you pass the Customer ID to the Checkout Session
Yes, I already have such process, giving the same customer id to the checkout session invalidate the other sessions?
Nope, but you can list Checkout Sessions by Customer: https://stripe.com/docs/api/checkout/sessions/list#list_checkout_sessions-customer
Thanks, that's super useful, I think I got everything I need. Thanks a lot ๐!