Webhook receiver helpers
Marea signs every webhook with HMAC-SHA256 over"<unix-ts>.<rawBody>" using the endpoint’s raw signing secret (the 64-char hex string returned at create / rotate time). The signature is in the X-Marea-Signature request header:
|now - t| > 300 (5-minute replay window).
Node.js / TypeScript
Python
Multiple endpoints, one receiver
If you serve multiple endpoints from one HTTP server, dispatch on theX-Marea-Endpoint-Id header and look up the corresponding secret:
Source disambiguation (developer vs merchant)
TheX-Marea-Source header tells you which kind of activity produced the delivery:
Either way, the signature is computed with the same algorithm using the endpoint’s own
signingSecret. You do not need to maintain a different verifier per source.
Idempotency
Every envelope includes aneventId (UUID v4) as a stable idempotency key across retries:
eventId.
Detecting in-flight secret rotation
Every delivery includesX-Marea-Signing-Version (an integer that bumps each time you rotate the endpoint’s secret). If you receive a delivery with a version number you’ve never seen, assume rotation happened — pull the new secret from your secret manager (or the dashboard reveal modal if you triggered the rotate yourself) before retrying signature verification.