Subscribe
signing_secret (prefix whsec_) exactly once — store it in your secrets manager, because you can’t retrieve it again. You cannot supply your own secret; the platform generates it. Rotate it via POST /v2/webhooks/{id}/rotate-secret. Subscribe to the event types you care about; examples include peg.depeg.start, peg.depeg.end, and vault.cap.changed. See the Event catalog for every type, when it fires, and a sample payload.
Verify the signature
Every delivery includes anAlterscope-Signature header in the form t=<unix_ts>,v1=<hex_hmac_sha256>. The v1 value is the HMAC-SHA256 of "<t>.<raw_body>" (the timestamp, a literal dot, then the raw request body), keyed with your signing_secret. Recompute it, compare in constant time, and reject deliveries whose timestamp is outside a ~5-minute tolerance — that bounds replay attacks:
A legacy
X-Alterscope-Signature header — a plain HMAC-SHA256 of the raw body (no timestamp prefix) — is dual-emitted alongside Alterscope-Signature during a 60-day transition window and is deprecated. New integrations should verify Alterscope-Signature; migrate any existing checks off the legacy header before the window closes.Manage subscriptions
After rotating, accept both the old and new signature for a short overlap so in-flight deliveries still verify.