Hi there!
I have a problem with overbooked courses. We have a website where we sell some swimming courses to the users via Snipcart (Paypal as a payment gateway). There is only a limited number of seats in each course. Now we had multiple times an issue with overbooking. We disable the booking button on the website if all seats are sold. But if multiple people are already logged in into paypal (but haven’t finished the payment), we always have more bookings/payments than seats.
Does anyone know a best practice to handle this? Can give Snipcart info to my server, if there is an pending ongoing payment process?
My only idea for this now is to immediately block the booking-option if the booking button on the website it is clicked for the last seat… and then un-block it after a certain time if the paypal payment wasn’t finished (like after 1 hour or something similar), but this doesn’t seem to be a very clean solution for me…
Thanks in advance!
Jonas
Hi, maybe this will help you. I limit the number of my bookable trainings in the Snipcart app.
Under products I can limit the orders per training. See here:
Hi Christian,
thank you very much for your answer. That’s not a bad idea, and I just checked that option out. In our case the problem seems to persist. If the people are already logged in into paypal (without having finished the payment process there), I looks like I can still overbook the course. I tested it and ended up with -1 value of available stock items (I didn’t check the checkbox to allow out-of-stock-purchase). I think I will try to go with the solution I wrote about in the last paragraph of my inital post. At least according to ChatGPT this seems to be a quite common technique (“Pessimistic locking”).
Thank you very much anyway!
Jonas
Hi Jonas,
Unfortunately, I can’t help you any further. My programming skills are no longer sufficient for this. I would perhaps contact the support of Paypal. Maybe Paypal has an idea or solution for you.
Hi Jones, i get your problem, unfortunately it might be difficult to achieve this since your stock is calculated based on your order volume (received orders). This is a problem with a lot of shop systems since you would have to reduce your stock based on if a person has it in their basket at a given time. In my opinion the only people able to fix that should be snipcart or otherwise some programming work on your side to track it yourself.
Hi @Christian342, hi @wttdev, thank you both for your answers! I think I will try to implement the function to check if a booking was put into the cart short time ago without finishing payment by myself for now, maybe there will be easier/cleaner options in the future
Thank you both very much for your time and answers!!