POST
Your webhook URLThe affiliate.signup event is triggered when a new customer clicks an affiliate's referral link and completes a signup or purchase on your site. Use this to sync new referrals with your own system.
Payload
json
{
"id": "evt_cm1abc2def3",
"event": "affiliate.signup",
"created_at": "2026-04-08T12:00:00.000Z",
"data": {
"customer_email": "[email protected]",
"affiliate": {
"email": "[email protected]",
"name": "Jane Smith",
"referral_code": "jane-smith"
},
"product": {
"id": "cuid_abc123",
"name": "My SaaS"
}
}
}
Payload fields
| Parameter | Type | Description |
|---|---|---|
idrequired | string | Unique event ID (prefixed with evt_). |
eventrequired | string | Always "affiliate.signup" for this event. |
created_atrequired | string | ISO 8601 timestamp of when the event occurred. |
data.customer_emailrequired | string | Email of the customer who signed up. |
data.affiliate.emailrequired | string | Email of the referring affiliate. |
data.affiliate.name | string | Name of the referring affiliate (may be null). |
data.affiliate.referral_coderequired | string | The referral code that was used. |
data.product.idrequired | string | Your Anderro product ID. |
data.product.namerequired | string | Your product name in Anderro. |
Example handler
javascript
app.post("/webhooks/anderro", (req, res) => {
const { event, data } = req.body;
if (event === "affiliate.signup") {
console.log(
`New referral: ${data.customer_email} via ${data.affiliate.referral_code}`
);
// Tag the customer in your system
// Track the referral source
// Send internal notification
}
res.status(200).send("OK");
});