Skip to content
APIs & Webhooks

What is HMAC Signature Verification?

Recomputing a hash-based signature over the raw webhook body with a shared secret and comparing in constant time. HMAC verification is the proof a callback came from the provider, not an impersonator.

Example

A Paddle notification route reads the raw body, recomputes the HMAC with the webhook secret, and fulfills the subscription only on match; mismatches log and return 400 without touching orders.

What people get wrong

Parsing the body to JSON first or comparing signatures with early-exit equality. Parse transforms bytes and timing leaks match length; verify raw bytes in constant time.

Frequently asked questions

Why verify the raw body?

Serialization reformats bytes, which breaks signatures. Hash exactly the bytes received, then compare against the provider header.

What belongs in the comparison?

Constant-time equality over hex or base64 digests. Early-exit string comparison leaks match position through timing side channels.

Sources

Browse all APIs & Webhooks terms →