Skip to content
Proudly Canadian, serving Windsor to Toronto, Ontario · clients welcome from every countryContact usClient login
CodeLumaDevelopment Inc.

Home / Blog / Article

CodeLuma insights · May 5, 2026 · 6 min read

How to Build and Document a Reliable Webhook System for Third-Party Partners

Design a webhook system that partners trust: event catalogue, payload design, signing, delivery guarantees, retries, ordering, replay, rate limits, subscriptions, testing tools and documentation.

Webhooks are how your platform tells the outside world that something has happened. When an order is paid, a subscription renews or a document is signed, a partner's system receives an HTTP request and can react immediately, instead of asking repeatedly whether anything has changed. They are simple in concept and surprisingly tricky in practice. If your webhooks are unreliable, partners lose data and lose trust; if they are well designed, they become a foundation for an ecosystem. This guide covers the design and documentation of outbound webhooks for third parties. For the receiving side, see our guide to connecting stores to ERP and CRM.

A reliable outbound webhook pipeline stores events durably before delivering them.
A reliable outbound webhook pipeline stores events durably before delivering them.

Decide what events to expose

Build an event catalogue that reflects business facts partners care about: customer.created, order.paid, subscription.canceled, document.signed. Name events consistently, use the past tense for things that have happened, and include the entity type and action. Start with the events integrators ask for most, and avoid exposing every internal state change. Each event should be meaningful, stable and documented. Let subscribers choose which events they receive, so they are not flooded with irrelevant traffic.

Network cables plugged into a switch
Original CodeLuma 3D render: network cables plugged into a switch.

Design the payload

A webhook payload should be self-describing and predictable:

  • A unique event ID for deduplication, an event type, a creation timestamp and an API version.
  • The relevant object data, either a full snapshot or a minimal reference, with the trade-off in mind. Full snapshots are convenient but can be stale by the time they are processed; references require the partner to call your API for the latest state. Many providers send a compact snapshot and encourage re-fetching for critical actions.
  • Consistent formats for dates, amounts and identifiers.
  • Only the data the subscriber is authorised to see, and never secrets.

Version payloads so that changes do not break integrations. Adding fields is safe; removing or repurposing them requires a new version and a migration period.

Sign every request

Recipients need to know a request really came from you and was not tampered with or replayed. Give each subscription a secret, and sign the payload, typically with HMAC-SHA256 over the timestamp and the raw body, sending the signature and timestamp in headers. Recipients recompute the signature and compare it in constant time, and reject requests with old timestamps to prevent replay. Support secret rotation with an overlap period so partners can change secrets without downtime. Document verification with working code samples in popular languages; it is the step integrators most often get wrong.

Deliver reliably

Partners' servers go down, deploy, time out and return errors. Your system must cope:

  1. Use the outbox pattern. Write the event to your database in the same transaction as the change that caused it, then a separate process delivers it. This guarantees that no event is lost or emitted for a rolled-back change.
  2. Deliver asynchronously from a queue, per subscriber, so one slow endpoint does not block others.
  3. Set sensible timeouts, such as five to ten seconds, and treat any 2xx response as success.
  4. Retry with exponential backoff and jitter over hours or days, for example immediately, then one minute, five minutes, thirty minutes, several hours, up to a maximum. Publish the schedule.
  5. Disable persistently failing endpoints after a long period, notify the owner and allow easy re-enabling and replay.
  6. Protect your platform: limit concurrency per endpoint, cap payload size and validate destination URLs to prevent server-side request forgery, for example by refusing internal IP ranges and requiring HTTPS.

Explain the guarantees honestly

Webhooks provide at-least-once delivery: an event will be delivered at least once, but possibly more than once, and not necessarily in order. State this plainly in the documentation and tell partners how to cope. They should deduplicate using the event ID, design handlers to be idempotent, use timestamps or object versions to ignore stale updates, and fetch the latest state when order matters. If you can guarantee ordering per object, say so, and describe how. Encourage partners to acknowledge quickly and process asynchronously, because slow handlers cause timeouts and duplicate deliveries.

Clear documentation on delivery behaviour is what makes a webhook system usable.
Clear documentation on delivery behaviour is what makes a webhook system usable.

Give partners self-service tools

A partner-facing dashboard dramatically reduces support load. Let subscribers create and edit endpoints, choose events, view and rotate secrets, see a log of recent deliveries with request, response and status, resend individual events or replay a time range, and send test events on demand. Show clear failure reasons such as timeouts, DNS errors, certificate problems or non-2xx responses. A downloadable event log or an API to list past events lets partners recover if their system missed messages for a while.

A project agreement and pen on a desk
Original CodeLuma 3D render: a project agreement and pen on a desk.

Monitor your own delivery pipeline

Track delivery latency from event creation to first attempt, success rate per endpoint and overall, retry counts, queue depth, oldest undelivered event and dead-letter volume. Alert on growing backlogs and success-rate drops. Build a status page. Include metrics on payload sizes and endpoint response times to spot problematic subscribers. The tooling and practices from our monitoring article apply directly.

Security and privacy checks

  • Require HTTPS endpoints with valid certificates.
  • Send only necessary personal data, and consider partner-specific field filtering.
  • Log deliveries without storing sensitive payload contents indefinitely.
  • Apply per-tenant isolation so one customer's events are never delivered to another's endpoint. See our multi-tenant guide.
  • Give partners a way to allow-list your sending IP addresses if they need it, and keep the list stable and published.

Write documentation that gets people live

The best webhook documentation reads like a tutorial followed by a reference. Start with a quick start: create an endpoint, receive a test event, verify the signature. Then provide the event catalogue with schemas and realistic sample payloads, the signature algorithm with code, retry and timeout behaviour, idempotency and ordering guidance, a troubleshooting section listing common problems such as clock skew, body parsing that alters the raw bytes before verification, and firewalls blocking your requests, and a versioning and deprecation policy. Keep an event changelog. Provide a local testing approach, such as a tunnelling tool recommendation, and a sandbox environment that generates realistic events.

Test the full lifecycle

  • Simulate recipient failures: timeouts, 500 errors, slow responses, invalid certificates.
  • Verify retry timing, deduplication and ordering behaviour.
  • Test signature verification with tampered and replayed requests.
  • Load test with many subscribers and bursts of events.
  • Rehearse a long outage and replay.

A dependable webhook system is a product in its own right, and partners will judge your platform by how well it works. If you are building an API platform, our software team can design the event model, delivery infrastructure and partner tooling, and help you document them so integrators succeed quickly.


Put this into practice with CodeLuma

CodeLuma builds outbound webhook platforms with signing, retries, replay and a partner-friendly portal, and writes the documentation that makes integrators productive on day one.

Start a conversation. Tell us about your project and we will reply with practical next steps, or browse all CodeLuma services. CodeLuma Development Inc. is a Canadian company that works with teams in Windsor, Essex, London, Toronto, Mississauga and across Ontario, throughout Canada and remotely.

Keep reading

Share this article: Facebook · LinkedIn · X · Email

← All articles

Ready to put this into practice?

Talk to a Canadian full-stack team that builds complex, connected systems for clients across Canada and worldwide.

Start a project