The most specific rate wins. Rules combine with AND across dimensions and OR within a dimension, and among matching rates the one scoping the most dimensions applies. You never order rates by priority — specificity is the priority. The full algorithm is in Commission.
What you’ll build
- A global commission of 15% that also commissions shipping.
- A 12% rate for the Electronics category.
- An 8% rate for Electronics sold by one specific premium seller.
Set up the rates
Set the global commission
Every marketplace needs exactly one default rate — the fallback when nothing more specific matches. Create it with
is_default:include_shipping only has an effect on the global commission — shipping methods are always commissioned from the global rate, never from scoped rates. In the Admin Panel this lives on the Global Commission card under Settings → Commissions.Add a category-scoped rate
A rate becomes scoped by attaching rules. Each rule names a dimension (Available dimensions:
reference) and a value (reference_id):product, product_type, product_collection, product_category, and seller.Add a two-dimension rate for the premium seller
Combining a Because it scopes two dimensions, it beats the one-dimension Electronics rate whenever both match — regardless of which rate was created first.
seller rule with a product_category rule means both must match — this rate applies only to that seller’s electronics:Verify
- List the rates and confirm all three exist and are enabled:
- On the placed order, each electronics line item from the premium seller has a commission line with
code: "premium-electronics"andrate: 8. - The order’s shipping method has a commission line from the global rate (because
include_shippingis on). - Change a rate now and confirm the existing order’s commission lines are untouched —
CommissionLinerecords are a permanent audit trail.
FAQ
How do I charge a flat fee instead of a percentage?
How do I charge a flat fee instead of a percentage?
Use
"type": "fixed" with per-currency values: [{ "currency_code": "usd", "amount": 2 }, { "currency_code": "eur", "amount": 1.8 }]. The scalar value is the fallback for currencies without an entry.What happens when two rates tie on specificity?
What happens when two rates tie on specificity?
Ties break deterministically to the oldest rate. But if you find yourself relying on tie-breaking, prefer making one rate more specific — it reads better in the Admin Panel and survives audits.
Do rate changes affect existing orders?
Do rate changes affect existing orders?
No. Commission is snapshotted into
CommissionLine records at order placement. Changing or disabling a rate only affects future orders — the lines on past orders are a permanent audit trail that payouts read from.Can a rate match multiple values in one dimension?
Can a rate match multiple values in one dimension?
Yes — rules within the same dimension are OR’d. A rate with two
product_category rules matches items in either category, and still counts as one dimension for specificity.Next steps
Commission
The full matching algorithm, calculation pipeline, and data model.
Set up seller payouts
Where commission is deducted — the settlement side of the marketplace.