Skip to main content
Sorraia delivers events to the webhook URLs you configure on your forms, calendars, and shop widgets. Every delivery is signed so you can verify it genuinely came from Sorraia and wasn’t tampered with or replayed.

The signature header

Each delivery carries an X-Sorraia-Signature header:
  • t — the Unix timestamp (seconds) when the delivery was signed.
  • v1 — the HMAC-SHA256 signature, hex-encoded.
The signature is computed over the string `${t}.${rawBody}` using your account’s webhook signing secret (found in the dashboard under Settings → Webhooks), with HMAC-SHA256.

Verifying a delivery

Always verify against the raw request body bytes — don’t parse and re-serialize the JSON first, or the signature won’t match. The SDK bundles a verifier:
verifySignature returns true only when the HMAC matches and the timestamp is within the replay window. It never throws — malformed input returns false.

Replay protection

The timestamp is part of the signed material, so a captured delivery replayed later fails verification once it falls outside the tolerance window — 300 seconds (5 minutes) by default. Override it if your processing needs a different window:

Verifying without the SDK

The scheme is Stripe-style, so it’s easy to reproduce in any language. In Node.js:

Event payloads

A form submission delivers a form.submitted event:
Booking and order events follow the same signing scheme — verify them identically. Failed deliveries are retried with exponential backoff, so make your handler idempotent (dedupe on the event’s resource id).