Webhook HMAC signature verification (SHA-256): a practical receiver checklist

    If you accept webhooks, you need verification. A receiver-side checklist: timestamped payload signing, constant-time compare, secret rotation, and idempotency to survive retries.

    Webhooks are only safe if receivers can verify authenticity.

    If you're integrating with Gestio, start here:

    What "HMAC signed webhook" means in practice

    At a high level:

    • Sender computes an HMAC SHA-256 signature over the payload (often with a timestamp).
    • Receiver recomputes the signature with the shared secret.
    • If signatures match, accept. If not, reject.

    The critical detail is that the receiver must verify every request, not just "most of them".

    Receiver checklist (implementation-first)

    1. Read the raw request body exactly as received

    Do not parse + reserialize JSON before verifying signatures. Verify the exact raw bytes.

    1. Include a timestamp in the signed payload (and validate it)

    Timestamped signatures help prevent replay attacks. The receiver should reject requests that are too old.

    1. Use constant-time comparison

    Never compare signatures with a naive string equality if your environment has a safer constant-time compare. This reduces timing side-channel risk.

    1. Enforce idempotency

    Even with signing, webhooks will be retried. Receiver handlers must be idempotent:

    • store an idempotency key or event id
    • ignore duplicates safely
    1. Plan for secret rotation

    Rotation is normal operations, not an exception. A robust receiver supports:

    • current secret
    • previous secret (for a short overlap window)

    That allows rotation without downtime.

    The operational benefit: fewer "ghost failures"

    When verification is strict and consistent:

    • spoofed webhooks get rejected
    • bugs get detected quickly
    • retries become safe because handlers are idempotent

    What to do next

    Related posts

    Based on shared topics (excluding generic geo tags).

    2026-05-05webhooksintegrationsreliability

    Webhook retries, backoff, and dead-letter queues: making outbound delivery operational

    Outbound webhook delivery fails in real networks. A practical approach: bounded retries, exponential backoff, a dead-letter state, and delivery logs so you can debug and recover.

    Read post
    2026-05-08xerointegrationsaccounting

    Xero OAuth token expiry and refresh: how to keep accounting integrations running

    A practical guide for Dubai teams: OAuth tokens expire, connections drift, and integrations stall. Build a clear refresh/reconnect path and make connection status visible.

    Read post
    2026-05-07api-keyssecurityoperations

    API key rotation and revocation playbook (what to do before and after an incident)

    A practical operations playbook: rotate keys on schedule, revoke keys on staff/vendor change, and treat 'shown once' keys as secrets with auditable ownership.

    Read post
    2026-05-06api-keysapiintegrations

    API key scopes and rate limits: the simplest way to reduce integration blast radius

    A production rule for external integrations: issue scoped API keys with rate limits. A practical breakdown of least-privilege scopes, predictable traffic, and safe key handoff.

    Read post
    2026-02-19aioperationsintegrations

    Idempotency for business workflows: preventing duplicates when agents retry

    Retries are normal. Duplicates are optional. A practical approach to safe reruns, checkpoints, and deterministic fallbacks for agentic workflows.

    Read post
    2026-02-18integrationsaiagents

    Integration failure recovery: detect, diagnose, fix, rerun safely

    A deterministic recovery playbook: make failures visible, group root causes, apply the smallest fix, and rerun safely without duplicates.

    Read post

    Ready to streamline your operations?

    Start a 14-day trial. No credit card required.

    No credit card required. Cancel anytime.

    Chat with us on WhatsApp