#ghost64

1 messages · Page 1 of 1 (latest)

jovial baneBOT
radiant mesa
#

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)

cold talon
#

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

radiant mesa
cold talon
#

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

radiant mesa
#

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

cold talon
#

Any other way that is relevant?

radiant mesa
#

No, I don't think so

#

It sounds like you're already going to be keeping track of Session creation for a given item so only one Session can be open at a time. If you don't receive a completed event within 5 minutes, you can expire the Session