#robotlos_webhook-events-resend
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/1220785278093103124
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi ๐
Stripe will not attempt to deliver webhook events that occurred while your endpoint ws disabled or not listening to those event types.
What are you attempting to do?
We need to do some maintenance to our API and need to take it down for some time.
So I was hoping that if we disable the webhook endpoints stripe would send/re-send us any events during that were not sent during this time.
You can use the API and the CLI to resend events
Right but would rather not have to do that and how would we need know which events to resend?
You could use the Events List API to provide a list of all webhook events that occurred while your endpoint was offline
https://docs.stripe.com/api/events/list#list_events-created
Is there an easier approach or is this the only way?
That approach seems pretty easy to me but if you want something more automatic you could create a new webhook endpoint that handles the traffic while your main API is down
But honestly I think getting the list of Events from the API for the time your API is down and then passing each event through the business logic you are currently using to handle those events is a pretty straightforward approach
Got it, how can I do it with the CLI or API is preferred?
If you need your webhook endpoint to receive the events, then you first use the API to get all the event IDs and then you use the CLI to resend them one by one. https://docs.stripe.com/cli/events/resend#events_resend-webhook-endpoint
That would be a more involved approach but it would be certain the events are processed exactly as if you were never offline.
The approach I would take is to just List the events themselves and then process each event object.
But I built my webhook handling so that I can call the function I use to handle webhook events without having to send the event to a specific URL. If your integration is not built that way it might be more difficult
Yes, for our integration we might need to just resend the events.