Skip to main content
Book a demoShow me

Part 6.4 · Part 4 of 5

Verifying Signatures

1 min readLast updated: Back to chapter: Klarstig Connect for Developers

Every webhook request is signed with your endpoint's secret. Verify before you trust: compute an HMAC-SHA256 (hex) of the X-Klarstig-Timestamp value, a period, and the raw request body with your signing secret and compare it (constant-time) to the X-Klarstig-Signature header; reject mismatches and stale timestamps (>5 minutes) with 400. Raw body matters — parse after verifying, not before. Rotating a signing secret is not available yet; to change it, create a new endpoint, move traffic, then delete the old one.

Note: the five-minute timestamp check is a recommended check for your receiving endpoint. Klarstig signs each request with an X-Klarstig-Timestamp header but does not enforce a freshness window itself.

Was this helpful?