What is HMAC?
HMAC (Hash-based Message Authentication Code) combines a secret key with a hash function such as SHA-256 to produce a signature. Anyone who knows the key can recompute the signature and confirm the message was not altered and came from someone holding the key.
Testing webhook signatures
Services such as GitHub, Stripe and Shopify sign webhook payloads with HMAC-SHA256 and send the result in a header. Paste the raw request body as the message and your webhook secret as the key, then compare the hex or Base64 output with the header value to debug signature mismatches. Whitespace and line breaks in the body change the result, so use the exact raw payload.