less than a minute read • Updated 9 days ago
Troubleshoot and retry failed webhooks
How to find out why a webhook failed, what automatic deactivation means, and how to resend a webhook after fixing the issue.
When a webhook can’t be delivered, Foxy retries it automatically for about an hour (see How webhooks work). If it still fails, this article shows how to find out why, what happens if a webhook keeps failing, and how to resend it once you’ve fixed the problem.
Did the event still complete?
Yes. A failed webhook doesn’t undo the event that triggered it. If it was a transaction webhook, the customer was still charged and payment will still process through your gateway as normal — the failure only means your endpoint didn’t receive (or didn’t successfully process) the notification.
Find out why a webhook failed
Failed JSON webhook deliveries aren’t added to your store’s error log, and Foxy doesn’t email you about each one. You’ll only get an email if the webhook is disabled (see below), so check the transaction’s Webhooks section whenever your system seems to be missing an event.
Legacy (v1) webhooks
Legacy webhooks report failures differently. After the final retry, an entry is added under Errors in the Foxy admin and an email is sent to your store’s email address. Each entry follows this format:
TITLE (TYPE): ERROR_MESSAGE [HTTP_CODE]
TITLE — the title of the webhook
TYPE — the type of webhook:
json,zapier, orwebflowERROR_MESSAGE — the error message received from the endpoint, trimmed to 500 characters. For a JSON webhook, this is the body of the response
HTTP_CODE — the HTTP status code of the response
Automatic deactivation of failing webhooks
If a JSON webhook keeps failing with no successful deliveries, Foxy disables it automatically and emails your store’s email address with the subject “There was an error while processing your webhook”. This stops Foxy from repeatedly sending to an endpoint that isn’t working, and gives you time to fix it.
While a webhook is disabled, nothing is sent to it — including resends — and events aren’t saved to send later. A webhook that has never delivered successfully can be disabled after its first failure, so make sure a new endpoint returns HTTP 200 before you rely on it.
To turn a webhook back on:
Resend a webhook
A resent webhook is retried automatically if it fails, just like the original delivery, and carries the Foxy-Webhook-Refeed header set to true so your endpoint can tell it apart.
Through the API, send a POST request to the fx:send_webhooks link on the transaction, subscription or customer. Include "event": "refeed" in the request body so the refeed header is set. To resend many transactions at once, use the store’s fx:send_webhooks link, which accepts a list.
Notes
The transaction’s Webhooks section lists JSON webhooks only. Legacy (v1) webhooks don’t appear there.
If you don’t manage the webhook endpoint that failed, you’ll need to share the specific error with whoever does.