Every webhook Coinflow sends includes a Coinflow-Signature header containing an HMAC-SHA256 signature of the request body. You can use this signature to verify that a webhook was sent by Coinflow and that its payload has not been tampered with.
This is an alternative to the Authorization header approach which should be used in the case of an overriden authorization header.
When Coinflow sends a webhook, it signs the JSON body using your Webhook Validation Key and attaches the signature in the Coinflow-Signature header. The header has this format:
The signed payload is the timestamp and the raw JSON body joined by a dot: {timestamp}.{body}.
To verify a webhook signature:
t and v1 values from the Coinflow-Signature header{t}.{raw request body}v1 value using a timing-safe comparisonUsage in an Express route:
You must verify the signature against the raw request body string, not a parsed-and-re-serialized JSON object. Re-serializing can change whitespace or key order, which will cause verification to fail.
Your Webhook Validation Key is available in the Coinflow Admin Dashboard under Developers → Webhooks. See Configuring Webhooks for setup instructions.