Inspiration
When life gives you lemons, you should be able to sell lemonade, and take PayPal for it, in the time it takes to write the sign.
Lots of people sell only a few days a year: a convention artist with a folding table, a school bake sale, a garage sale, a kid's lemonade stand. They already have two things, a handwritten price sign and a phone. What they don't have is time to set up a point-of-sale app. Those apps want every item typed in before the first customer arrives, and usually a card reader too. A PayPal QR code takes money, but the seller still adds up each order by hand and can't tell which customer's payment just came in.
We wanted the sign the seller already made to be the setup, and we wanted an assistant to handle the small jobs while their hands are full.
What it does
Lemon Pal is the easiest way to start selling with PayPal: snap your sign, tap to charge, get paid. It runs in the browser, on the seller's tablet and the buyer's phone. PayPal takes every payment, and Claude does the work that used to be setup.
- Snap your sign (AI). The seller photographs their price sign. Claude reads every item, price and multi-buy deal like "2 for $5" into a draft. If a price is smudged, Claude leaves it blank and flags it instead of guessing, and the stand can't open until the seller fills it in.
- Tap to charge. The confirmed items become big tiles on a tablet register. The server prices the cart from the stored catalog, applies deals, and shows a QR code for that one sale.
- Get paid (PayPal). The buyer scans the code, sees the same items and total, and pays with PayPal on their own phone. No app, no card reader. The seller's screen flips to Paid and dings only after PayPal reports a completed capture for that exact amount and currency.
Then the stand keeps running itself:
- Ask Pal (AI agent). Pal, a smiling lemon on every seller screen, takes plain words, typed or spoken: "mark prints sold out", "add a 2 for $5 deal", "close the store for today". The change lands at once with an Undo button. Anything that moves money, like a refund or marking an order shipped, comes back as a card, and PayPal is called only when the seller taps confirm. Pal can also read a new photo of the sign and bring the stand up to date.
- See what sold (AG Studio + AI). The Sales desk is an AG Studio dashboard with live totals, standouts and every receipt behind them. Booth Analyst, AG Studio's built-in assistant running on Claude, adds charts on request.
- One payment core, three kinds of stand. A stand at events (the register), an online store with pickup or shipping, and a donation jar with one fixed QR code for pay-what-you-want gifts.
Who it's for: occasional, in-person sellers who have a sign and a phone, not a merchant account and an afternoon to configure software.
How we built it
PayPal Developer Platform (Sandbox), used for the whole life of a sale, not just the button:
- JavaScript SDK v6 renders PayPal Checkout on the buyer's phone.
- Orders v2 creates and captures each order on the server, with an itemized breakdown, deals and shipping.
- Capture verification: a sale becomes
paidin exactly one place, the capture route, and only after the capture's status, amount and currency match the sale. - Idempotency: every create, capture and refund sends a
PayPal-Request-Idderived from the sale id, so a retry from either device can't charge or refund twice. - Refunds from the Sales desk, and shipment tracking sent back to PayPal for online orders.
- Log in with PayPal for seller accounts.
- PayPal's MCP server: Booth Analyst can check a receipt's capture, fee and net with PayPal.
Claude Haiku 5.5 (Anthropic API) in three distinct roles:
- Vision with structured outputs reads a sign photo or a pasted list into a typed draft catalog. The server validates it, drops impossible prices, and checks that each deal actually saves money.
- Pal, a server-side agent with twelve tools. Its loop runs on our server, so the model only ever sees tool results our server produced. Its tools can change the stand but cannot call PayPal: money actions are proposals that the browser runs through the screen's existing route when the seller confirms. Chats are saved append-only, so they survive a reload or restart, and prompt caching keeps each turn fast and cheap.
- Booth Analyst in AG Studio's Agent Framework, through a custom Claude adapter we wrote. AG Studio runs its agent loop in the browser, so our server holds the API key, replays Claude's thinking blocks unchanged between turns, and uses context editing to keep long chart sessions under the price step.
AG Grid and AG Studio power the Sales desk: custom widgets, live updates as sales arrive, filtering receipts by item, our own Citrus Glass theme, and the Agent Framework with our Claude harness swapped in. Pal also hands chart questions to Studio's built-in agent, so our agent and AG Studio's work together.
Product and platform: Next.js 16, React 19, TypeScript and Tailwind CSS 4, with SQLite on Node's built-in node:sqlite, hosted on Render as one web service with a persistent disk. We built our own design kit, Citrus Glass, with large touch targets for a busy counter, status always shown as color plus icon plus word, light and dark modes, Dynamic Type, Reduce Motion, and layouts from a 320px phone to a desktop.
For judges: anyone can open a demo account. Real AI unlocks with the passcode in the testing instructions. Without it, the AI is simulated: demo signs and Pal's suggested requests run through the same tools and cards, so the app can be explored freely without spending our API budget.
Challenges we ran into
- Never showing Paid too early. The buyer approving in PayPal isn't the payment. We moved the paid state behind server-side capture verification, made cancel and capture updates atomic so a late cancel can't undo a real payment, and keyed every PayPal call so retries are safe.
- A guessed price is worse than a missing one. A vision model wants to answer, and a confidently wrong price on a register is worse than none. We made "unreadable" a valid answer in the output schema, told the model never to calculate a price that isn't shown, and made the review screen refuse to publish until the seller fills in every blank.
- Putting an agent near money. Pal needed to feel instant for small changes but must never refund on its own. The answer was a hard line: every change gets an Undo record, every money action is a proposal, and no tool can reach PayPal.
- Connecting AG Studio's agent to Claude. Claude's thinking blocks must be sent back unchanged during tool use, and AG Studio's conversation format has nowhere to keep them. Our server caches each assistant turn by id and replays it exactly.
- PayPal's MCP server in the Sandbox. The documented HTTP path returned 404 for us. Only the SSE transport answered, so our client speaks SSE.
- Log in with PayPal and business accounts. In the Sandbox, PayPal issued a token for a business account but refused to describe it on both userinfo endpoints. We fall back to the signed-in identity in the OpenID
id_token, so the sellers most likely to use Lemon Pal can still sign in.
Accomplishments that we're proud of
- One unbroken flow across two devices: a cardboard sign becomes a register, a PayPal Sandbox capture on the buyer's phone turns the seller's screen to Paid, and the same sale appears on the dashboard.
- First sale 30 seconds after AI sets up the store from a photo, paid through PayPal on the buyer's own phone.
- An agent sellers can trust near money. Every change has Undo, every payment action needs a tap, and the rule is enforced in code, not in a prompt.
- Six parts of the PayPal Developer Platform and three Claude roles in one product, each listed with its source file in the README.
- A finished product, not a proof of concept: three kinds of stand on one payment core, accounts, receipts, refunds, shipping and donations, built on our own accessible design kit.
What we learned
- A model that can say "I can't read this" is more useful than one that always answers. Building that into the schema made the AI trustworthy to a seller.
- Idempotency keys make a two-device checkout safe. Once every PayPal call was keyed to the sale, retries, refreshes and double taps stopped being edge cases.
- Agent safety is easiest as architecture. Running Pal's loop on the server, with money actions only as proposals, made the rule simple to state and simple to check.
- The Sandbox has its own quirks. The MCP server's transport, userinfo with business accounts, and Return URLs per host all behaved differently from the docs. Logging which step failed saved us hours.
What's next for Lemon Pal
- PayPal seller onboarding, so each seller is paid straight into their own PayPal account instead of a shared Sandbox merchant.
- Native seller apps for iPhone, iPad and Android, with the buyer side staying a web page anyone can open from a QR code.
- Stock counts that come from the sign, so Pal marks an item sold out on its own when the last one sells.
- Emailed receipts and a first real season with pop-up sellers, to measure setup time and sales against their current way of selling.
Built With
- ag-grid
- ag-studio
- agentic-commerce
- ai-agents
- anthropic
- claude
- computer-vision
- log-in-with-paypal
- mcp
- next.js
- node.js
- paypal
- paypal-checkout
- paypal-javascript-sdk
- paypal-mcp
- paypal-orders-api
- point-of-sale
- qr-code
- react
- render
- small-business
- sqlite
- structured-outputs
- tailwindcss
- typescript