E-commerce Ledger Integration: From Purchase to Payout
I was three months into building an e-commerce platform when our accountant asked a simple question that broke everything: “When a customer pays $100, and we keep 10% as commission, and Stripe takes 2.9% + 30¢, how much does the merchant actually receive?” I looked at my database schema and felt the familiar sinking feeling that I was missing something obvious. The math was simple—$100 - $10 - $3.20 = $86.80—but the tracking wasn’t. When did the merchant earn that money? When the customer paid? When the item shipped? When we transferred it? What if the customer refunded? What if the item was backordered for three weeks? ...