The problem
A week is a long time
Imagine running a small ecommerce business. You've sold your products, your customers have paid, and now you need money to buy more stock.
That's cash flow. And if you have to wait a week to get your money, it can slow down your entire business.
That's how our weekly settlement system worked. It also made correcting payments surprisingly difficult once a receipt was closed.
My approach
From receipts to balances
Instead of calculating how much a merchant was owed at the end of every week, I designed a system that kept track of their balance as things happened.
A delivery, a return or a correction would update the balance, with a history explaining every change.
Merchants could request withdrawals without waiting for the weekly settlement.
The interesting part
Having money doesn't mean you can withdraw it
Just because a customer has paid for a package doesn't mean the shipping company has transferred that money to us yet.
Paying merchants before receiving that money would mean financing their sales ourselves.
So we separated the merchant's balance from the amount actually available to withdraw.
There was another interesting problem. What happens when a shipping company corrects a delivery status after we've already paid the merchant?
Instead of reopening old payments, we apply the difference to their current balance.
| Transaction | Amount |
|---|---|
Package delivered | +$100 |
Withdrawal paid | −$100 |
The financial history stays intact, and the correction is accounted for in future earnings.
What changed
No more waiting for next week
Merchants could request their money when they needed it, see where every balance change came from and eventually schedule their withdrawals automatically.
Finance still handled the actual bank transfers.
We didn't make bank transfers instant. We gave merchants more control over their own money :)