Overview
Webhooks allow your application to be notified immediately when:- A new conversion is tracked
- A conversion is approved or rejected
- An affiliate joins your campaign
Setting Up Webhooks
1. Create an Endpoint
Go to Developer Settings and:- Click “Add Endpoint”
- Enter your HTTPS URL
- Select the events to subscribe to
- Save and copy the signing secret
⚠️ Important: The secret is only shown once. Store it securely!
2. Handle Incoming Webhooks
Your endpoint will receive POST requests like this:Available Events
Event Payloads
conversion.created
conversion.approved / conversion.rejected
affiliate.joined
Verifying Signatures
Always verify webhook signatures to ensure requests are from BaClique.Signature Format
t= Unix timestamp when signedv1= HMAC-SHA256 signature
Verification Algorithm
Node.js Example
Python Example
Retry Policy
If your endpoint returns a non-2xx status code, we retry:
After 3 failed attempts, the webhook is marked as failed.
Best Practices
- Always verify signatures - Don’t trust unverified webhooks
- Return 200 quickly - Process asynchronously if needed
- Handle duplicates - Use
event.idfor idempotency - Use HTTPS - We reject HTTP endpoints
- Implement retry handling - Your endpoint should be idempotent