Webhook platform design
Design a provider-side outbound webhook platform - event taxonomy and catalog, payload envelope and schema versioning, an HMAC signing scheme (Standard Webhooks), at-least-once delivery with retry/backoff and dead-letter policy, subscription lifecycle states, and the developer-facing debugging surface (delivery logs, replay, test-event triggering). Use whenever the user mentions webhooks, event callbacks, push events to customer endpoints, webhook signatures, delivery retries, or a webhook consumer portal - even if they never say "webhook platform". Provider side only. Do NOT use for consumer-side retry mechanics - use samber/developer-platform-skills@api-idempotency-retry instead.
By- name:
- webhook-platform-design
- description:
- Design a provider-side outbound webhook platform - event taxonomy and catalog, payload envelope and schema versioning, an HMAC signing scheme (Standard Webhooks), at-least-once delivery with retry/backoff and dead-letter policy, subscription lifecycle states, and the developer-facing debugging surface (delivery logs, replay, test-event triggering). Use whenever the user mentions webhooks, event callbacks, push events to customer endpoints, webhook signatures, delivery retries, or a webhook consumer portal - even if they never say "webhook platform". Provider side only. Do NOT use for consumer-side retry mechanics - use samber/developer-platform-skills@api-idempotency-retry instead.
Webhook Platform Design
You are an outbound-webhook platform designer. Design how a platform notifies its customers' servers of events - what the events are, how they are signed, how delivery is guaranteed and retried, how subscriptions live and die, and how an integrator debugs a delivery that never arrived.
Svix frames the real scope: "Sending an HTTP POST is easy. Doing it reliably at scale is not." The gap between those two sentences - slow-consumer isolation, retries with backoff, dead-lettering, signing, replay protection - is what this skill designs.
A whole-surface consistency review across every surface, including this one, belongs to samber/developer-platform-skills@public-api-design-review; this skill owns the webhook surface's own design. Whether webhooks are the right surface to build at all, against the other integration-surface shapes, is samber/developer-platform-skills@api-integration-surface-strategy's call.
Memory (advised): When memory lives in a file, consider using developer-platform-context.md; if a different memory system is in use, rely on that instead. The file is an advisory reference, not a mandatory requirement. Separate task info in different sections. Remove finished tasks. Add a date to a task; no date for general project context. Some interview responses may differ between 2 tasks.
Clarifying questions
Ask these before designing anything; batch them - this is a tactical design task, not a strategy interview.
- Greenfield or retrofit? If retrofit, request the current event list, retry behavior, signing scheme, and whatever delivery logging exists.
- Scale, order of magnitude: how many subscriber endpoints (tens, thousands, more), and peak events per second? (drives fan-out isolation and whether FIFO is even discussable)
- Which consumer types will integrate: enterprise integrators, typical API developers, no-code workflow tools, or a mix? (see next section)
- Effort ceiling and data constraints: how much engineering capacity - headcount, standing on-call, operating budget - can you commit to delivery infrastructure, and may customer event data transit a third-party processor at all? (see Build vs buy)
- Deadline and payoff shape: by what date must webhooks ship, and is this a quick feature launch or the platform's compounding integration surface for years?
- Is any of the stated need actually interactive, client-facing streaming (live dashboards, chat)? That's GraphQL-subscription/WebSocket territory - complementary to webhooks, not competing. Webhooks own durable server-to-server delivery where the consumer may be offline when the event fires; subscriptions own sub-second client push where occasional loss is tolerable. A platform can legitimately ship both.
Questions 4-5 exist because the build-vs-buy and retry menus diverge sharply on time-to-effect, durability, and effort - neither ranking can be picked without them. A hard ship date promotes managed infrastructure and the shorter retry span; a compounding-surface mandate promotes the pipeline you operate and tune yourself.
If your harness has persistent memory, store the delivery contract's core decisions (guarantee, ordering position, retry schedule, ack timeout, dedup ID location, signing scheme) so a later run - a new event type, a retry-policy change, the docs pass - starts from the contract instead of re-deriving it.
Consumer sophistication
Webhook consumers are servers, whoever bought the product. The design splits by consumer sophistication, and unlike most audience splits the segments don't nest - each adds its own requirements:
- Enterprise integrators - demand the delivery contract in writing: guarantee semantics, retry schedule, signing spec, ack timeout. They will ask for FIFO and for asymmetric signing (verifying with a public key instead of holding your shared secret).
- Typical API developers - self-serve through docs and the portal. They need verification snippets that handle the raw-body pitfall, a stable per-event ID for dedup, and replay from the dashboard when their handler was broken for an hour.
- No-code consumers (workflow-automation tools) - think in catch URLs: "show me one real payload before I build against it." They never read the signing spec; they need test-event sending and visible recent deliveries far more than prose.
Serve every segment present. A design good enough for enterprise integrators still fails no-code consumers if it ships without test events and a delivery log.
Build vs buy
Decide this before step 1 - it determines whether steps 4-6 are built or merely configured. Three options, ranked:
- effort:
in-house build > self-hosted open-source webhook gateway > managed sending infrastructure - value (working delivery pipeline on day one):
managed > self-hosted gateway > in-house - control (data residency, custom semantics):
in-house == self-hosted gateway > managed- both keep event data on your infrastructure; in-house adds custom semantics at much higher cost - compliance cost:
managed > self-hosted gateway == in-house- managed triggers DPA and data-residency review, and reversing it later means re-papering contracts and migrating live endpoints; the other two keep event data on your own infrastructure equally - efficiency:
managed > self-hosted gateway > in-house - Default rung: managed sending infrastructure, when webhooks are a feature of your product rather than the product itself - the Svix/Hookdeck/Convoy class of vendor (names are citations, not requirements; evaluate whatever equivalent your ecosystem offers). Svix's own build-vs-buy estimate for replicating the feature set in-house is engineer-years, not engineer-weeks - 3-5 engineers for 6-12 months plus a standing on-call. Treat the exact figure as vendor self-interest: the build itself lands nearer a few engineer-months, most of it review and load testing. The standing on-call does not shrink, and it keeps in-house the costliest rung.
- Move up to a self-hosted gateway when compliance rules out third-party transit but you can operate the software. In that case the managed rung is deleted, not demoted: question 4 answering "customer event data may never transit a third-party processor" removes it from the menu instead of ranking it last, because a rung parked at the bottom on a compliance ground reappears as scope the next time a deadline bites - and re-appears without the legal review that ruled it out. Re-promotion trigger: a signed DPA and a residency posture that covers the vendor.
- In-house is the starved option: highest control, highest effort, loses every efficiency round. Promoted when webhook delivery is itself the product you sell, or when both third-party transit and third-party code are ruled out. Whatever you pick, every design decision in steps 1-7 still has to be made - buying infrastructure buys the machinery, not the taxonomy, contract, or docs.
- This ranking is a default, not a law. Re-rank against the interview: a hard ship date promotes managed; an in-house team already operating durable queues at scale gets the build far cheaper than the estimate, which flips the effort line.
Workflow
- Define the event taxonomy and catalog.
- Design the payload envelope and schema-versioning story.
- Adopt the signing scheme.
- Set the delivery contract: guarantees, retry policy, dead-lettering.
- Model the subscription lifecycle.
- Build the debugging surface: logs, replay, test events.
- Document everything against the five-element rubric.
Each step has a section below, in order.
1. Event taxonomy and catalog
- Name events with the Object-Action pattern:
resource.action, action in past tense (invoice.paid, neverinvoice.pay), dot-delimited, identifiers restricted to[a-zA-Z0-9_.]. This is the Standard Webhooks recommendation and the Stripe convention. Production platforms diverge on delimiter and on where the discriminator lives, so pick one convention at launch and never mix. Splitting the event name across a header and a body field, GitHub-style, means no single string names the event - avoid it. - The catalog is the contract: every event type gets a stable name, a description, and a payload schema before it ships. Subscribers select what to receive by catalog name, so an undocumented event type is effectively unsubscribable.
- Check each event against five design principles: self-contained, immutable (add fields, never repurpose), traceable, actionable, debuggable.
- Decide explicitly whether subresource events bubble to parent events (Stripe's answer: never -
customer.subscription.updatedfires nocustomer.updated). Whichever way, state it; silence here breeds subscriber assumptions.
See references/event-taxonomy-and-payload-design.md for vendor naming comparisons and the design-principle checklist applied.
2. Payload envelope and schema versioning
- Choose envelope placement deliberately: all metadata in the JSON body (Stripe), or metadata in HTTP headers with only resource data in the body (GitHub, Shopify, Standard Webhooks). Header-split designs force your delivery log to capture headers and body to replay an event faithfully - build the log for that from day one, not as a retrofit.
- Choose thin vs full payloads as a first-class axis: full payloads embed resource state; thin payloads carry identifiers and force an API fetch. Standard Webhooks recommends keeping payloads small, usually under ~20kb. Thin payloads also sidestep versioning: the notification never changes shape when the API version bumps.
- Pick one of the two schema-versioning camps deliberately: pin each webhook endpoint to an API version and render payloads per that version (Stripe's model), or version event types themselves - a new type name per breaking change, additive-only evolution otherwise (the Svix/Standard Webhooks model). Drifting into both by accident is the failure; an API version bump must never silently reshape event payloads a subscriber already stores.
- Know the standards layering - these are layers, not competitors: Standard Webhooks covers signing and delivery headers, CloudEvents covers the envelope, AsyncAPI and OpenAPI 3.1's
webhookssection cover description. Document outbound events in the same OpenAPI document as the inbound API; only adopt CloudEvents if you must interoperate with an event mesh that already speaks it.
See references/event-taxonomy-and-payload-design.md for the envelope fork in detail, the Stripe thin/snapshot dual-run migration pattern, and the standards map.
3. Signing scheme
You own the signing scheme - what is signed, how, and how consumers verify. Signing-key issuance, storage, and rotation infrastructure belong to sibling samber/developer-platform-skills@api-auth-key-management.
- Adopt the Standard Webhooks spec instead of inventing a bespoke scheme - it's the closest thing this fragmented domain has to a standard, with real (self-reported) adoption across major API platforms. Three headers on every delivery:
webhook-id,webhook-timestamp,webhook-signature. - Signature construction: HMAC-SHA256 over
{id}.{timestamp}.{raw_body}, base64-encoded, algorithm-version-prefixed (v1,...). Signing the timestamp is what buys replay protection - the receiver rejects deliveries whose timestamp falls outside a tolerance window (the spec recommends 5 minutes). A body-only signature (GitHub's and Shopify's shape) validates forever, so a captured request replays indefinitely. - Prefix secrets so leaked keys are identifiable by scanners:
whsec_for symmetric HMAC secrets,whsk_/whpk_for asymmetric ed25519 private/public keys (signature idv1a). Offer asymmetric signing for consumers who shouldn't hold a shared secret - the recommended choice when you don't control both ends. - Design zero-downtime rotation in: the
webhook-signatureheader carries multiple space-delimited signatures, so old and new secrets validate simultaneously during a rotation window. A platform with a single active secret forces subscribers into revoke-then-deploy, with a window of failed deliveries. - Your signing docs must cover the three consumer-side pitfalls that dominate integration failures:
- Verify every request without exception, even notification-only handlers.
- Verify against the raw body before any JSON parser touches it.
- Exempt the webhook route from session-auth middleware, since it authenticates by signature, not session.
See references/signing-scheme-reference.md for the worked construction, the four major non-adopters' schemes contrasted, and the rotation flow.
4. Delivery contract: guarantees, retry, dead-letter
- Promise at-least-once delivery, explicitly, as a deliberate choice: you retry until acked, so a subscriber that processes then crashes before responding 200 sees the event twice. Never claim exactly-once - every "exactly-once" claim in this market is at-least-once plus dedup tooling. Ship the honest version of that: a stable per-event ID (same value across retries of the same event) from day one, plus a documented dedup recommendation. Retrofitting the ID later can't help subscribers who already built without it.
- State the ordering position explicitly: best-effort, non-guaranteed ordering is the correct default - retries and parallel workers reorder events, and strict ordering means one failing delivery blocks the whole per-endpoint queue. Every major platform ships non-FIFO by default; offer FIFO only as an explicit opt-in for consumers who structurally cannot tolerate reordering. Warn subscribers not to infer order from timestamps.
- Decouple delivery from the request path via a durable queue, with per-endpoint isolation - one slow or broken subscriber must never delay delivery to the others. This fan-out isolation is the core value the platform sells to its own engineering team.
- Choose the retry policy - this is where real platforms diverge most:
- effort:
configurable per-endpoint schedules + circuit breaker > fixed day-scale schedule + DLQ + auto-disable > fixed hours-scale schedule > manual redeliver only - value (deliveries recovered without human action):
configurable + circuit breaker > fixed day-scale > fixed hours-scale > manual redeliver only - efficiency:
fixed day-scale schedule > fixed hours-scale schedule > configurable + circuit breaker > manual redeliver only - Default rung: a fixed exponential-backoff schedule spanning roughly a day - the shape Svix ships (8 attempts over ~27.5 hours) and Stripe approximates (up to 3 days); Shopify's 8 tries over 4 hours marks the short end. Size the total span against real subscriber incident durations - a deploy takes minutes, an outage can take hours - not a round number. Exponential, never linear: constant-interval retries hammer a struggling endpoint.
- Promote to configurable schedules plus a circuit breaker (half-open probing before resuming, Convoy-style) when endpoint count grows large enough that sustained-failing endpoints materially load the pipeline, or when enterprise consumers negotiate delivery SLAs. High value, high effort - the starved option that those two conditions promote.
- Manual redeliver only (GitHub's model: zero automatic retries) is a named anti-pattern, not a minimalist rung - it works for GitHub only because a deliveries-list-plus-redeliver API and explicit "build your own reconciliation" docs ship with it. Copying the zero without the API is just shipping unreliable delivery.
- This ranking is a default, not a law - re-rank on the interview: a mostly no-code consumer base devalues configurability nobody will touch; a payments-grade domain promotes the longer span and the circuit breaker.
- effort:
- Classify subscriber responses instead of treating them alike:
- 2xx acks and stops retries. Expect the ack within ~10 seconds, the Shopify/GitHub convention.
- Treat "handler is slow" as distinct from "handler errored" - a subscriber that queues the work and returns fast is doing exactly what you should tell it to.
- Honor a
Retry-Afterheader on 429 over your own backoff curve - most senders don't, and it's a differentiator. - Send non-retriable 4xx (anything but 408/429) straight to the dead-letter queue - retrying a permanent failure wastes the budget and looks like an attack.
- Dead-letter on exactly two triggers:
- Retry budget exhausted.
- A non-retriable error class. Retain dead-lettered events 7-30 days with full context (headers included) for investigation and replay. After sustained failure, auto-disable the endpoint and notify the subscriber out-of-band - email or dashboard, since the webhook channel itself is what's broken.
- Recommend consumers of high-stakes event types run periodic reconciliation against your API - vendor-endorsed practice, not a workaround. Your docs setting that expectation is more honest than implying delivery is stronger than at-least-once/best-effort actually promises.
See references/retry-policy-vendor-comparison.md for the six documented vendor schedules, timeout values, auto-disable behaviors, and the circuit-breaker reference design.
5. Subscription lifecycle
Model the subscription (endpoint registration) as a first-class stateful object with full CRUD - never fire-and-forget registration. Give it three explicit states:
- active
- paused - subscriber-initiated stop without losing configuration
- disabled - platform-initiated after sustained failure
The three infrastructure-focused vendors converge on this richer model; binary enabled/disabled is the thinner shape platforms launch with and outgrow. Expose only states a customer-created subscription can legally reach - reject internal-only states at the API boundary.
Keep filtering's two axes independent: event type (against the catalog) and recipient/channel scoping. An endpoint with no filter receives everything - say so.
Specify both replay positions: where a newly created subscription starts (new events only vs retained backlog), and where a subscription resumes after a platform-side incident. They can legitimately differ. Document loudly that deleting a subscription destroys its replay/delivery state - recreating it under the same name starts fresh, and a subscriber deleting-to-reset will silently lose or double-replay a backlog.
Document config-change propagation lag as expected behavior (a subscription edit taking a minute or two to reach the delivery path is normal), so integrators don't file it as a bug.
See references/subscription-lifecycle-comparison.md for the six-vendor state/filtering/replay comparison and the state-machine case study.
6. Debugging surface
A self-service consumer portal is table stakes in this market, not a nice-to-have - flag "no portal" the way you'd flag a missing signature-verification doc. The portal carries:
- Delivery logs: filterable by endpoint, event type, and status, with per-attempt inspection (request headers, body, response code, timing). If your envelope splits metadata into headers (step 2), the log must store them or replay is unfaithful.
- Replay and retry, as distinct operations - adopt Hookdeck's terminology verbatim, because the market uses the words interchangeably and your docs shouldn't: a retry is a new delivery attempt of the same event; a replay re-ingests the original as a new event. Offer single-event and range replay; gate a large replay window behind a cost confirmation, since replaying a big backlog is an expensive operation the subscriber may not intend.
- Test-event triggering: a "send example event" action driven by each event type's schema, so an integrator sees one realistic payload before writing a line of handler code - the same job a no-code tool's catch-URL solves from the consumer side. Test triggering in a sandbox environment (fake data, test-mode keys) is sibling
samber/developer-platform-skills@api-test-mode-design's ground; this skill owns the delivery-side button and the example payloads it sends. - Failure visibility: surface exhausted deliveries as incidents to investigate - grouped by endpoint and status code, with notification - rather than rows in a queue. Document the 200-then-crash blackhole: a handler that acks then throws has told you delivery succeeded, and no debugging surface can see inside it.
See references/subscription-lifecycle-comparison.md for what each vendor's portal and testing tooling actually ships, as the benchmark to match.
7. Documentation
Grade your webhook docs against the five-element rubric the market's best docs are graded on, all five before launch:
- Signature verification with runnable snippets.
- The event catalog with schemas and example payloads.
- The retry policy - exact schedule, not "we retry with backoff".
- Troubleshooting and failure recovery.
- Testing tools.
State the delivery contract as explicit, findable sentences:
- The guarantee (at-least-once).
- The ordering position.
- The retry schedule.
- The ack timeout.
- Which header or field carries the dedup ID.
Every one of these left implicit becomes a subscriber assumption, then a support ticket. Publish the event catalog from the same spec that drives delivery (OpenAPI 3.1 webhooks section) so docs and payloads can't drift apart silently.
Failure modes
Anti-pattern checklist - each is a direct audit finding:
- Zero automatic retries without a deliveries-list-plus-redeliver API and reconciliation docs shipping alongside.
- "Exactly-once delivery" claimed anywhere in the docs.
- Ordering guaranteed implicitly (or subscribers left to assume it) instead of an explicit best-effort statement.
- Linear retry intervals, or retrying non-retriable 4xx responses until the budget exhausts.
- A signature over the body only - no timestamp, so no replay protection.
- One active signing secret, forcing revoke-then-deploy rotation.
- No stable per-event ID across retries of the same event.
- A delivery log that stores only the body while the envelope carries metadata in headers.
- An API version bump silently reshaping event payloads existing subscribers already store.
- Delete-and-recreate of a subscription silently resetting its replay position.
- Slow-but-correct handlers (queue fast, ack fast) treated as failures because the timeout and the queue-fast advice were never documented.
- No consumer portal: no logs, no replay, no test events.
Measurement
Two binary gates - iterate the design until both pass:
- Contract completeness: the guarantee, ordering position, retry schedule, ack timeout, and dedup ID location are each explicitly documented. Five facts, all present - a missing one fails the gate, because each absence is a subscriber assumption waiting to become an incident.
- Documentation rubric: all five rubric elements exist before launch. Any missing element fails the gate.
Operational metrics to stand up, watched as trends rather than pass thresholds:
- Per-endpoint delivery success rate - the platform's headline health number.
- Dead-letter rate - a spike means an endpoint in sustained failure, distinct from background transient retries.
- Time-to-detect a failing endpoint - bounded by your auto-disable/notification window. Set the baseline from your first month and improve against it rather than against an external threshold.
Invocation examples
- "We're adding webhooks to our billing API - design the event catalog, signing, and retry policy from scratch."
- "Our webhook system retries three times in a row then drops the event, and customers keep missing deliveries - redesign the retry and dead-letter policy."
- "Enterprise customers are asking how our webhooks are signed and whether we guarantee ordering - write the delivery contract we should be able to show them."
References
references/event-taxonomy-and-payload-design.md - naming conventions across vendors, envelope placement fork, thin vs full payloads, schema-versioning camps, standards map.
references/signing-scheme-reference.md - Standard Webhooks construction worked example, non-adopter scheme contrast, rotation flow, consumer-pitfall checklist for your docs.
references/retry-policy-vendor-comparison.md - six vendors' documented retry schedules, timeouts, auto-disable behavior, dead-letter and circuit-breaker patterns.
references/subscription-lifecycle-comparison.md - endpoint states, filtering, replay/backfill, and portal/testing tooling across six vendors, plus a subscription state-machine case study.
samber/developer-platform-skills@api-idempotency-retry- general retry and idempotency mechanics (backoff algorithms, idempotency keys) on the API's request side; this skill applies those ideas to outbound delivery only.samber/developer-platform-skills@integration-error-observability- how integration errors surface to the developer beyond the webhook delivery log.samber/developer-platform-skills@api-status-communication- incident and status-page communication when delivery failures are the platform's fault.samber/developer-platform-skills@api-versioning-policy- the versioning machinery behind step 2's event-schema evolution choice.samber/developer-platform-skills@api-error-design- the error surface of the subscription-management API itself.samber/developer-platform-skills@public-graphql-api-design- GraphQL subscriptions, the complementary push mechanism named in question 6: first-party live UI over sub-second push, versus this skill's durable server-to-server delivery.
Open this reference as its own page
Event taxonomy and payload design
Vendor comparisons and worked detail behind SKILL.md steps 1-2.
Naming conventions in production
| Platform | Convention | Example | Note |
|---|---|---|---|
| Stripe | resource.action, dot-delimited |
charge.succeeded, customer.subscription.updated |
No domain prefix; subresource events never bubble to parent events |
| Shopify | resource/action, slash-delimited |
orders/create, app/uninstalled |
|
| GitHub | Split: header + body field | X-GitHub-Event: issues + "action": "opened" |
No single string names the full event - the shape to avoid |
| Standard Webhooks | resource.action, identifiers [a-zA-Z0-9_] |
invoice.paid |
Closest to Stripe's convention; the recommended default |
| Svix | First-class event-type objects with attached JSON Schema | - | Auto-generates the Event Catalog from them |
Recommended: Object-Action, past tense (invoice.paid, not invoice.pay), dot notation for hierarchy, optional domain prefix for grouping. Reject underscore-joined or verb-first names (user_update, invoiceWasPaid) - inconsistent and harder to filter and route on.
Event design principles (checklist per event type)
- Self-contained - include what a consumer needs; don't force a callback to the API just for context (thin payloads are a deliberate exception, chosen platform-wide, not per event).
- Immutable - never modify a schema after events of that type have shipped; add fields, never repurpose them. Stripe goes further: an Event object, once created, never changes - a later update to the resource produces a new Event.
- Traceable - correlation IDs, audit-trail fields.
- Actionable - enough context for the consumer's business logic, not just an ID.
- Debuggable - source, environment, originating trigger in metadata.
Minimal envelope
Required: type (the catalog name) and data (the payload). Valuable: a unique event id (the dedup key), a timestamp, and a schema-version marker. Where each of these lives is the envelope-placement fork below.
Envelope placement: body-only vs header-split
- Body-only (Stripe): everything -
id,type,api_version,created,data- lives in one top-level JSON object. The full event is self-contained in a single payload dump for logging. - Header-split (GitHub, Shopify, Standard Webhooks/Svix): metadata rides HTTP headers (
webhook-id,webhook-timestamp, or vendor equivalents); the body carries{type, timestamp, data}or just the resource. CloudEvents' "binary" content mode standardizes the same split viace-*headers; its "structured" mode is the all-in-body alternative.
The consequential difference: a header-split design means your delivery log and replay feature must capture headers and body to reproduce an event faithfully. Decide the fork before building the log, not after.
Thin vs full payloads
- Full (snapshot): embed the resource state as of the event. Self-contained, but the payload shape is coupled to your API version.
- Thin: identifiers only; the consumer fetches the resource. Smaller (Standard Webhooks recommends staying under ~20kb), and the notification never changes shape when the API version bumps - the version question moves to the API call the consumer makes.
Migration pattern (Stripe's snapshot-to-thin transition): emit both event flavors together during the transition and stamp a discriminator field on the payload so consumers can dual-run idempotently. Reusable for any full-to-thin move made after launch.
Schema versioning: the two camps
- Pin the consumer to an API version (Stripe): each webhook endpoint is pinned to an account API version and payloads render per that version. Upgrading the account version changes what existing webhooks receive - which is exactly the hazard to manage. Retrieving an old event under a newer version does not retroactively reshape it.
- Version the event type (Svix / Standard Webhooks): a new event-type name per breaking change (
v1.customer.created→v2.customer.created), additive-only evolution otherwise. The type name is the version marker; no out-of-band version applies.
Both solve the same problem. Pick one deliberately - drifting into both by accident, or letting an API version bump silently reshape stored payloads, is the failure mode. GitHub and Shopify version payload shape implicitly with the overall (date-versioned) API - the ambient default a deliberate choice replaces.
Standards map (layers, not competitors)
| Standard | Layer | What it gives you |
|---|---|---|
| Standard Webhooks | Signing + delivery headers | Interoperable signature scheme; near-zero adoption cost |
| CloudEvents (CNCF-graduated) | Envelope | id/source/type/specversion attributes; HTTP/Kafka/AMQP/MQTT bindings; low real-world adoption for consumer-facing webhooks despite graduation |
| AsyncAPI | Description language | Documents channels and message schemas; never on the wire; can describe WebSocket channels too |
OpenAPI 3.1 webhooks |
Description language | Outbound events documented in the same spec as the inbound API - the recommended documentation home |
| WebSub (W3C) | Pub/sub protocol | Content-syndication oriented; rarely relevant to transactional B2B webhooks |
No ratified W3C/IETF transactional-webhook standard exists. Practical layering for a new platform: Standard Webhooks for signing/delivery, whichever envelope placement fits your API conventions, OpenAPI 3.1 for description - and full CloudEvents only to interoperate with an event mesh that already speaks it.
Open this reference as its own page
Retry policy: vendor comparison
Documented schedules behind SKILL.md step 4's ranked menu. Retry policy is the single sharpest divergence axis between real webhook platforms - the delivery guarantee, signing algorithm, and ordering stance all converge; this doesn't.
Documented schedules, six vendors
| Vendor | Automatic retries | Span | Timeout | After exhaustion |
|---|---|---|---|---|
| Stripe | Exponential backoff (live mode) | Up to 3 days (test mode: 3 tries over a few hours) | - | Endpoint auto-disabled after ~3 days of failure, with notification |
| GitHub | None | - | 2xx expected within 10s | Manual: UI redeliver (3-day window) or REST Deliveries API (30-day listing) |
| Shopify | 8 retries, exponential backoff | 4 hours (policy current since Sept 2024) | 5s response + 1s connect | Subscription auto-deleted after 8 consecutive failures; warning email to the app's emergency address. Declarative (TOML) subscriptions restore on next deploy; Admin-API-created ones do not |
| Svix | 8 attempts, exact schedule: immediately, +5s, +5m, +30m, +2h, +5h, +10h, +10h | ~27.5 hours | ~15s | DLQ; consistently failing endpoints disabled with notification |
| Hookdeck | Configurable: linear or exponential, up to 50 automatic retries | Configurable | - | Exhausted deliveries surface as "Issues" (grouped incidents), unlimited manual retries |
| Convoy | Two algorithms: constant-time or exponential-with-jitter; per-endpoint rate limiting | Configurable | Configurable | Batch retry for consecutively failing endpoints; true circuit breaker (below) |
Staleness warnings baked into the table: Shopify's widely-cited "19 times over 48 hours" is the pre-Sept-2024 policy - any source repeating it is stale. Stripe's manual Dashboard resend does not cancel the still-running automatic schedule; the two run independently.
Policy mechanics
- Backoff formula:
delay = base_delay * (2 ^ attempt_number), with jitter. Linear intervals are actively harmful - they hammer a down endpoint continuously and worsen an active rate-limit response. - Failure classes differ in duration, so size the total span against them: a network blip resolves in milliseconds, a deployment in minutes, an infrastructure outage in hours. A schedule ending before a realistic outage ends dead-letters events the subscriber would have recovered.
- Not everything retries: non-retriable 4xx (anything except 408/429) skips the budget and dead-letters immediately - retrying a permanent failure wastes resources and can look like an attack to the receiving endpoint. A 429 with
Retry-Afteris retried at the receiver's stated delay, overriding your own curve. - Queue-first is the prerequisite: POSTing webhooks from the main application thread collapses under load; delivery decouples from the event-producing request path via a durable queue before any retry policy matters.
Dead-letter policy
- Exactly two triggers: retry budget exhausted, or a non-retriable error class.
- Retention: 7-30 days, preserving full event context (headers included) for investigation and replay.
- Dead-letter rate is the headline operational metric - a spike signals an endpoint in sustained failure, distinct from background transient retries.
- The "Issues" framing (Hookdeck): treat an exhausted delivery as an operational incident to investigate - grouped by endpoint and status code, surfaced to a human with notification - rather than a message sitting in a queue behind a bare replay button.
- Test the recovery path on a schedule: inject failures, verify events land in the DLQ, practice the replay - the path decays if untested.
Circuit breaker (the promoted rung's reference design)
Convoy ships the only true half-open circuit breaker among the six: a volume threshold and error-ratio threshold trip it, a timeout parameter holds it open, and an automatic probe delivery tests recovery before resuming full traffic. Contrast with the common simpler mechanisms - Stripe's auto-disable and Shopify's auto-delete are one-way doors requiring subscriber action to reopen. The circuit breaker matters at scale: without it, every sustained-failing endpoint consumes its full retry budget on every event, and a platform with thousands of endpoints pays that continuously.
Why "no retries" is a named anti-pattern, precisely
GitHub ships zero automatic retries and survives it only because two compensations ship alongside: a deliveries-list API with a redeliver endpoint (so consumers can build a scheduled poll-and-redeliver script), and documentation that explicitly assigns reconciliation to the consumer. That pushes 100% of reliability engineering onto every integrator - defensible for GitHub's developer-heavy audience, and still the sharpest outlier surveyed. A platform copying the "no retries" half without the API-and-docs half is not shipping a minimalist design; it is shipping unreliable delivery.
Reconciliation as an endorsed practice
For high-stakes event types (payments is the canonical example), recommend consumers periodically diff processed events against your API's own records - if the API shows state changes the consumer never processed, events were lost in a way retries and the DLQ didn't catch. Shopify's docs recommend exactly this as the primary defense rather than treating gaps as a bug to fix - set the same honest expectation.
Open this reference as its own page
Signing scheme reference
Worked detail behind SKILL.md step 3. Spec: Standard Webhooks (standard-webhooks.com, spec at github.com/standard-webhooks/standard-webhooks) - community-driven and vendor-neutral, with self-reported adoption by OpenAI, Anthropic, Google Gemini, Kong, Svix, Supabase, Twilio, PagerDuty, and others. Treat that list as directional (claimed, not audited), but it is the closest thing this domain has to a standard.
Standard Webhooks construction
Three headers on every delivery:
webhook-id: msg_2KWPBgLlAfxdpx2AI54pPJ85f4W
webhook-timestamp: 1706100000
webhook-signature: v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj9o9NDN/H/pI4=
Signature computation:
signed_content = "{webhook-id}.{webhook-timestamp}.{raw_body}" # literal dots
signature = base64( HMAC-SHA256( secret, signed_content ) )
header value = "v1," + signature
Verification on the receiving side recomputes the HMAC from the raw body and, separately, rejects deliveries whose webhook-timestamp is older than a tolerance window - the spec recommends 300 seconds. Without the timestamp check, a captured legitimate request replays indefinitely: the signature proves authenticity, not freshness.
Secret formats
- Symmetric HMAC secret: 24-64 random bytes, base64-encoded, prefixed
whsec_; signature idv1. - Asymmetric ed25519: private key prefixed
whsk_, public key prefixedwhpk_; signature idv1a.
The prefix makes a leaked key immediately identifiable as a webhook secret by scanning tools - a pattern worth copying even without adopting the full spec. Offer asymmetric signing when you don't control both ends: the consumer verifies with a non-secret public key instead of holding your shared secret. A single provider can support both modes simultaneously.
Zero-downtime rotation
webhook-signature carries multiple space-delimited <version>,<signature> pairs; the receiver verifies against any of them. Rotation flow:
- Issue the new secret; sign every delivery with both old and new.
- Subscriber deploys the new secret and confirms verification passes.
- Revoke the old secret only after confirming delivery success under the new one.
There is no cutover moment where a request fails to verify. Because the scheme is uniform, verification can also live once at an API-gateway layer instead of per-integration in application code.
How the major non-adopters sign (contrast table)
| Provider | Header | Content signed | Encoding | Replay protection | Rotation |
|---|---|---|---|---|---|
| Stripe | Stripe-Signature (t=<ts>,v1=<sig>) |
"{timestamp}.{raw_body}" |
hex | Yes (timestamp) | Roll secret, up to 24h dual-validity |
| GitHub | X-Hub-Signature-256 (sha256=<sig>) |
raw body only | hex | None - consumers track the X-GitHub-Delivery GUID instead |
None - manual reconfigure with a gap |
| Shopify | X-Shopify-Hmac-SHA256 |
raw body only | base64 | None | Client-secret change with up to ~1h propagation lag |
| Convoy | X-Convoy-Signature |
"simple" (body) or "advanced" (Stripe-style with timestamp) | hex | Opt-in via mode | Rolling secrets with explicit expiry |
The pattern to learn from the weak rows: a body-only signature has no replay protection and usually no overlap rotation. GitHub's and Shopify's schemes predate the convergence - don't copy them for a new platform.
Consumer pitfalls your signing docs must cover
These dominate real integration failures; document them explicitly rather than assuming they're obvious:
- Verify every request, no exceptions - a handler that "only" posts to chat still triggers arbitrary side effects on a spoofed event.
- Verify against the raw body - a framework's JSON body-parser re-serializes the body before the check runs and breaks the HMAC (e.g. Express needs
express.raw({ type: 'application/json' })on the webhook route specifically). - Exempt the webhook route from session-auth middleware - the route authenticates by signature; uniform auth middleware 401s it before the handler runs.
Open this reference as its own page
Subscription lifecycle and debugging surface: vendor comparison
Detail behind SKILL.md steps 5-6. The clearest pattern in this data: the three infrastructure-only vendors (Svix, Hookdeck, Convoy) converge on richer states, deeper filtering, true replay, and a full portal, while the platforms where webhooks are one feature among many (Stripe partially, Shopify, GitHub) ship the thinner model. Treat the infrastructure-vendor shape as the target state; the thinner shape is what most teams launch with and outgrow.
Endpoint states
| Vendor | States | Notes |
|---|---|---|
| Stripe | enabled / disabled | Auto-disabled after the ~3-day retry window |
| GitHub | active / inactive | Binary |
| Shopify | active until auto-deleted | 8 consecutive failures deletes an Admin-API-created subscription; TOML-declared ones restore on deploy |
| Svix, Hookdeck, Convoy | active / paused / disabled | Plus auto-disable-with-notification on sustained failure - the model to default to |
Case-study lesson on state design (Salesforce's managed event subscriptions): valid states are run and stop; an internal pause state exists but user-created subscriptions are rejected from setting it. The transferable rule: choose the states a customer-created subscription may legally reach, and reject internal-only states at the API boundary rather than exposing them.
Replay positions (same case study)
Two independently configured positions, each taking "latest" (new events only) or "earliest" (full retained backlog):
- Default replay - where a newly created subscription starts reading.
- Error-recovery replay - where a subscription resumes after a platform-side incident, as distinct from a normal restart.
These can legitimately differ; specify both.
- Deleting a subscription permanently destroys its replay-tracking state - recreating under the same name restarts from the default position, so a subscriber deleting-to-reset silently loses or double-replays a backlog.
- Activating a full-backlog replay on a high-volume channel can mean days of replay traffic - gate it behind an explicit confirmation.
- Config changes can take a minute or two to propagate to the delivery path; document that as expected, not a bug.
Replay and backfill capability
The sharpest capability split in the domain:
- Stripe: Events API lists/retrieves 30 days, supports resend; documents polling the resource API to backfill missed objects.
- Svix: portal replay of individual messages or ranges; polling endpoints iterate the entire event history.
- Hookdeck: permanent event log, bulk pause/cancel/replay via API. Source of the terminology worth adopting verbatim: retry = a new delivery attempt of the same event; replay = re-ingesting the original request as a brand-new entity that produces new events.
- Convoy: persists all events; UI + API manual and batch retry.
- Shopify: no native replay or backfill - the documented mitigation is a consumer-side reconciliation job.
- GitHub: UI redeliver (3-day window) or Deliveries API (30-day listing); no true backfill.
Filtering and fan-out
Two independent filtering axes - keep them separate in the design:
- Event type - selection against the catalog (Stripe's
enabled_events, Shopify's one-subscription-per-topic). - Recipient/channel scoping - an orthogonal dimension for sub-grouping deliveries (per-tenant, per-repo, per-project). Svix models this as "channels", off by default, filtered independently of event types; Hookdeck and Convoy route on richer rule/payload-structure criteria.
Filtering is producer-side: an endpoint with no filter configured receives everything - state that explicitly. Multi-endpoint fan-out is universal (Standard Webhooks recommends multiple endpoints per consumer as a resilience pattern); one event fans out to every matching endpoint, each delivered and retried independently, so one slow or broken endpoint never blocks the others.
Portal and testing tooling benchmark
What the A-grade debugging surface actually ships, per vendor:
- Stripe CLI - the reference for code-first consumers:
stripe listen --forward-to localhost:PORT(stable CLI-issued signing secret) plusstripe trigger <event>firing a realistic example event on demand. - Svix App Portal - the most complete consumer portal, embeddable and brandable: event catalog with schemas and example events, a schema-driven "send example webhook" button, filterable logs, per-attempt inspection, message replay.
- Hookdeck - real-time visual delivery traces; exports latency/error-rate metrics to an external observability stack; config-as-code via API/Terraform.
- Convoy - embeddable customer-facing dashboard (iframe or white-label) with email and chat failure notifications built in.
- GitHub - no first-party trigger command; sends an automatic "ping" event on webhook creation (a pattern worth copying: the subscriber verifies wiring without waiting for a real event).
Local tunneling and inspection (ngrok-class tunnels, request-inspection sites) are a shared consumer-side ecosystem - your docs should point at the category rather than build it, unless you ship a first-party CLI tunnel.
No-code consumers arrive with the catch-URL mental model from workflow-automation tools: a temporary URL captures one real payload so they can map fields before building logic, and a frequent production bug is a sender left pointed at the test URL after setup. Your test-event feature is the provider side of that same job - design and document it assuming this mental model, and make test deliveries clearly distinguishable from live ones.
More in this playbook
Safe to turn on
Use this skill when an agent or person is about to create, change or enable an automation inside someone else's account or a shared environment: "create this workflow", "build it in the customer's account", "turn it on", "go live", "deploy this automation". Produces a proposal the human approves, an automation created in the off state, and a short list of what only the human can finish.
Workflow buildingMITn8n agents
Design n8n AI agents the right way. Use when building or editing any @n8n/n8n-nodes-langchain.* AI node — an AI Agent, LLM chain, Text Classifier, or Information Extractor — and whenever the user mentions AI agents, LLM with tools, tool calling, $fromAI, system prompts, agent memory, sessionId, structured/JSON output, output parser, RAG, vector store, a chat assistant/bot, or human-in-the-loop review. Covers Agent-vs-chain-vs-classifier choice, the model/memory/tools/outputParser slots, tool names/descriptions as prompt, structured output with autoFix, memory, RAG, human review, and chat topologies.
Workflow buildingMITn8n agents
Design n8n AI agents the right way. Use when building or editing any @n8n/n8n-nodes-langchain.* AI node — an AI Agent, LLM chain, Text Classifier, or Information Extractor — and whenever the user mentions AI agents, LLM with tools, tool calling, $fromAI, system prompts, agent memory, sessionId, structured/JSON output, output parser, RAG, vector store, a chat assistant/bot, or human-in-the-loop review. Covers Agent-vs-chain-vs-classifier choice, the model/memory/tools/outputParser slots, tool names/descriptions as prompt, structured output with autoFix, memory, RAG, human review, and chat topologies.

