X-PaveWay-Signature header. You should verify this signature to prevent unauthorized requests from reaching your server.
The Verification Method
The signature is generated using an HMAC with SHA256 hash, using your Webhook Signing Secret as the key.- Header:
X-PaveWay-Signature - Format:
sha256=<signature_hex> - Payload: The raw HTTP request body (JSON).
Verification Example (Node.js)
Verification Example (Python)
Security Best Practices
- Raw Body: Always use the raw binary request body for verification. Do not use a parsed JSON object, as re-stringifying it can change the character order or whitespace, causing signature mismatch.
- Timing Attacks: Use a constant-comparison function (like
timingSafeEqualin Node orcompare_digestin Python) to prevent timing-based side-channel attacks. - Secret Rotation: If your signing secret is compromised, rotate it immediately in the Merchant Dashboard.