A delivery is one event being sent to one webhook endpoint. Every delivery is recorded from the moment it is queued, so you can always answer “did the partner receive it, and what did they say?”

How a delivery works

  1. Something emits an event (a record is created, a flow’s Send webhook block runs, you press Send test event).
  2. Pawabase finds every enabled endpoint whose events pattern matches the event name. A pattern can use * as a wildcard: orders.* matches orders.created and orders.paid; * matches everything.
  3. A delivery is created for each matching endpoint with status pending, and sent in the background. Your app is never slowed by a slow partner.
  4. Pawabase POSTs a JSON body to the endpoint’s URL.
  5. If the endpoint answers with a 2xx status, the delivery is delivered. Anything else (a 4xx or 5xx, a timeout, a connection error) is a failed attempt and is retried.
An event is delivered to an endpoint at most once per event id. If an event is processed twice (for example after a restart), the second pass does not create a second delivery for the same endpoint.

What the endpoint receives

Each attempt waits at most 15 seconds for an answer.

Retries

A failed attempt is retried on a growing schedule: The waits vary slightly so that many failing deliveries don’t all retry at the same instant. How many attempts an endpoint gets is its Max attempts: from 1 to 10, 5 by default. An endpoint that is down for an afternoon still receives its events; with 10 attempts a delivery keeps trying for about two and a half days. While waiting for the next attempt the delivery is retrying, with the time of the next attempt shown. After the last attempt it becomes failed.
An endpoint address that points at a private network or your own machines is refused as failed straight away, without retries, so a webhook can’t be used to reach internal services. Use a public address (or a tunnel while developing).

Read the deliveries

Open Activity → Webhooks (or the endpoint itself) to see deliveries, newest first. Filter by endpoint, event, status or time. This is the first place to look when a partner says they received nothing.

Reading a failure

Redeliver

  • One delivery: open it and choose Redeliver.
  • Many, after an outage: filter to the failed deliveries (by endpoint, event, status, or since a number of minutes), choose Redeliver, and use Dry run first to see how many would be sent. Up to 500 are sent at once, and the filter can look back up to 90 days.
Each redelivery creates a new delivery with the same payload and event id. Your receiver must treat a repeated id as a duplicate.

Make your receiver safe to retry

Because the same event can arrive more than once (retries, redeliveries), receivers should be idempotent:
  1. Verify the signature first.
  2. Look up id. If you’ve already processed it, answer 200 and do nothing.
  3. Otherwise record it and do the work.
  4. Answer with a 2xx quickly. Queue slow work.

Send from a flow

To send an event to every subscribed endpoint from a flow, add the Send webhook block. See Flows.

Alert on failures

A rising number of failed deliveries is worth an alarm. The Webhooks view in Activity shows deliveries by endpoint and the busiest events.

Troubleshooting