- ECDSA Signature - All requests are signed using ECDSA with SHA-256
- Custom Secret - Optionally configure your own secret in the dashboard
Signature Headers
Each webhook request includes the following headers:| Header | Description |
|---|---|
X-Clarion-Signature | The hex-encoded ECDSA signature |
X-Clarion-Timestamp | Unix timestamp (milliseconds) when the request was signed |
X-Clarion-Secret | Your custom secret (if configured in the dashboard) |
Custom Secret Verification
You can configure a custom secret in the Clarion dashboard under Developer Actions. When set, this secret is sent with every webhook request in theX-Clarion-Secret header. Simply compare the header value against your stored secret to verify the request.
ECDSA Signature Verification
For stronger security, you can verify the ECDSA signature. Use the following public key:Verification Steps
- Extract the
X-Clarion-SignatureandX-Clarion-Timestampheaders from the request - Get the raw request body as a string
- Construct the signed payload by concatenating:
{timestamp}.{body} - Verify the signature using ECDSA with SHA-256 and the public key above
- Optionally, check that the timestamp is within an acceptable time window (e.g., 5 minutes) to prevent replay attacks
Node.js Verification Example
Handling the Webhook
Your webhook endpoint should:- Accept POST requests with a JSON body
- Verify the signature using the method above
- Return a
200status code to acknowledge receipt - Process the payload asynchronously if needed to avoid timeouts
If your endpoint does not return a
200 status code, Clarion may retry the webhook delivery.
