Webhooks
Delivery, retries and the log
On this page
Your endpoint tells us a message arrived by answering with a 2xx status.
What to answer#
- Answer with any 2xx status (200 is fine) within 5 seconds. We wait 3 seconds to connect and 5 seconds in all.
- Anything else is a failure: another status, a time-out, or no answer. A redirect to the same site (for example http to https) is followed up to 3 times; a redirect to a different website is not followed and counts as a failure.
- Reply first and do the slow work afterwards, so a slow receiver never makes a delivery fail.
Retries#
A failed delivery is tried again automatically, up to 8 attempts in all:
| Attempt | When |
|---|---|
| 1 | Right away (just after the event). |
| 2 | 1 minute after attempt 1 failed. |
| 3 | 5 minutes after attempt 2 failed. |
| 4 | 30 minutes after attempt 3 failed. |
| 5 | 2 hours after attempt 4 failed. |
| 6 | 6 hours after attempt 5 failed. |
| 7 | 12 hours after attempt 6 failed. |
| 8 | 24 hours after attempt 7 failed. |
- After the 8th failure the delivery is given up on (it shows as "abandoned").
- If 20 deliveries in a row are given up on, the endpoint is switched off automatically and the admin tells the owner. A Super Admin can change that number (or turn the automatic switch-off off) on the Webhooks page, and switch the endpoint on again from its page. Test sends and redeliveries never count.
- Retries run from a scheduled job that belongs to the store's hosting. If it is not running, only the first attempt is made, and the Webhooks pages in the admin show a red notice: tell the store's owner. The first attempt itself can also wait for that job, for example after a bulk change or when the endpoint has just failed several times in a row.
- A message larger than 64 KB is stored cut, so it is sent once and cannot be retried or sent again.
- A retry of the same delivery has the same
X-GroKeeper-Deliveryand the same eventid. Use the eventidto ignore repeats.
The delivery log#
Every attempt is written to the Delivery log (Settings > API & webhooks > Delivery log) with the event, the endpoint, the result, the HTTP status, how long it took and the first part of your answer. Delivered attempts are kept for 30 days, failed and abandoned ones for 90 days. The log is in the store's admin: ask the store's owner to look at it with you when you are fixing a problem.
- Status: pending (waiting for its first attempt), delivered, failed (a retry may be waiting) or abandoned (given up).
- Find a delivery by endpoint, event, status or dates, or paste an event id or a delivery id.
- Redeliver sends the same event again with the same event
id, marked as sent by hand. It is one attempt with no retries, and it has a new delivery id. - Redact (Redact personal details) removes personal details from the stored message and cancels any retry still waiting. A redacted message cannot be sent again.
- Send test event (on an endpoint) sends a made-up sample with
"test": true, one attempt, no retries. - Pause an endpoint to receive nothing for now; Switch on brings it back. An endpoint that was switched off automatically shows why on its page.