Marketplaces (Uber, Airbnb, Etsy) have a unique ledger problem: The Split. A single inbound payment of $100 from a buyer must be fragmented into multiple outbound flows: $80 to the Vendor, $15 to the Platform (Revenue), and $5 to a Logistics Partner. This split must happen atomically to ensure the platform doesn't accidentally payout money it didn't receive.
The Commission Ledger Logic
Authorization: Buyer pays $100. Funds land in Pending_Clearing.
The Split Event: Upon clearing, the ledger executes:
Debit Pending_Clearing: $100
Credit Vendor_Wallet: $80
Credit Platform_Revenue: $15
Credit Partner_Wallet: $5
Tax Implications: The system must track Gross vs Net. The Vendor is liable for tax on the $100 (in many jurisdictions), treating the $20 as a business expense. The ledger must generate reports reflecting this.
The Refund Logic Challenge
If the buyer requests a refund, who pays back the commission?
Scenario: Refund $100.
Platform Policy: Does the platform keep its $15 fee? If yes, the Vendor must cover the full $100, potentially putting their wallet into a negative balance (-$15).
Architectural Guardrail: The payout engine must check for negative balances before releasing future payouts, effectively "garnishing" future wages to cover the refund debt.