#arian_webhooks
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/1362213560289329212
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi! Not sure what exactly you're asking here; can you fill me in?
Oh.
You just need a lock somewhere.
On this page: https://docs.stripe.com/checkout/fulfillment?lang=node
a lock?
Ya, you need to make sure that only one thing can operate on that record at a time.
And as I type this, I realize that may not work on creation ...
would it be possible to create a map outside of the webhook handler, that stores the session ids, and if the session id is in that map, it does not proceed with fulfillment?
What Stripe event triggers this process?
"checkout.session.completed" and "checkout.session.async_payment_succeeded"
Like would something like this work out (I'll fix the delete)
You're just trying to mitigate against duplicate Stripe Events, right?
I'm not quite sure, I'm just assuming it would may get called twice concurrently. In which case, I don't want it to send an email twice, or something like that.
Because that's what the docs say
I would assume that you have a queue and you process each event in the queue one by one
would that be an optimal way to approach this problem?
You might want to look online for different solutions to this problem and see what works best for you. What I suggested is just one way to approach it!