Commission rate
A commission rate is the number the marketplace takes from a sale. It’s represented by theCommissionRate data model (table commission_rate, id
prefix comrate). A rate has a name, a unique code, a type, and a
value, plus the include_tax and include_shipping toggles.
type
(CommissionRateType):
A rate’s
code is unique. When you create a rate without one, the module
auto-generates a URL-safe code from the name (e.g. "Standard" →
standard-a1b2c3).Per-currency amounts
A fixed rate can carry a different amount for each currency. This is represented by theCommissionRateValue data model (table
commission_rate_value, id prefix comval). Each value pairs a currency_code
with an amount, and the calculation picks the value matching the order’s
currency.
The global commission
Every marketplace has exactly one Global Commission. This is the rate withis_default set to true. Mercur seeds it at boot (a 0% percentage rate
named Default) so a rate always exists, and it applies whenever no
more-specific rate matches a line.
The global rate is also the only rate that can commission shipping. See
Rule matching for how
specificity and shipping are resolved.