Skip to content
Docs
API 1.0.0 · 23 Nov 2026

Search the docs

    Română

    Verify signatures

    Every delivery is signed. Check the signature on the raw body before you trust the event.

    On this page

    Every delivery is signed, and your endpoint refuses one whose signature does not match. The secret, whsec_ followed by base64, is returned once, in the answer of Creating a subscription. The same request sent again, and the lookup of the operation, omit it.

    Headers of a delivery

    HeaderValue
    webhook-idThe id of the event. The same on every attempt.
    webhook-timestampSeconds since the epoch, of this attempt.
    webhook-signaturev1,<signature>. Several values separated by a space while a secret is being rotated.

    The signed content is <webhook-id>.<webhook-timestamp>.<raw body>. The signature is HMAC-SHA256 of it with the secret of the subscription, in base64.

    The check

    1. Read the raw body before any parsing.
    2. Refuse the delivery when webhook-timestamp is more than 5 minutes from your clock.
    3. Compute the signature over the signed content, with the base64-decoded part of the secret after whsec_.
    4. Compare it with each value of webhook-signature, in constant time.
    5. Answer 2xx only if one of them matches.

    Rotating the secret

    Rotate the secret returns a new secret, in the first answer only. After a rotation, every delivery carries both signatures for 24 hours, then only the new one.

    The full rule: Developer guide