Skip to main contentSkip to navigation

Projects

Marketplace payout reconciliation

By Syed Ahmed Basharat Ali. github.com/sa-basharat-ali/marketplace-payout-reconciliation

The problem

Every marketplace order leaves money in three places: the order ledger, the processor settlement and the bank payout file. Reconciliation checks that those three agree.

This project simulates 30 days of a live-shopping marketplace (122,810 orders, 4,000 sellers, $6.2M GMV) with five kinds of injected breaks plus one confounder, and tests four reconciliation checks against them.

Headline numbers

  • On a book with zero injected breaks, daily totals still flag 31 of 31 settlement days; line-level reconciliation raises zero.
  • Line-level reconciliation catches four of the five break types.
  • Commission computed on item plus tax hit 7,642 orders and 642 sellers and passed daily, seller-day and line-level reconciliation. Only recomputing fees from policy found all 7,642.
  • Holding the riskiest 10% of sellers at T+30 cut unrecoverable loss to $7,604, versus $15,833 for a blanket T+14 hold.

What it means

When the ledger, the payout file and the processor all sit downstream of the same wrong number, they agree with each other and every reconciliation passes. Catching that class of bug takes an independent derivation of what the number should have been, such as a policy recompute or a contract test on the fee service.

Generated data with a deterministic seed; no real company's data. Built with Python (standard library only).

Code and full write-up on GitHub