Headers
We include these HTTP headers with each delivery:Header | Description |
---|---|
x-lettermint-signature | The computed signature using your webhook secret. |
x-lettermint-timestamp | Unix timestamp (seconds) when we generated the signature. |
Signature scheme
We compute an HMAC-SHA256 digest using your webhook’s secret and the exact raw request body: String to sign:${timestamp}.${rawBody}
signature format header value:
sha256=<hex_digest>
To verify, recompute the signature on your side using the same secret and compare it with timing-safe equality.
Replay protection
Reject requests with stale timestamps. We recommend a 5-minute window. Example logic:- Parse x-lettermint-timestamp as an integer.
- If |now - timestamp| > 300 seconds, reject as stale.
Node.js examples
Express
Next.js (Route Handler)
Next Steps
- All webhook events: Learn about all the events Lettermint sends.
- Quick introduction: Learn about all the events Lettermint sends.