Configure Endpoint
📢 Overview
To receive webhook events, your server must expose a publicly accessible HTTPS endpoint. This endpoint will handle webhook requests securely and validate them. Webhooks are sent as asynchronous HTTP POST requests containing event-related data. These requests must be handled in near real-time, as they will not wait for a response before continuing execution.
🔗 Webhook URL Format
Your server should expose a publicly accessible HTTPS endpoint to receive webhook notifications.
Example:
🔐 Security & Validation
Each webhook request includes an HMAC SHA-256 signature in the X-Webhook-Signature
header. This signature is generated using a pre-shared secret token and the exact request payload.
What is the Secret Token?
The secret token is a unique, private key that only you and our system know. It is used to sign webhook requests and allows your server to verify that they are authentic and untampered.
- How is it generated? You generate the secret token and provide it to our system when configuring the webhook.
- How should it be stored? It must be stored securely on your server and never shared or exposed publicly.
- How is it used? It is used to compute a signature that validates the authenticity of incoming webhooks.
How Signature Verification Works
The recipient must verify this signature to ensure:
- The request originated from a trusted source (authentication).
- The request was not altered in transit (integrity).
Example Header:
Validation Steps:
- Extract the
X-Webhook-Signature
from headers. - Recompute the signature using your secret token and the request payload.
- Use
hmac.compare_digest()
to compare the expected vs. received signature. - If they do not match, reject the request with
HTTP 403 Forbidden
.
📥 Webhook Handling Example (Python)
This is an example implementation of a webhook receiver with validation:
✅ Response Codes
Status Code | Meaning |
---|---|
200 OK | Webhook received and validated successfully. |
400 Bad Request | Malformed request (e.g., missing JSON body, missing headers). |
403 Forbidden | Signature verification failed (invalid or missing signature). |
🔄 Retry Logic
If your server returns any 4xx
or 5xx
errors, we will retry the webhook.
Webhook retries follow exponential backoff:
1 min → 5 min → 15 min → 1h → 2h → Max retries: 5 times.
If all retries fail, the event will not be resent.
❓ FAQs
How do I update my webhook URL?
You can provide a new webhook URL via your account settings or by contacting support.
Can I receive multiple webhook events?
Yes. Webhooks are event-driven. You can subscribe to different events.
What happens if my server is down?
We will retry delivery as per our retry policy above.