Most restaurant owners think of loyalty points as marketing. We think of them as a debt. When a regular has 300 points, the restaurant owes that person something, and the regular knows the number. If the system says 250, you have a customer service problem at the counter during the rush, and no way to prove who is right.

So when we built ChaatPass, our SMS loyalty program, we started from one question: if a customer disputes a balance, can we show them every point they ever earned and spent? Answering yes means building the program like an accounting system.

A balance is a sum, not a number

The usual way to store points is one field per member: a number that goes up and down. It is fast, and it forgets everything. Once the number is wrong, nothing tells you when it went wrong or why.

We keep a ledger instead. Every change to a balance is a row: sign-up bonus, earn, redeem, redemption reversal, refund reversal, adjustment. The balance is only ever the sum of that member’s rows. We do keep a running total beside the ledger so checkout is fast, and that total has one job: to equal the sum.

Four things that have to stay true

Balance equals ledger. One database function writes the ledger row and updates the balance in the same transaction, with the member’s row locked while it runs. There is no moment where one has changed and the other has not.

One payment earns once. Points are earned only after Square confirms the payment. Each earn row carries the Square payment ID, and the database refuses a second earn for the same payment.

A redemption cannot exceed the rules. The server checks the member’s real balance and the half-the-bill cap before it applies a reward. The phone or the kiosk does not get a vote.

A failed delivery restores the points. If a member redeems and the delivery cannot be dispatched, the payment is refunded and a redemption reversal row puts the points back. The ledger keeps both rows, so the history shows what happened. As of November 19, 2026, the ledger holds 6 redemption reversal rows that have returned 453 points to members.

The audit

The check itself is simple. Add up every member’s balance. Add up every ledger row. Subtract. The answer has to be zero, and it has to be zero for each member, not just in total, because two errors can cancel.

On November 19, 2026, in the pilot at Karachi Chaat House on Devon Ave:

Member balances, total25,275 points
Ledger, total25,275 points
Difference0 points
Members out of step0 of 476

The check runs daily as a scheduled job. A check that has never failed proves little, so on October 7, 2026 we planted a one-point error in the test copy of the database. The check caught it and alerted, and went quiet once it was fixed.

The time it did not match

On September 26, 2026 we ran this check across every member and the numbers did not all match.

The cause was ours. Older code had updated balances and written ledger rows as two separate steps, and some early rows had the wrong sign. Two steps means there is a gap between them, and anything that fails in the gap leaves the two out of step.

We did not edit history to make it tidy. We posted 23 correcting rows, each labelled with the reason for it, and moved every balance change into the single database function described above. Balances and ledger matched that day. They have matched at every read since, most recently on November 19, 2026.

That is the part we would point an owner to. Any system can show a zero. The question is whether it can show you the day the answer was not zero, what was wrong, and each row that fixed it.

What this does not prove

These are totals for one restaurant in pilot. They say nothing yet about how the program performs elsewhere. They are points and counts; the restaurant’s sales figures are not published.

Questions to ask about your own program

Whatever loyalty tool you use, four questions tell you whether it is a ledger or a number:

  1. Can you see every transaction behind one member’s balance?
  2. If an order is refunded, do the earned points come back off, and can you see that row?
  3. If a redeemed order fails, do the points go back to the customer?
  4. Has anyone ever added up all the balances and all the transactions and compared them?

If the answer to the last one is no, nobody knows whether the balances are right. That includes the vendor.

The full table, with every figure and how it is counted, is on the ChaatPass case study.