OwnPay records every payment, fee, and transfer as balanced debit-credit pairs using double-entry bookkeeping with bcmath precision and brand isolation.
Every time money moves in OwnPay - a customer pays, a gateway deducts fees, a refund is issued - the system records it as a pair of balanced journal entries. This is double-entry bookkeeping, the same method used by accounting software and banks. It means you can always trace where money came from and where it went, and the total debits always equal the total credits.
When a $100 payment completes through Stripe (with a $2.90 gateway fee), OwnPay creates four ledger entries across three accounts:The net effect: $100.00 credit = $97.10 debit + $2.90 debit. The books balance to zero.
Ledger accounts are scoped to a merchant_id (brand). Brand A’s cash balance is completely independent of Brand B’s. The repository enforces this at the query level:
This compares OwnPay’s recorded transactions against the gateway’s reported totals and flags any discrepancies. For the GUI-based version, see the Balance Verification page in the admin dashboard.