Executive Summary
- Settlement is an operating architecture: states, owners, audits—not a checkout theme.
- Buyer payment, seller entitlement, and platform commission must be modeled as distinct movements.
- Wallet UI balances are projections; durable integrity needs an append-oriented ledger of events.
- Release rules, cancellations, partial refunds, and disputes need explicit transitions.
- COD and online capture create different hold and reconciliation patterns.
- Tax and money-transmission obligations require formal assessment beyond engineering design.
The settlement decision
A marketplace that collects payment without deliberate settlement design invents one under incident pressure. The core decision is how funds move from buyer to seller, how the platform takes commission, when funds are held, and how disputes reverse or reallocate money.
Options range from payment-provider marketplace constructs (split payments, connected accounts) to platform-operated wallets with delayed payouts. Fitness depends on geography, regulated constraints, seller KYC maturity, and dispute staffing—not on UI screens alone.
Order-level versus line-level accounting matters when carts mix sellers, partial cancellations, or per-item commissions. Decide the grain of settlement events early.
Ledger before UI
If you cannot replay how a disputed order’s money moved, the wallet screen is cosmetic. Build reconstructable settlement events first.
Buyer, seller, and commission movements
Model three economic parties even when one payment provider API call appears atomic: buyer payment in, seller entitlement out, platform commission retained. Collapsing them into a single 'paid' flag hides refund and dispute truth.
Seller entitlement is not the same as cash available. Pending, available, reserved-for-dispute, and paid-out are different states with different owners.
Commission may be percentage, flat, or category-based; it may apply at capture, at release, or at payout. Document the rule and make it deterministic in code—not in support chat.
Settlement event spine
Every transition should emit an immutable event with actor, amount, and correlation ids.
Wallets versus ledger integrity
A wallet balance is a convenient projection for sellers. It is not automatically a system of financial record. Where stronger integrity is required, maintain an append-oriented ledger of credits and debits and derive balances.
Idempotency keys on capture, refund, and payout prevent double-pay under retries. Reconciliation jobs compare provider statements to ledger events; mismatches become ops queues—not silent balance edits.
Redis or cache may accelerate balance reads; they must not be the durable source of settlement truth. Durable events belong in a database with backup and audit retention appropriate to your markets.
Do not fake a bank with a float
Editing a balance field to 'fix' disputes destroys auditability. Post compensating ledger entries instead.
Holds, release, refund, dispute, payout
Release rules define when pending becomes available (delivery confirmation, SLA window, manual ops approval). Cancellation before capture differs from refund after capture; model both.
Partial refunds need line-aware commission clawbacks. Disputes need evidence attachments, timers, and outcomes that adjust entitlements without inventing new money.
Payout batches should be deterministic: eligible balances, KYC gates, minimum thresholds, and failure retries. Human approval may be required for large or high-risk payouts.
Dispute control path
COD, tax, and regulatory boundaries
Cash-on-delivery changes hold semantics: the platform may never hold buyer cash online. Commission collection, remittance, and failure recovery still need explicit states.
Tax calculation and invoicing obligations vary by jurisdiction. Engineering can model tax lines; formal tax advice is outside this guide and requires qualified assessment.
Money-transmission and KYC requirements may constrain wallet designs. Provider marketplace constructs may reduce platform custody—but still need reconciliation and dispute ops.
When this design is unsuitable
Heavy settlement architecture is unsuitable for a single-merchant storefront that only needs standard checkout and refunds—use conventional ecommerce patterns instead.
Platform-operated wallets are unsuitable when you cannot staff KYC, disputes, and reconciliation, or when regulation forbids the custody model you sketched.
If liquidity will not exist, perfecting payout UX will not create a market. Fix supply/demand planning before deepening settlement complexity.
Failure modes and recovery
Failures include double payouts, orphan holds, refunds that ignore commission, and provider webhooks processed twice. Recovery needs replay-safe handlers and compensating entries.
What must remain deterministic: commission math, release eligibility, and payout selection. What can be automated: anomaly alerts and suggested dispute classifications—with human decision on irreversible outcomes.
What must be audited: every money-affecting admin action. What should be validated before build: grain of accounting, provider capabilities, and ops staffing for disputes.
Implementation checklist
Treat incomplete settlement design as a launch blocker for multi-seller marketplaces.
Settlement readiness
1Model
- Buyer/seller/commission movements defined
- Order vs line settlement grain chosen
- Pending/available/reserved/paid-out states
2Integrity
- Ledger or equivalent append model
- Idempotency on capture/refund/payout
- Provider reconciliation job
3Operations
- Dispute queue with evidence
- Payout KYC gates
- COD path documented if applicable
How Digital Elliptical helps
Digital Elliptical designs marketplace settlement architectures—commissions, holds, payouts, disputes—aligned to payment integrations and ops queues, phased to liquidity and compliance readiness.
We do not guarantee payment approval rates, dispute outcomes, or regulatory results. Settlement design depends on discovery of markets, partners, and staffing.
Main-Agent ownership (Prompt 6): Re-authored to separate wallet projections from ledger integrity, expand refund/dispute/COD paths, and reject balance-only 'fixes.'