Skip to main content

Commission Created Webhook

Commission Created Webhook

Written by Prince Foli

Assuming a promoter/affiliate refers someone (a lead/referral), and that person (the lead/referral) eventually buys something, and you want to reward the promoter/affiliate who drove the sale, the moment that purchase happens.

The notification to listen for

FirstPromoter creates a commission and sends a commission.created notification once a referral makes a purchase. Unlike a signup event, this one does include the exact reward amount, because there's now a real sale for FirstPromoter to calculate a commission based on whatever reward you've configured on the campaign.

Example Payload

{
"event_id": "f1e2d3c4-b5a6-4978-8123-9876543210ab",
"event_type": "commission.created",
"action": "created",
"entity_type": "commission",
"entity_id": 50000001,
"changes": {},
"data": {
"id": 50000001,
"tier": 1,
"unit": "credits",
"amount": 75,
"reward": {
"id": 60000001,
"name": "75 credits"
},
"status": "approved",
"is_paid": false,
"plan_id": "Pro-USD-Monthly",
"event_id": "12",
"is_split": false,
"metadata": {},
"referral": {
"id": 10000001,
"uid": "abc123referraluid",
"email": "[email protected]"
},
"created_at": "2026-01-15T11:45:00Z",
"fraud_check": "no_suspicion",
"sale_amount": 4900,
"external_note": null,
"internal_note": null,
"split_details": null,
"commission_type": "sale",
"is_self_referral": false,
"promoter_campaign": {
"id": 20000001,
"campaign": {
"id": 30000001,
"name": "Referral Program",
"color": "#4F46E5",
"language": null
},
"promoter": {
"id": 40000001,
"name": "Alex Promoter",
"email": "[email protected]"
},
"created_at": "2026-01-01T09:00:00Z",
"campaign_id": 30000001,
"promoter_id": 40000001
},
"status_updated_at": null,
"created_by_user_at": null,
"original_sale_amount": 4900,
"created_by_user_email": null,
"original_sale_currency": "USD"
},
"timestamp": "2026-01-15T11:45:00Z"
}

The part worth knowing upfront

Many campaigns are set up such that commissions are approved automatically. However, there are instances where you would like to review commissions before approving them. If you decide to pay out only approved commissions, confirm the commission's status and only assign the credit to the promoter once it reads "approved".

Watch out for manually added commissions

Not every commission.created comes from a real, tracked sale. There are instances where a team member might add a commission from the dashboard if they are permitted ( for a bonus, a correction, or a one-off arrangement) for a specific promoter. If your server setup handles assignment of credit to the promoter on every commission.created without checking, a manually added commission would trigger a reward too, which may not be what you want. If you only want to reward tracked sales automatically, confirm that data.commission_type is "sale" before applying the reward.

Putting it together

  • Subscribe your webhook endpoint to commission.created.

  • Every time a notification arrives:

    1. Confirm data.commission_type is "sale" (skip it otherwise).

    2. Confirm status is "approved" before rewarding.

    3. Take the promoter's email from data.promoter_campaign.promoter.email

    4. Take the reward amount from data.amount and credit the promoter's account on your system.

    5. Acknowledge receipt by returning status code 200, so FirstPromoter doesn't retry the delivery.

    For more information on technical implementation details, see our docs.

Worth testing before you build and publish

Use the Run Test feature on FirstPromoter to receive test data or perform a real test purchase and inspect the actual payload that arrives.

For testing purposes, you can use https://webhook.site to receive a webhook event.
It is always recommended to confirm that the desired field names used in mapping the data match the data received in the payload.

Did this answer your question?