Webhooks

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 4xx or 5xx status;
  • a 3xx redirect: 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.

AttemptDelay after the previous oneRoughly, since the event
1immediate0
21 minute1 minute
35 minutes6 minutes
430 minutes36 minutes
52 hours2 h 36
64 hours6 h 36
78 hours14 h 36
88 hours22 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.

On this page