What are Webhooks?
Webhooks allow you to receive real-time HTTP notifications when events occur in your Affonso affiliate program. Instead of polling our API for changes, webhooks push data to your server the moment something happens.How Webhooks Work
- Event occurs - An affiliate signs up, a referral converts, a commission is paid, etc.
- Affonso sends a POST request - We send a JSON payload to your configured endpoint
- Your server processes the event - Handle the data as needed
- Respond with 200 OK - Confirm receipt of the webhook
Event Categories
Affiliate Events
Track when affiliates sign up, get approved, or update their details
Referral Events
Monitor referral clicks, leads, and conversions
Transaction Events
Get notified about sales, commissions, and refunds
Payout Events
Track affiliate payouts and payment status
Security
All webhook requests include a signature header for verification:Retry Policy
If your endpoint doesn’t respond with a2xx status code, we’ll retry the webhook with exponential backoff:
| Attempt | Delay |
|---|---|
| 1 | Immediate |
| 2 | 1 minute |
| 3 | 5 minutes |
| 4 | 30 minutes |
| 5 | 2 hours |
Payload Structure
All webhook payloads follow a consistent structure:| Field | Description |
|---|---|
id | Unique event identifier |
type | The event type (e.g., affiliate.created) |
createdAt | ISO 8601 timestamp of when the event occurred |
data | Event-specific payload data |
