← Back to The Mixing Bowl
building in publicengineeringproduct

The Email That Said "Paid in Full" to a Customer Who Owed $260

By Chad Holdorf·October 19, 2026·5 min read

Every order in Bakery Buddy carries a balance due, and most of the time a number next to a dollar sign is the simplest thing in the whole app. It wasn't, for one specific case. An order that has never been priced shows a balance of exactly zero. So does an order that's been paid off in full. Two completely different situations, the same number.

A zero that means "nothing to pay" and a zero that means "nothing decided"

An order starts life as an inquiry, with no price set yet. Every total on it, the subtotal, the balance due, all of it, reads zero, because nothing has been quoted. That part is correct. It would be strange for an unpriced cake to owe anyone anything.

The trouble starts the moment some other piece of code looks at that same order and asks the simpler question instead: is the balance zero? Yes. So it concludes the order is paid in full. That is the exact same conclusion a real, fully paid, $900 wedding cake produces. Nothing about the number by itself says which one you're looking at.

It showed up on the order page first

The order detail page used to decide "fully paid" by checking only whether `due` was zero or less, with no separate check for whether a price had ever existed on the order at all. An order still sitting at `status: inquiry`, never quoted, read "Paid in full" on its own detail page. One version of that banner even stated a figure: "Paid in full. $0.00 received." A sentence that argues with itself the moment you slow down and read it.

Then it flagged every new inquiry as a pricing risk

A second, unrelated feature hit the same zero from a different angle. Bakery Buddy compares a new order's price against similar past orders and warns the baker when one looks underpriced, using roughly: the order's total minus the average of its comparables, divided by that average. For a brand-new inquiry with a total of zero, that math comes out to negative 100 percent every single time, because zero minus anything, divided by anything, is always the whole thing. Every fresh inquiry Lindsay opened looked like the worst-priced cake she had ever quoted, before she had quoted it at all. Thirty-six orders in her account were showing "Paid in full" for the identical reason: cakes nobody had priced yet, not cakes anyone had paid for.

The one that reached a real inbox

The third time, it reached an actual customer. Bakery Buddy drafts an email when an order moves from inquiry to invoice, and the line that states the money worked the same way the other two did: if the balance due is zero, say so is paid in full. A real $260 order went out exactly that way. An estimate that had never been priced, telling the customer she owed nothing and thanking her for a payment she had never made.

None of these three were the same piece of code. They were three different features, built at different times, and each one independently decided on its own that a zero balance meant the account was settled, because taken alone, locally, that is a perfectly reasonable thing to assume about a zero.

Asking the right question first

The fix, in all three places, was the same move: stop asking "is the balance zero" and start asking "was a price ever actually set." An order that has never been quoted has no subtotal at all, not a zero one, an absent one. That is a different, checkable fact from a balance that has been paid down to zero. Bakery Buddy now checks that first, through one shared function instead of three separate guesses, and only reasons about the balance once it already knows there is a real price behind it.

What a zero never tells you on its own

A value that can mean two opposite things is more dangerous than a value that is simply wrong, because it never looks wrong. $0.00 due reads exactly the same whether everything was paid or nothing was ever asked for. Nothing in a build or a type check catches that, because both situations typecheck fine, compile fine, and render a perfectly well-formed zero. The only way to catch it is to ask where the zero actually came from before deciding what it means, every single time a balance of zero is about to become a sentence a real customer reads.

Frequently Asked Questions

What actually went wrong?

Bakery Buddy treated a balance of zero as proof an order was paid in full, without separately checking whether a price had ever been set. An order that has never been quoted also has a balance of zero, so the same logic that correctly recognizes a fully paid cake also mistook a brand-new, unpriced inquiry for a settled one, in three separate places: the order detail page, a pricing-risk warning, and the automated invoice email.

Did a real customer actually receive the wrong email?

Yes. A $260 order that had only been quoted as an estimate, with nothing paid yet, went out with the email's money sentence reading that the order was paid in full and thanking the customer. She hadn't paid anything.

How did 36 orders end up showing "Paid in full" without being paid?

A separate pricing-risk check compared each new order's total against similar past orders. For a brand-new inquiry with a total of zero, that comparison always came out the same way a genuinely underpriced order would, so 36 never-quoted inquiries were flagged identically to orders that had actually been paid.

What's the general lesson?

A number that can mean two completely different things depending on its history, here, zero because everything was paid versus zero because nothing was ever priced, needs its own explicit check before it gets used anywhere, not just a read of the number itself. Check whether a price exists before asking whether the balance is zero, not after.

Written by
Chad Holdorf
Founder, Bakery Buddy

I build Bakery Buddy for my wife Lindsay's cake studio, Marin Cake Studio, and this is the bug that taught me a zero is never just a zero.


Ready to put this into practice?

Join the Waitlist