Reseller Payouts Module
Phase 1 Sales companion to Resellers. Maintains a commission ledger (reseller_commission_entries) with two parties per paid invoice — reseller and owner — and an accrued → approved → paid (or void) workflow.
Guides
| Audience | Document |
|---|---|
| Operators / workspace users | reseller-payouts.md |
| Engineers | reseller-payouts.md |
| Production / ops | reseller-payouts.md |
| Related module | Resellers |
| Module Development Standard | module-development.md |
| Tenant API | ../api/tenant-v1-reseller-payouts.md |
Capabilities
- Accrues two ledger rows when a customer invoice with
reseller_idbecomes fully Paid - Parties:
reseller(rate = resellercommission_rate) andowner(rate = resellerowner_commission_rate) - Status workflow:
accrued→approved→paid;voidfrom accrued/approved (not from paid) - Auto-void non-paid entries when an invoice leaves Paid status
- List/stats with search, status, party, and reseller filters
- Module licensing (
module:reseller-payouts) + Spatie permissions — free Marketplace opt-in
Permissions
reseller-payouts.view · approve · pay · void
Catalog: slug reseller-payouts, category sales (Sales), is_default_included = false, is_billable = false, sort_order = 80. Hard dependency: Resellers.
Commission formula
For invoice total T, reseller rate R%, owner rate O%:
- Reseller amount =
round(T × R / 100, 2) - Owner amount =
round((T − reseller amount) × O / 100, 2)
Accrual is idempotent via unique (customer_invoice_id, party).
Required dependency
Reseller Payouts requires Resellers. Install Resellers (and therefore Payments) first.
Explicitly deferred
- Cross-workspace identity for payout parties
- Automated bank / Stripe Connect disbursement
- Partial payment commission (accural is fully Paid only, not Partial)
- Recalculation when commission rates change after accrual