#mine_unexpected
1 messages · Page 1 of 1 (latest)
đź‘‹ Welcome to your new thread!
⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đź”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1371664598368911370
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
hello! We don't really have any specific way to recommend since Stripe itself doesn't do inventory management.
I think there's probably many ways to go about this. For example, if you have a queue system in your backend to process whether inventory can be added to the cart, you can check the stock before successfully adding to the cart. Another approach, while it doesn’t specifically prevent the race condition, is to use manual capture. This way, you can capture the payment only when you’re sure you have the stock to fulfill the order.
you might want to look around online for other suggestions too
hi
Thank you for your response.
You’re right—Stripe itself doesn’t handle inventory management…
So basically, you’re suggesting something like checking the stock before adding an item to the cart, right?
i need help for payments and payout
@valid night looks like you're in the wrong place, this thread is for someone else's question.
- If you have your own thread please chat there.
- If you have a question or a followup to a closed thread use one of the buttons in https://discord.com/channels/841573134531821608/842637025524842496 to get help (we don't reopen closed threads).
Note that posting inappropriate messages in other people's threads is against the rules. No worries if this was just an honest mistake, but anyone who violates the rules multiple times will be removed from this server.
So basically, you’re suggesting something like checking the stock before adding an item to the cart, right?
yep, check the stock before adding an item to the cart is one way to go about it.
Another way that comes to mind is allow customers to add to cart, but check and update the stock during payment, and reflect that an item is OOS on other customers' cart if so. Again, this would use a queue system to prevent a race condition.