-
-
Window board at the stand: paid orders by pickup code. The refunded double charge is struck through.
-
Close-out: items sold minus items PayPal recorded gives the cash that should be in the box.
-
Season ledger (AG Grid): PayPal sales, expected cash, counted cash and deposit for every game.
-
Officers' notices: each one states the numbers that disagree and what to check next.
-
Opening count from one photo, the fan menu with PayPal, Venmo and card buttons, and the pickup code after PayPal captures.
-
PayPal's own record of an order, read back after capture. Halftime stores these line items, not what the browser sent.
-
Closing count: PayPal's sales show at most 3 hot dogs can be left, so a count of 4 is flagged for a recount.
What I built
Halftime closes out a school booster club's concession stand at the end of a game.
A volunteer photographs the stocked table before kickoff and the leftovers after the final whistle. In between, fans pay at the window by scanning a QR code and checking out with PayPal, Venmo or a card, and every order carries its items: two hot dogs, one water. At the end of the night Halftime subtracts what PayPal sold from what left the table. Whatever is left over was sold for cash, so the app knows how much cash should be in the box before anyone opens it.
Two volunteers then count the box without seeing that number. The next day a third person records the bank deposit. When the numbers disagree, a short notice with the figures and what to check appears in the officers' inbox. The parent who bought the supplies is repaid through PayPal Payouts once someone else approves it.
The problem
Booster clubs run the snack stand at almost every high school football game in the US. The stand is staffed by whichever parents signed up that week, it takes hundreds of small cash sales, and afterwards nobody can say what the night should have made. Counting the box tells you what is there. It can't tell you what should be there.
That gap keeps showing up in police reports and state audits:
- Hilliard, Ohio. Police say a boosters' concessions treasurer withdrew more than $40,000 over two years. The problem surfaced because cash sales never matched deposits. (CW Columbus)
- McKeesport, Pennsylvania. Investigating a band boosters club, police said there was "no way to determine how much cash from concession stands is missing." (CBS Pittsburgh)
- DeKalb County, Tennessee. A band boosters treasurer was indicted in August 2026 over more than $48,000. Part of it, $2,543.50, was collected through Venmo and never deposited. (Tennessee Comptroller)
Halftime is for the volunteer treasurer who inherits the cash box, usually a parent doing it for the first time. They need a number they can trust the morning after a game, and a way to raise a difference without accusing a neighbour on a hunch.
How it works
1. Opening count. Before the game a volunteer takes one photo of the table. Halftime suggests a count for each menu item and draws a numbered box on every unit it counted, so the volunteer can see exactly what was counted and fix it with +/− buttons. A second volunteer checks the count before it is saved.
2. Selling. Fans scan the booth QR code, pick items and pay with PayPal, Venmo or a card. The server builds the order from the club's own prices, so the browser can't change what something costs. After PayPal captures the payment, the window tablet shows a big pickup code and the items to hand over. A declined payment stays red and the buyer can try another method. A double-charged parent can be refunded from the night page, and the refunded items leave the PayPal column straight away.
3. Closing count. After the game, one photo of what's left, plus anything dropped or given away. Halftime builds a table for every item: opened with, closed with, sold, paid through PayPal, and the rest, which must have been cash.
PayPal's records are exact, so they also check the count. If PayPal says 14 sports drinks were sold and the photos say only 12 left the table, one of the counts is wrong. Halftime asks for a recount of that item instead of producing a negative cash figure.
4. Cash count. Two volunteers who did not do the closing count count the box one after the other, without seeing the expected amount or each other's count. Once they start, the closing count is locked. If they agree, Halftime compares their count with the expected cash: green when it matches within $1, amber within $5, red beyond that.
5. Deposit. The next day someone who did not count the cash enters the bank deposit, with an optional photo of the slip. Halftime compares it with the counted cash minus the opening float. A difference puts a notice in the officers' inbox that states the numbers and the next step.
6. Reimbursement. The parent who bought the supplies asks to be repaid. Someone else has to approve (an officer or the treasurer), and only after the opening count is confirmed, so the receipt can be checked against what actually arrived at the stand. Approval sends a PayPal payout.
The season page lists every game: PayPal sales, expected cash, counted cash, deposit and both differences.
A worked example. The stand opens with 40 hot dogs at $3 and ends with 7. That's 33 sold. PayPal recorded 19 hot dogs across the night's orders, so 14 were sold for cash: $42. Do that for each item, add the $100 float, and you have the amount that should be in the box.
How I built it
PayPal. Every digital sale is an Orders v2 order with line items (SKU, quantity, unit price), an item total, custom_id set to the game and booth, and a PayPal-Request-Id so a double-tapped Pay button can't create two orders. The buyer pays through the PayPal JavaScript SDK buttons for PayPal, Venmo and guest card checkout. After capture, the server reads the order back from PayPal and stores PayPal's line items, not the browser's. Refunds go through Payments v2. Webhooks are verified with verify-webhook-signature, stored once by event ID, and used to catch captures, refunds and payout updates that happen outside the app. Reimbursements use Payouts with the reimbursement ID as sender_batch_id. I used PayPal-Mock-Response to test the declined-card path.
Orders and Payments calls go through the PayPal Server SDK generated by APIMatic. Payouts and webhook verification aren't in that SDK, so they use a small typed fetch client.
The photo count. This is the only place Halftime uses AI. Gemini 3.5 Flash receives the photo and a one-line description of each menu item and returns a count per item with a box for each unit. The response is checked against a zod schema before anything is shown. The model never sees prices or money, and a volunteer confirms every count. On the two demo photos it counted every item correctly. Without an API key, the app replays those recorded results or the volunteer counts by hand.
The close-out math. The engine is a set of pure TypeScript functions over integer cents, with no database or network access. Property tests (fast-check) check that totals always add up exactly, that expected cash is never negative, that refunded orders never count and that any item where PayPal exceeds the photo count is flagged. The separation-of-duties rules (checker ≠ counter, closing counters ≠ cash counters, second cash counter ≠ first, depositor ≠ cash counters, approver ≠ requester) are plain functions shared by the API and the tests, and every name is checked against the club roster on the server. There are 246 automated tests, and CI runs the type check, the tests and a production build on every push.
The app. Next.js 16 and TypeScript in strict mode, zod at every API boundary, SQLite through Node's built-in driver so it runs with npm install && npm run dev and no database setup, Server-Sent Events for the window board, AG Grid Community for the season ledger, and Render for hosting. The live demo runs on Render's free plan against the PayPal sandbox.
Challenges I ran into
The hardest decision was what the photo count should not do. A miscount could make an honest volunteer look short. So the count is only ever a suggestion with visible boxes, two people sign off on it, and PayPal's sales act as a floor. When the photo count can't be right, Halftime asks for a recount instead of reporting a cash difference.
Webhooks can arrive late, twice or out of order. The screen a volunteer is looking at never waits for one. It updates from the synchronous capture and the order read-back, and webhooks only fill gaps.
Accomplishments that I'm proud of
The whole close-out runs on three people and a few minutes of work, and every number on the result screen can be traced back to a photo, a PayPal order ID or a person's count.
What I learned
PayPal's itemized orders are more useful than the payment itself. Once each sale says what was bought, the digital half of the night is exact. That turns a cash count from "what's in the box" into "what should be in the box".
What's next
- Sign-in for volunteers and officers, so roles are enforced by account and not by name.
- A pilot with one booster club for the rest of the season, to measure how often the photo count needs correcting on a real table under stadium lights. The app already logs every correction a volunteer makes to a suggested count, so that number will come straight out of the pilot.
- Support for several stands at one event and a printed count sheet for clubs that prefer paper.