#amrutha-webhook-retry

1 messages · Page 1 of 1 (latest)

vernal scarabBOT
analog oak
#

amrutha-webhook-retry

#

👋 @tough bridge ! When we sent an Event to your webhook endpoint we expect a 200 status code in the response to confirm you received the Event properly. If you don't reply with a 200 we will assume you didn't get the Event and we will attempt to send it again for up to 3 days. This is covered in details in our docs here: https://stripe.com/docs/webhooks/best-practices#retry-logic

When you deleted that Customer, it triggered different Events such as customer.deleted or customer.subscription.deleted but you also had previous actions on that Customer object that caused customer.updated and other Events.
The problem seems to be that your code isn't resilient to getting those Events after you deleted the Customer. So you started failing those Events and so we keep retrying them and we will for up to 3 days.

#

There's no "stop sending that Event" button unfortunately. You have 3 options here:
1/ Wait 3 days so that all retries attempts are exhausted
2/ Fix your code to properly handle Events about deleted Customers instead of crashing. You should be able to know this is a real Customer that was deleted (or ignore it) and return a 200
3/ Delete the webhook endpoint which will stop all retries. To mitigate the risk you can create a new endpoint with the same URL/config first and then delete the old one after that. Be careful, you will get a new webhook endpoint secret for signature verification which might require code change

tough bridge
#

okay, let me cross check the code and come back to you!!
Thank you so much!!