Gather what you need
Validate
What it checks
Spotflow webhooks follow the Standard Webhooks specification. The validator does what the official Standard Webhooks libraries do:- Takes your secret, removes any
whsec_prefix, and base64-decodes it. - Computes an HMAC-SHA256 of
{webhook-id}.{webhook-timestamp}.{raw body}. - Base64-encodes the result and compares it with each
v1,signature in the header.
Verify in your code
Use the official library rather than writing your own comparison:If the signature doesn’t match
- The body changed. Parsing and re-serialising JSON changes whitespace and key order. Verify the raw bytes you received.
- Wrong secret. Test and live mode have different webhook secrets.
- Extra whitespace. Copy header values exactly, with no trailing spaces or line breaks.
- Wrong separator. The three parts are joined with a single
.and nothing else. - Wrong encoding. The signature is base64, after the
v1,prefix.

