webhooks after server down?

206 views
Skip to first unread message

Harinath Mallepally

unread,
Jan 9, 2017, 7:44:11 AM1/9/17
to api-d...@lists.stripe.com
Hi,

For whatever reason, if my server goes down and webhooks events are not received,how the missing events need to be managed?

will the events get notified when my server come back by stripe or should I be doing explicit logic to retrieve missing events and if that is the case, are there any best practices?

could you please advice?

Thanks
Hari

Remi J.

unread,
Jan 9, 2017, 7:56:31 AM1/9/17
to api-d...@lists.stripe.com
Hey Hari,

Whenever we attempt to deliver an event to your webhook endpoint we expect a 2xx response code to indicate that you handled it properly on your end. If you respond something else, we assume that you didn't get the event which means that we will try to deliver it again every hour for up to three days before giving up on that event completely.

If your server is down longer than 3 days, some of those events won't be retried anymore. In that case, you'll need to handle those pending events yourself. The idea would be to use the List Events API [1] to loop through all the events. For each event, you can check the `pending_webhooks` property to see if that event has been successfully delivered to all endpoints or not. You can assume that if this property is set to 1, this is one of the events you haven't processed and you can then retrieve it and handle it yourself.

Hope this helps!
Remi


--
You received this message because you are subscribed to the Google Groups "Stripe API Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to api-discuss+unsubscribe@lists.stripe.com.
To post to this group, send email to api-d...@lists.stripe.com.
Visit this group at https://groups.google.com/a/lists.stripe.com/group/api-discuss/.

Harinath Mallepally

unread,
Jan 9, 2017, 8:05:41 AM1/9/17
to api-d...@lists.stripe.com
Thanks Remi, 

this helps. 


Reply all
Reply to author
Forward
0 new messages