Verify a Coinbase Commerce webhook
HMAC-SHA256 of the raw body against the X-CC-Webhook-Signature header, and the event types that actually mean money arrived.
6 entries
HMAC-SHA256 of the raw body against the X-CC-Webhook-Signature header, and the event types that actually mean money arrived.
An API key on the way out, a signed and key-sorted JSON payload on the way back. The sorting requirement is the part that trips people.
The HMAC is over the raw POST body, not the parsed array. Rebuilding it from $_POST is why so many handlers reject every callback.
A caller-supplied key with a unique index turns every retry, refresh and double-click into a no-op. The single most valuable column in a payments schema.
A unique index on your own reference turns duplicate callbacks, browser refreshes and manual replays into no-ops instead of free balance.
An auto-submitting form POST with your own reference in the custom field — the field that makes the deposit traceable when it comes back.