Guide · Balances

A running balance across unpaid invoices in Shopify

Open a wholesale customer's page in Shopify and you can see their orders, each with its own outstanding amount. What you cannot see is the number their bookkeeper cares about: the balance of the whole account, moving as invoices are raised and payments come in. Merchants ask for this as "a running balance" — the column on a statement that goes up with every invoice and down with every payment.

This guide explains how that column is computed correctly, and the two places where a running balance usually goes wrong.

The arithmetic

A running balance is a fold over events in date order. Start with the balance carried forward from the last statement. For each event in the period: an invoice adds its amount; a payment subtracts it; a refund — money returned to the customer — adds it back, because Shopify already lowered the order's total when the items were returned. The last line of the activity table is the closing balance, and it must equal the sum of every open item's outstanding amount.

Two figures reconcile each other: the activity table proves how the balance moved, the open-items table proves what it is made of. When both agree, the statement is right.

Carrying the balance forward

The opening balance of this period is the closing balance of the last statement you sent — the number the customer already has. Recomputing it from live data every month looks harmless until an old order is refunded or edited: the opening balance quietly changes, and the customer's bookkeeper, who filed last month's closing figure, can no longer reconcile.

The honest approach is to keep sent statements as immutable snapshots, carry the sent closing forward, and — when live history no longer reproduces that closing — show the difference as an explicit line dated the first day of the period, naming the order it relates to.

Correction relating to a prior period (ref #1029) · −$38.00 — that one line is the difference between a statement a bookkeeper can reconcile and one they cannot.

Partial payments and credits

An invoice paid in part stays an open item at its remainder, and ages on that remainder from its own due date. An overpayment is a negative open item — the customer is in credit on that order — and sits in the current bucket rather than aging. A company whose whole balance is negative should read "in credit" in words, never as a red number.

Doing it inside Shopify

StatementClerk keeps a ledger of every company order's money events, builds each statement by exactly the fold above, verifies the identities before anything is sent, and shows the running balance both on the statement and on a dashboard inside your Shopify admin — total outstanding, overdue, and the oldest open item per company.

Questions

Why does a refund add to the balance?

Because Shopify lowers the order's current total itself when items are returned. The invoice line already reflects the smaller total; the cash refund is money that went back to the customer, so it adds to what they owe on the account. Treating it as a credit would count the return twice.

What if a company orders in two currencies?

Keep two running balances and send two statements. Converting between currencies on a balance document is a correctness risk for no benefit — the bookkeeper reconciles each currency ledger separately anyway.

Statements on the 1st, without the spreadsheet.

StatementClerk builds, checks and sends them from your Shopify data. Free for up to five companies.

More guides