Webhook Delivery Flow
A webhook delivery flow describes how a platform notifies an external system about an event — by making an outbound HTTP POST request to a pre-configured URL — including payload signing for authenticity verification and the acknowledgement protocol.
A webhook delivery flow describes how a platform notifies an external system about an event — by making an outbound HTTP POST request to a pre-configured URL — including payload signing for authenticity verification and the acknowledgement protocol.
What the diagram shows
This sequence diagram traces webhook delivery from event emission to consumer acknowledgement across four participants: Source System (the platform emitting events), Webhook Dispatcher (the delivery worker), Signing Service (HMAC payload signing), and Consumer Endpoint (the subscriber's HTTP server).
1. Event occurs: a business event fires in the source system — e.g., payment.succeeded, user.created, or order.shipped. 2. Event persisted: the event is persisted to an outbox table or event store before dispatch begins, guaranteeing at-least-once delivery even if the dispatcher crashes. 3. Dispatch queued: the webhook dispatcher picks up the event from the outbox. 4. Payload signed: the dispatcher generates an HMAC-SHA256 signature of the JSON payload using a per-consumer secret key and includes it in the X-Webhook-Signature header. 5. HTTP POST delivered: the dispatcher sends a POST to the consumer's registered endpoint with the signed payload. 6. Consumer validates signature: the consumer recomputes the HMAC and compares it to the header — rejecting the request if they don't match (prevents spoofed webhooks). 7. 2xx acknowledgement: the consumer processes the event and returns a 200 OK within the timeout window (usually 5-30 seconds). 8. Failure path: non-2xx responses or timeouts trigger the retry strategy — see Webhook Retry Strategy.
Why this matters
Webhooks invert the polling model: instead of your system repeatedly asking "did anything happen?", the source system pushes events as they occur. Payload signing is essential — without it, anyone who knows your webhook URL can send fake events. The outbox pattern guarantees no events are lost between the business transaction and delivery.