๐ This is the short version. The deep dive is in the README on GitHub: the architecture, one booking traced through every PayPal call, the money path and its six payment rules, how Bryntum, AG Grid and APIMatic are used, the engineering deep dives, and how to run it locally.
Inspiration
Picture Ana, who runs a two-chair salon. Mid-colour, foils in both hands, her phone rings three times and she can't pick up. Those customers book somewhere else. At 2:00 her next client simply doesn't show, and that hour is gone for good. In the evening she chases a deposit link nobody paid and works out a refund with a calculator.
The numbers behind that day are real: salons, barbers and spas lose 15โ30% of bookings to no-shows, and asking for payment upfront cuts that sharply. But for a small business, a deposit is a second job.
Then a new kind of message arrives: a customer's own AI assistant trying to "book my usual haircut for Saturday". That raised the question Flow is built around: when an AI is in the loop, who is allowed to move the money? The customer won't give an AI a blank cheque, the business can't let a model improvise a refund, and when a payment is disputed someone has to prove what was agreed.
What it does
Flow lets customers, and their own AI agents, book and pay at any business that takes bookings: every booking is paid when it's booked, and AI never decides money. It's built around what every appointment business has (services, staff, hours and a cancellation policy), so it fits a clinic, a tutor or a fitness studio as well as a salon. I use salons, barbers and spas as the example throughout, because almost everyone has booked a haircut.
For customers, one assistant behind five doors: web chat, Flow Voice in the browser, a store's Telegram bot, an Alexa skill, and their own AI (Claude, ChatGPT and others over MCP).
- "Book my usual": Flow knows past visits, finds nearby places, checks real availability and books.
- Log in with PayPal once, and every booking after that is paid with a single "yes".
- Let your own AI pay, within limits you set: a signed spending allowance (say, $50 a booking, $150 a month). Inside it, the AI pays on its own. Above it, it waits for the customer's click. An AI can never approve itself.
- Voice notes, photos and PDFs go onto the booking. Cancellations are refunded by the business's own policy.
โถ Booked from a handwritten note (90 seconds, a real recording): on Telegram, a customer photographs a note instead of typing, and Flow books the haircut and takes the $40 with their saved PayPal.


For owners, zero clicks per booking:
- Set up the business from a description and documents. AI drafts services, staff, hours and refund rules for the owner to approve.
- A calendar that follows PayPal, a live PayPal ledger, paid invoices for every booking.
- Disputes answered from evidence: Claude drafts the reply from the booking's own record, and nothing goes to PayPal until the owner sends it.
- Run the whole business from their own AI over MCP.
How I built it
- The rule at the core: the AI talks and picks tools; code decides every amount. Prices come from the business, refunds from its policy tiers, limits from a signed allowance, and the amount the AI passes must match the quote or nothing is charged.
- PayPal, used deeply (sandbox): Orders v2 (hold the seat, re-check, capture exactly once), Vault v3 (saved PayPal, with
stored_credentialtelling PayPal whether the customer or the merchant started each charge), Payments refunds, Invoicing v2, Log in with PayPal, Subscriptions, Partner Referrals, Disputes and signed Webhooks. The money path runs on PayPal's server SDK generated by APIMatic. - Money you can audit: Flow never holds money, and in production each booking pays the business's own PayPal. Every PayPal write carries a
PayPal-Request-Id, so a retry can't charge twice. The PayPal fee and the net on each payment come from PayPal's own breakdown, and the owner's AI checks Flow's records against PayPal's live and flags any mismatch. - AI: Claude Haiku 5.5 for the agent and its 70 tools (23 for customers, 47 for owners), Sonnet 5.5 as backup, the Files API for each business's knowledge base. Groq's Whisper hears voice notes; Amazon Polly speaks Flow Voice replies.
- Stack: Node 22 on AWS Lambda, API Gateway, DynamoDB and S3; a Next.js dashboard on Vercel with Bryntum Scheduler (the calendar colours every booking by its PayPal state) and AG Grid (the ledger and every owner table).
- Show the work: every AI step, seat hold and PayPal call appears on a live "Under the hood" timeline, redacted before it's stored.

Challenges I ran into
- Money exactly once, with an AI in the loop. Retries, double taps and webhooks arriving twice could all charge twice. PayPal request IDs on every write, a claim before a booking is written, and each webhook run once fixed it, checked against the live sandbox.
- A seat taken while someone pays. A 10-minute hold, a re-check before capture, and an automatic full refund if the booking still can't be made.
- Voice runs on a clock. Alexa gives about 8 seconds, so long turns run in the background from the start.
- Models are bad at calendars. "Saturday" once became the wrong date. Now dates are looked up, never computed.
Accomplishments that I'm proud of
- A customer's own AI can pay, and can never approve its own payment.
- One engine, five channels: a booking from any of them lands on the owner's calendar, in the PayPal ledger and in both inboxes at once.
- Zero amounts the AI can set, enforced by 533 backend tests.
- AI cost per demo run brought down from about $0.25 to about $0.03.
What I learned
- AI and money need a hard wall. Once the model can't compute an amount, every money bug becomes a normal code bug you can test.
- Cost is routing: sending each input to the right engine (Claude, Groq, Polly or the browser) decides most of the bill.
- A generated SDK catches a wrong field before the request is ever sent.
What's next
- A phone line, so customers can just call.
- Calendar sync with Google Calendar and Outlook, so Flow never double-books a business that already runs its day there.
- One-click import of an existing catalog (services, staff, prices, hours) from booking systems. Bookings Flow makes are paid through the business's own PayPal and written back as prepaid, so nobody is ever charged twice.
- Checking the ledger against PayPal's Transaction Search.
- A real launch: PayPal partner onboarding with live keys so each business is paid straight into its own account, and the Alexa skill published.
- More of the world: WhatsApp, and LINE for Japan, Taiwan and Thailand.
Built on an earlier project
Flow existed before this hackathon, but only as an idea and early code: a multi-channel AI booking platform for service businesses in India, with WhatsApp, Facebook, Instagram and LINE, multi-language text and voice, document processing, UPI payments and GST invoices. I couldn't pull it off on my own. Most of it was code passing data from one API to the next, and it never worked end to end.
The PayPal hackathon is where it became a real, working proof of concept. I rebuilt its payments around PayPal, made the agent safe to trust with money, added web chat, Flow Voice, Telegram, Alexa and MCP, and rebuilt the owner dashboard. I left WhatsApp, Facebook, Instagram and LINE out of this edition, because each needs business verification or licensing before real customers can use it.
Try it: flow-hackathon.onpratiks.com (sandbox, fake money; a guided tour walks you through) ยท Code: github.com/jercpass/flow-hackathon
Built With
- ag-grid
- alexa
- amazon-polly
- amazon-web-services
- anthropic
- api-gateway
- apimatic
- aws-lambda
- bryntum
- claude
- dynamodb
- groq
- leaflet.js
- mcp
- next.js
- node.js
- paypal
- paypal-disputes
- paypal-vault
- react
- telegram
- vercel
- whisper
