affiliate.signup

Fired when a customer signs up through an affiliate's referral link.

POSTYour webhook URL

The 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

ParameterTypeDescription
idrequired
stringUnique event ID (prefixed with evt_).
eventrequired
stringAlways "affiliate.signup" for this event.
created_atrequired
stringISO 8601 timestamp of when the event occurred.
data.customer_emailrequired
stringEmail of the customer who signed up.
data.affiliate.emailrequired
stringEmail of the referring affiliate.
data.affiliate.name
stringName of the referring affiliate (may be null).
data.affiliate.referral_coderequired
stringThe referral code that was used.
data.product.idrequired
stringYour Anderro product ID.
data.product.namerequired
stringYour 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");
});