#shpatak - webhook events
1 messages · Page 1 of 1 (latest)
Hi there
stripe.events.list({ limit: 100, delivery_success: false })
How old are these Events you are trying to list?
Do you have a request ID I could look at?
couple of minutes
evt_3McD2UK1mDNK4xVY0LAHSRgF
I am simulating 400 server error to get list of failed events - but no success
Ah okay
I'd assume this doesn't work with the CLI
I've never tested this myself
But I would guess you need an actual endpoint here
To list by delivery_success: false
I am already listing by delivery_success
But how can i list ones that failed locally?
with the cli
I have a recurrent code which runs each 2 minutes (on dev) to check all failed events
NodeJs and CronTab
Yeah this will work fine with delivery_success since even with just the CLI those events won't fail so it is basically a no-op for delivery_success: true
You are going to need to use an actual endpoint to test here
Like an ngrok
i managed to get the list without specifying delivery_success
Right you should get all of them without delivery_success
Yeah you are going to need to use an endpoint served over HTTPS for that and not rely on forwarding via the CLI
Yeah then you are going to get a 500
If you want to test a 4xx
You need to be able to respond
There are services like ngrok that can allow you to get a public URL for your localhost that you can test with
Is there a way to let Stripe know that I've successfully handled this event after retrieving list of non-succeeded?
Once you respond with a 200 we consider delivery successful and will stop retrying the event
That's when webhook is fired
I mean when I listed all failed events -> to proces each of them and let Stipe know that they are not in the failed list anymore
shpatak - webhook events
Good question. Checking in to whether you can set this yourself
Hello 👋
Taking over as Pompey needs to step away soon
Unfortunately, there isn't really a way to mark them as "received" or "handled" as such
Okay, thank you guys