X-Hook0-Signature verification mechanism as all CDP webhooks.
How it works
When you create a webhook subscription, the response includes asecret. Each incoming webhook request includes an X-Hook0-Signature header containing:
tfield - the timestamphfield - list of headers included in the signaturev1field - the HMAC-SHA256 signature
Implementation
For complete verification code in TypeScript, Python, Go, Ruby, PHP, and Java, see the CDP Webhook Verification guide. The mechanism is identical for all CDP products, including Payment Acceptance. The short version:- Extract
t,h, andv1from theX-Hook0-Signatureheader - Build the signed payload:
{timestamp}.{headerNames}.{headerValues}.{body} - Compute HMAC-SHA256 using your subscription
secret - Compare the computed signature with
v1using constant-time comparison - Reject events older than 5 minutes (replay protection)
Quick example
Related
Full verification code
Complete verification implementations in 6 languages
Webhook Subscriptions
Create and manage webhook subscriptions
Example payloads
Event payload shapes for testing