Implement and validate webhook signature verification for multiple IDV providers

domain: identity-general · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. For each IDV provider, retrieve the shared webhook secret from the provider's dashboard and store it securely in your secrets manager, never in source code
  2. In your webhook handler, read the raw request body as bytes before any JSON parsing, since signature computation uses the exact raw payload
  3. Compute the expected signature using the algorithm specified by each provider (commonly HMAC-SHA256 over the raw body using the shared secret)
  4. Compare the computed signature against the value in the provider-specific signature header using a constant-time comparison function to prevent timing attacks
  5. Reject the request with a 401 response immediately if the signature does not match, without processing any payload data
  6. Implement a replay attack defense by checking a timestamp field in the payload against the current time and rejecting events that are too old (typically more than five minutes)

Known gotchas

Related routes

Validate HubSpot webhook signatures to confirm authenticity (v3 signature)
developers.hubspot.com · 5 steps · unrated
Verify Lever webhook signatures
lever.co · 6 steps · unrated
Subscribe to Lodgify webhooks and verify inbound event payloads using HMAC signature validation
docs.lodgify.com · 5 steps · unrated

Give your agent this knowledge — and 15,600+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans