#mboras_webhooks

1 messages ¡ Page 1 of 1 (latest)

smoky dawnBOT
#

👋 Welcome to your new thread!

⏱️ We automatically close idle threads, which makes them read-only. Make sure you stick around to chat in realtime!

🔗 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/1212365009556873256

📝 Have more to share? You can add more detail below, including code, screenshots, videos, etc.

⏲️ 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. Thank you for your patience!

wise turretBOT
#

Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

gaunt hull
#

so if I do this

inland venture
#

hi there!

gaunt hull
#

Will it also run tomorrow (I don't want that)

#

I want to manually quick fix

inland venture
#

this is mentionned here:

The automatic retries still continue, even if you manually retry transmitting individual webhook events to a given endpoint and the attempt is successful.
https://docs.stripe.com/webhooks#retries

gaunt hull
#

can I disable that

#

because following:

  • It will retry tomorrow and I have 24 hours in Croatia to issue fiscalized invoice
#

if it is not in 24hours we can get penalty

#

and if I now manually do that I'll create it good

#

but tomorrow I'll with auto retry issue 2nd for same payment which is wrong

inland venture
#

I'm not sure what you mean. but if you have an evernt that failed, you can retry it manually. however stripe will continue to send the event to your endpoint untill in return a 200.

gaunt hull
#

In that endpoint that will be auto retried I am issuing fiscalized invoices

#

that is the issue

#

it will be 2 times called if I do it today manually

#

and I need to manually do this

#

can I then somehow differentiate if the request is retried

#

so I can ignore that code from creating fiscalized invoice

inland venture
#

you need to update your webhook endpoint code so that if you receive the same event twice, the second time it will be ignored

gaunt hull
#

yes

#

that's what I need

#

how can I check if it is same event again?

#

I need to store list of event ids that failed

#

and check if some of them is?

inland venture
#

you'll have to store the event ID that you processed in a database, and ignore events that were already processed

smoky dawnBOT
gaunt hull
#

ok

#

so my next question is this

#

if I now take one of these functions and retry it

I want to ignore this again. Will "id": "evt_1OoQ6OGBNe6stkneFO9IxnAd",
be same when I now retry manually and tomorrow when it is auto retried by Stripe?

fossil obsidian
#

be same when I now retry manually and tomorrow when it is auto retried by Stripe?
What you mean exactly by this ? could you please share a concrete example ?

gaunt hull
#

Ok

#

I am from Croatia and I am on checkout.session.completed issuing fiscalized inovices to tax administration office. I want my webhook for success payment to re-run only once to not issue for one payment multiple fiscalized invoices.

#

and for example can you check out this payment

#

so let's come to the conclusion for this one

#

we_1NItNxGBNe6stknei9ChA7qZ
evt_1OoNEuGBNe6stkneuNI5Fn6k

#

pi_3OoNEsGBNe6stkne1agHmgnA

#

so for this payment 1

#

pi_3OoNEsGBNe6stkne1agHmgnA

#

all of them failed

#

does this mean that now tomorrow this will run 3 times

#

and I'll create 3 fiscalized invoice

#

invoices

#

for one payment

fossil obsidian
#

Now, you need to fix your webhook endpoint to respond with 2xx (successful)

#

Once Stripe delivered a successful event and your endpoint replied with 2xx status, there'll be no more retries.

gaunt hull
#

I'm now looking for evt_1OoNEuGBNe6stkneuNI5Fn6k and I see that it tried already multiple times

#

so that means following

#

I can manually now resend failed payment webhook successes and they'll execute with 200 and I'll store in array event Ids and tomorrow when they are run again I'll ignore them and return 200 so they won't re-run again.

Or I can wait tomorrow and when first retry goes 200 others for that same event wont retry again?

fossil obsidian
#

I'll store in array event Ids and tomorrow when they are run again I'll ignore them and return 200 so they won't re-run again.
No there will be no multiple retries if your endpointed responded once correctly

gaunt hull
#

The automatic retries still continue, even if you manually retry transmitting individual webhook events to a given endpoint and the attempt is successful.

#

what about this

fossil obsidian
#

Moreover, your integration need to be designed to handle duplicate events

fossil obsidian
gaunt hull
#

ok

gaunt hull
#

one more check before I go and do this

#

I want now to manually retry those 6 payments and let function do what it needs to do.

#

so if I now go and do resend for evt_1OoQ6OGBNe6stkneFO9IxnAd

and it executes correctly

#

them I'll add this in my webhook

#

to ignore them tomorrow on autoretry

#

they'll be ignored tomorrow

#

and function will return 200

#

so they won't retry ever again for that payment

fossil obsidian
#

Yes that's possible

gaunt hull
#

tnx