The Header
We include aX-Linkryse-Signature header in each webhook request. This header contains the HMAC SHA-256 signature of the request body, signed using your webhook signing secret.
Verification Steps
- Extract the Signature: Get the
X-Linkryse-Signaturefrom the headers. - Get the Raw Body: Read the raw request body (as a string/buffer).
- Calculate HMAC: Create a SHA-256 HMAC of the raw body using your signing secret.
- Compare: Timing-safe compare your calculated signature with the header signature.
Example Code
Node.js