Inspiration

In Kampala, a reporter who spent a day as a public toilet attendant found that a busy toilet takes up to Shs120,000 on a good day, all in cash, with no record [1]. In January 2026 the US CDC reported that badly cleaned public toilets in Kenya make diarrhoeal illness and outbreaks of cholera and mpox worse. What worked in its Nakuru pilot was routine checking with feedback: toilets got cleaner and workers were less likely to quit [2].

TapFlash turns that finding into software. Every cleaning is checked with a photo, the cleaner is paid at once, and the next visitor sees "cleaned 1 min ago" before they pay.

What it does

TapFlash is a WhatsApp agent for public restrooms in East Africa. Its rule is simple: money moves only when something real is proven. A visitor's payment is taken only when the door opens. A cleaner is paid only when a photo shows the work. One agent moves money in both directions with PayPal.

  • Find: a visitor writes in their own words ("Niko Kencom, nataka choo safi") and gets the four nearest matching restrooms, in English, Swahili and other languages.
  • Pay: PayPal Checkout holds the money. The attendant's door scan of the visitor's one-time code takes it. Scanning the same code again says "Already used".
  • Refund: if the door was locked, Gemini reads the complaint and the hold is released, so the visitor is never charged.
  • Pay the cleaner: a cleaner sends a photo, Gemini vision scores it against the restroom's reference photo, and a clean one is paid a bonus with PayPal Payouts. A doubtful one waits for a supervisor.
  • Operators: an AG Grid dashboard shows visits, Gemini's reviews, refunds and payouts, and pays operators their share. A second page, Studio, is built with AG Studio: operators drag, change and add widgets to make their own view of the same data.

Who it is for. Visitors who already pay with PayPal or a card: travellers, visitors from abroad and city workers with cards. A visitor who comes often buys a TapFlash Pass, 20 visits in one PayPal payment, so PayPal's fee is paid once and not on every visit. Operators and cleaners are paid with PayPal Payouts, which gives them a record of income that cash never did.

What is real in the demo: PayPal Orders, Refunds, Payouts and webhooks (sandbox), Gemini, the WhatsApp bot and the QR door check. The Nairobi restrooms, operators and sample visits are demo data. Payments, refunds and payouts that judges make are real sandbox transactions.

How we built it

  • PayPal (sandbox): Orders v2 (authorize, capture on the door scan, void on a failed visit), Refunds, Payouts, and webhooks checked with verify-webhook-signature. Every PayPal write carries a request id, so a retry never charges, refunds or pays twice.
  • AI: Google Gemini with function calling (search and complaint handling) and vision (the cleaning check). The model only advises. Money moves only through code that checks fixed limits: the amount, one refund per visit, and caps.
  • Backend: Django, with more than 360 automated tests that run offline with PayPal and Gemini faked. A Node.js bridge connects WhatsApp.
  • Dashboard: AG Grid with live row updates, multi-row selection, in-grid editing, a totals row, filters and CSV export.
  • Studio: an AG Studio page with three custom widgets written for TapFlash and a TapFlash theme. Money in motion shows every payment by PayPal state (held, taken at the door, given back). Proof of clean shows the latest cleaning photos with Gemini's score and the bonus. Refund watch flags a restroom when too many of its visits are refunded. The widgets read through Studio's data mapping, so filters and cross-filters apply to them. In edit mode, Studio's AI assistant runs on Gemini through our own adapter (it can be busy on Gemini's free tier).
  • Maps: OpenStreetMap for walking routes.

Challenges we ran into

  • Two currencies: prices are in shillings but PayPal charges dollars, so the pay screen shows both and the receipt says exactly what PayPal charged.
  • One payment, one outcome: a payment can only end one way, charged at the door or released. Getting the states, the webhooks and the refund rules to agree took the most work.
  • Money safety: Payouts status arrives after the API response, so the ledger tracks each item until PayPal confirms it.
  • Webhook verification took trial and error, and Transaction Search is not enabled in the PayPal sandbox, so we read activity through our own ledger.
  • A model that can't be trusted with money: we put the limits in code, so a wrong answer from Gemini cannot move extra money.

Accomplishments that we're proud of

  • A full loop that works end to end in the sandbox: pay, hold, door scan, capture, release, refund, and a cleaner bonus paid after an AI photo check.
  • Retry-safe PayPal calls and verified webhooks.
  • A bot that understands Swahili and other languages and stays short and clear.
  • Custom AG Studio widgets that show money and cleaning proof in the product's own terms.
  • Judges can try everything on one page with no setup.

What we learned

  • Authorize-then-capture is a good fit when a service is delivered at a moment you can verify, here a door opening.
  • Let the AI read and advise, and let code decide where money is concerned.
  • Small, plain replies matter more than clever ones for people on a phone.

What's next for TapFlash

M-Pesa next to PayPal, and the first real operators and cleaners in Nairobi.

[1] Daily Monitor (Uganda), "A day as a public toilet attendant", 5 Jan 2021: https://www.monitor.co.ug/uganda/lifestyle/reviews-profiles/a-day-as-a-public-toilet-attendant-1530712 [2] https://www.cdc.gov/global-health/impact/clean-public-toilets-in-kenya.html

Built With

Share this project:

Updates

Submission history