#pedronunes5974_webhooks

1 messages ยท Page 1 of 1 (latest)

austere heathBOT
#

๐Ÿ‘‹ 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/1215276340505223230

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

whole inletBOT
waxen shuttle
#

๐Ÿ‘‹ happy to help

#

would you mind elaborating a bit more?

wind pawn
#

ok.
when creating payments we get the payment id from stripe, save it in our db.
but stripe in the meantime processes it first that we, and the first webhook call fail's because it doesn't find the payment id

#

using services bus, as mentioned.. I don't think that would help either

waxen shuttle
#

how are you integrating with Stripe? are you using Checkouts? PaymentIntents? etc.

wind pawn
#

payment intent

waxen shuttle
#

so you're basically listening to payment_intent.created

#

saving the PI ID on your DB

#

and then on payment_intent.succeeded you're searching whether that ID exists on your DB?

wind pawn
#

exactly

waxen shuttle
#

why do you need the first step though?

whole inletBOT
wind pawn
#

i'm using the paymentid as the search value to validate the payment on my end

#

that is the reason

ancient carbon
#

note that webhook order is not guranteed so you just have to work around it

wind pawn
#

the webhook retries again, after a period, so that is not a problem.
it's was just about not getting error's about failed update attempts