Retries and journal
What happens when your server does not answer: the eight attempts, automatic disabling, the delivery journal and resending.
A delivery is the sending of a webhook event to a webhook: one or more attempts, until success or giving up.
Success and failure
An attempt succeeds when your server answers with a 2xx status within 10 seconds. Anything else is a failure:
- no answer within 10 seconds, or a network error (DNS, connection refused, invalid TLS certificate);
- a
4xxor5xxstatus; - a
3xxredirect: Kivoo does not follow it; - an address that leads to a private or local network: refused without being called.
Eight attempts
After a failure, Kivoo tries again later, more and more spaced out. The Kivoo-Delivery-Attempt header gives the attempt number.
| Attempt | Delay after the previous one | Roughly, since the event |
|---|---|---|
| 1 | immediate | 0 |
| 2 | 1 minute | 1 minute |
| 3 | 5 minutes | 6 minutes |
| 4 | 30 minutes | 36 minutes |
| 5 | 2 hours | 2 h 36 |
| 6 | 4 hours | 6 h 36 |
| 7 | 8 hours | 14 h 36 |
| 8 | 8 hours | 22 h 36 |
If the eighth fails too, the delivery has failed: Kivoo stops insisting for that event. It stays in the journal, from where you can resend it.
Events are not guaranteed to arrive in order: a retried order.paid may arrive after a more recent event. Rely on createdAt, or read the object again through the API when order matters.
Automatic disabling
A webhook that has been failing for more than three days is disabled automatically at its next final failure. The owner of the store then gets an email and a notification in the dashboard, and the webhook moves to the Désactivé automatiquement (automatically disabled) status.
A disabled webhook receives nothing, and the events of that period will not be sent to it later. Once your server is fixed, click Réactiver (enable) in its page: the next events reach it again.
You can also disable a webhook yourself, during maintenance, and enable it afterwards.
The delivery journal
The page of a webhook shows its hundred latest deliveries, kept for thirty days. For each one: the status (pending, succeeded, failed), the event, the date, the HTTP code received, the duration, the number of attempts and, when opened, the body sent and the start of the error. The body of your answers is not kept.
Resend a delivery
The Renvoyer (resend) button of a delivery creates a new delivery of the same event, sent at once; the old one stays in the journal as it was. The event keeps its id: your idempotent handling (see Verify the signature) will recognise it if it was already processed. A disabled webhook cannot receive a resend: enable it first.