Skip to main content

Webhook Signatures

Every webhook request includes a signature in the X-Sturdy-Signature header. This signature allows you to verify that the webhook was sent by Sturdy Technologies and hasn’t been tampered with.

How Signatures Work

We generate signatures using HMAC-SHA256 with your webhook secret key. The signature is calculated directly from the raw request body.

Verification Steps

1. Extract the Signature

Get the signature from the request header:

2. Calculate Expected Signature

3. Compare Signatures

Complete Example (Node.js)

Preventing Replay Attacks

Use the event_id fields in the webhook payload to prevent replay attacks:

IP Allowlisting

For additional security, you can allowlist our webhook IP addresses: 203.0.113.10 203.0.113.11 203.0.113.12
Contact support for the current list of webhook IP addresses for production.

Additional Examples

Security Checklist

1

Verify Signatures

Always verify the X-Sturdy-Signature header on every request
2

Use HTTPS

Only accept webhooks on HTTPS endpoints
3

Keep Secrets Safe

Store your webhook secret securely (environment variables, secret manager)
4

Implement Idempotency

Track processed event_id values to prevent duplicate processing