Some products deserve a bigger cut than your partner's standard rate. Yaplet has no per-product rate table — instead, your shop works out the right amount for that order and sends it with the order. You can also send a product object, which Yaplet stores on the commission so you can see what was sold, but it is the commission figure that decides the money.
How the priority works
Yaplet decides the commission in this order:
- The partner's own rate, if Ignore Product Rate is on and they have a rate saved — that combination beats a
commissionamount in the request. With the switch on but no rate saved, Yaplet falls through to the amount your shop sent. - The
commissionamount in the request — used exactly as sent, unless rule 1 already applied. - The partner's rate — used when no amount was sent.
- Nothing — if the partner has no rate and no amount was sent, the commission is zero.
One thing to watch: sending commission as 0 does not force a zero commission. Zero counts as "no amount sent", so Yaplet falls back to the partner's rate. Leave the field out and let the partner's rate apply, or send the real figure.
Send the amount with the order
Include an explicit commission, and the product object if you want the sale itemised in your reports:
POST https://yaplet.com/api/affiliates/track/{affiliate_code}
{
"order_id": "order_789",
"total_amount": 249.00,
"customer": { "email": "[email protected]" },
"product": {
"id": "prod_premium",
"name": "Premium Plan",
"category": "subscription"
},
"commission": 37.35
}
Here the partner earns exactly 37.35, because your shop already worked out what that product pays.
Lock a partner to their own rate
Open the partner and switch Ignore Product Rate on. Their saved rate is then used on every order, even when your shop sends a commission amount. Use it for a partner on a negotiated flat deal that no product rule should ever change — and make sure they actually have a rate saved, because the switch does nothing on its own.
The caption printed next to that switch reads the other way round from what it does. Trust the behaviour described here: switch on means the partner's own rate always wins.
What's next
See Use the partner tracking API for the full list of fields, responses and error codes.