Verifying webhooks
Every request is signed with HMAC-SHA256. Check it before you trust it:
- Grap-Signature — t=timestamp,v1=signature
- Grap-Event — the event type, e.g. invoice.paid
- Grap-Delivery — a unique ID for the delivery
Compute HMAC-SHA256 of "{t}.{raw body}" with your endpoint secret, compare it with v1 in constant time, and reject anything older than five minutes. Keep the secret on your server only.
Still stuck? Contact us and we'll help.
