-
Notifications
You must be signed in to change notification settings - Fork 84
Description
Problem
From the stripe documentation: https://stripe.com/docs/webhooks#responding-to-a-webhook
To acknowledge receipt of a webhook, your endpoint should return a 2xx HTTP status code. Any other information returned in the request headers or request body is ignored. All response codes outside this range, including 3xx codes, will indicate to Stripe that you did not receive the webhook. This does mean that a URL redirection or a "Not Modified" response will be treated as a failure.
If a webhook is not successfully received for any reason, Stripe will continue trying to send the webhook once an hour for up to 3 days. Webhooks cannot be manually retried after this time, though you can query for the event to reconcile your data with any missed events.
Right now, if everything goes OK, or we outright ignore an event, we send a 200, so the webhook won't be sent anymore.
If something goes wrong, we send a 400, so according to documentation, the webhook will be resent every 3 hours for 3 days.
That sounds like OK behavior for me, but I'm not completely sure.
Subtasks
- Figure out if the current behavior is acceptable. Change if it it is not.
- Possibly start sending a 204 (No Content) instead of 200, since the content is ignored by stripe anyway.