#ghost64
1 messages · Page 1 of 1 (latest)
Hi there! I think it would make more sense to only "hold" the item if you receive a checkout.session.completed event (if a customer completes the payment)
I also need to hold the item if someone else is trying to pay it for that item so that 2 checkout session cant be opened once
If you'd rather give customers a short time frame for payment, you can expire the Checkout Sessions programmatically: https://stripe.com/docs/api/checkout/sessions/expire
For that I would need to implement a timer in the server side right? I do have that in mind but am spectical cause it might use up alot of resources. I was wondering if anyone might have came up with this problem and how they handled it
Yes, you'd need to keep track of Session creation time and have some logic that expires that Session if it's still open in 5 minutes time
Any other way that is relevant?