← Blog
By Raman Halder··6 min read

Pay When You Leave: Rules a Table-Ordering App Must Settle

We built QR table ordering for Vivere Bay Cafe, where guests order in rounds and pay on the way out. These are the rules that had to be written down first, and what we parked.


Key takeaways: When guests pay at the end, the product is built around the table's bill, and most of the hard rules are about who shares that bill and when it locks. Write down what should happen when two people do the same thing at the same moment, because in a busy cafe they will. Having staff confirm every payment, online ones included, is a reasonable first version. Decide how a walk-out gets recorded before the first one happens.

The Cafe

Vivere Bay Cafe wanted guests to order from their table and pay on the way out, the way they would with a waiter. The owner asked us for a working proof of concept of the web app, and that's what we built. It has three parts: a web app the guest opens from the QR code on their table, a live board for staff on their phones and on a tablet at the pass, and an admin console for the owner.

It's deployed and runs in any browser, so you can open the proof of concept and look around. It hasn't been through a real service yet, so everything below describes the rules we settled while building it, and some of them will probably change once real tables use it.

Why Paying Last Changes the Design

A lot of QR ordering takes payment before the kitchen sees the order. Each order is a small closed transaction and nobody shares anything. That wasn't what this cafe wanted. A table orders coffee, then a sandwich twenty minutes later, then something for the friend who turned up late, and they expect one bill at the end.

So the system is built around a tab instead of an order. A table has at most one open tab. Each order placed from that table is a round on the tab, and the bill is every round added up. Nearly every question in this post comes from that choice, since a tab is shared by everyone at the table and can stay open for an hour or more.

The Rules We Wrote Down

SituationWhat happens
Four friends scan the same table's codeThey all join one tab. Each phone's orders show as its own round
Someone types a table number instead of scanningThe picker only offers tables with nothing going on. To join a busy table you scan the code on it
Someone orders after the bill was requestedThe order is refused with a message to ask their server, and their cart stays on the phone
Two phones at one table both tap Request billThe first one counts. The second sees "Bill already requested"
An item sells out while it's in someone's cartThe order stops, that item leaves the cart with a message naming it, and the rest is ready to send again
Weak signal, and the guest taps Place order twiceThe kitchen gets one round
The owner changes a price during lunchRounds already placed keep the old price. The next round uses the new one
A guest pays onlineA server checks the money arrived and confirms it, the same as cash or card
Two servers confirm the same bill at onceOne payment is recorded. The other sees "This bill is already closed"
Two staff tap the same ticket at onceIt moves forward one step
A round was ordered by mistakeStaff cancel it and the bill drops
A table leaves without payingStaff close the tab as unpaid. No payment is recorded
A guest comes back next weekTheir cart is empty. Carts older than six hours are dropped

Most of these took one line to agree on. A few took longer, and those are below.

The Table Is the Unit

Guests don't have accounts. A guest is whoever scanned the code on a table, and the bill belongs to the table. Rounds carry a label like "Phone 2" so staff and the table can tell orders apart, but there's one bill. Split bills are on the parked list.

That makes the table code more important than it looks. Each table's QR carries its own code, and guests never see the codes of other tables. If you could join a tab by typing "12", anyone in the room could add things to table 12's bill or see what they'd ordered. There's also a generic menu link that isn't tied to any table. It asks which table you're at, and it only lists tables that don't have an order going.

When the Bill Locks

Once someone taps Request bill, the tab stops taking new orders. Otherwise a guest could pay the total at the counter while a friend adds a cold brew that nobody pays for. Freezing the tab is the simplest way to keep the total the guest saw and the total the server collects the same.

The staff side works on the same idea. The confirm button shows the amount the server is about to accept. When they tap it, the system checks that amount is still the bill's total. If something changed in between, say a round was cancelled, the confirm fails with "The bill changed. Check the new total before confirming." It's a small check, and it's what stops the day's records drifting away from what's in the till.

Staff Confirm Every Payment

The guest picks cash, card or online payment at checkout. For online payment the screen shows a payment link with the exact amount filled in. In every case, a server confirms the payment before the tab closes.

The brief left room for a payment gateway to confirm online payments on its own later, and that's still the plan for a later stage. For the first version we left it out. A gateway brings an account, fees, webhooks and its own ways of failing, and a cafe with servers on the floor already has someone who can check a payment came in. When a gateway is added, it confirms the same tab the same way a server does, and nothing else in the flow changes.

Walk-outs Without Fake Payments

Every cafe gets the occasional table that leaves without paying, and the occasional order placed by mistake. If the only way to close a tab is to record a payment, staff will record a fake cash payment to free the table. Then the day's cash total stops matching the drawer, and nobody can tell why.

So staff can cancel a round, which takes it off the bill, and close a tab as unpaid, which frees the table with no payment attached. The brief also asked for a reason on every walk-out and a list of them at day close. Those come with the day-close work in the next stage. For now the system records that a tab was closed unpaid, and when, but not why.

What We Parked

The first version leaves out item options with price changes (size, milk), split bills, a payment gateway, receipts by SMS or WhatsApp, day close with cash reconciliation, an audit log, CSV export, service charge, tips, and moving a tab to a different table. Delivery, takeaway and guest accounts were out from the start.

Some of these are already provided for. The phone number is collected at checkout today, so sending receipts to it later won't change what the guest does. Free-text notes on items are in, which covers "oat milk please" until options exist.

If You're Briefing a Table-Ordering System

  1. Say whether guests pay before or after they eat. Most of the other rules follow from that.
  2. Decide who shares a bill and how someone joins one. Including what stops a stranger joining.
  3. Say when the bill locks. And what a guest sees if they try to order after that.
  4. List the things two people might do at the same moment. Two phones, two servers, two taps on a bad connection. Say what each should produce.
  5. Decide how a walk-out and a wrong order get recorded. If you don't, staff will invent a way.
  6. Say who confirms a payment. And whether that changes when a gateway arrives.

The membership plans the owner asked for midway through are in the engraved cup post, and the engineering post covers how these rules are enforced. If you're planning something like this for a cafe or restaurant, tell us about it.