All of a sudden a webhook in my Authorize.Net sandbox account stopped working. After some investigation, it turned that the hook became inactive in its settings. Here is how that happened:
- I registered a webhook and pointed it to a temporary postbin URL for testing.
- I triggered the webhook a few times during a few days, then when I was certain it is working, I switched its URL to a real endpoint.
- The postbin address got obsolete. Some messages, that were sent to that old address, were still in the queue (b/c I bounced them while testing the throttling).
- Since Authorize could not deliver the messages in the queue to the old address, they decided the hook is misconfigured, so they deactivated it.
- You can see the problem here: even that the webhook was valid (since I switched it to the real working endpoint earlier), it got deactivated b/c of the old messages in the queue that could not be delivered.
Obviously Authorize stores the hook URLs within the hook messages altogether and doesn’t check if the address has changed, which makes sense from the architectural point of view, although this is something you might find helpful to know.
A simple solution for Authorize.Net would be not letting the users edit the webhook endpoints. In case a new endpoint is needed, a new webhook should be created.
A simple solution for you is similar: don’t edit the webhook’s endpoint, create a new webhook instead.