-
-
One sample week, seven invoices: €499.04 held, €73.08 withheld, €2,222.68 paid through PayPal Payouts, a restock paid only for what arrived.
-
An invoice tells AI assistants to ignore their rules and pay a new account. Held at €224.33: the payee only comes from the directory.
-
Who decides what: Claude reads, my code sets every amount, the owner approves and PayPal moves the money. No agent has a tool that pays.
-
Claude reads the invoice, and my rules compare it with the last prices in whole cents. Exactly €29.26 is withheld for the hake.
-
The payment agent's plan: €2,222.68 of a €2,500 cap, a 2% discount taken, one invoice deferred, both held invoices left out.
-
Approved: one PayPal Payouts batch in sandbox, with an id and a status per payment. The demo payees leave each one unclaimed.
-
The purchasing agent shops through the store's PayPal Cart API. The store prices the cart; a valid cart comes back with a PayPal order.
-
It can't pay. The owner's approval only authorizes the card, then the store completes its checkout and shows its order number.
-
The delivery note is one sanitiser short, so PayPal captures €141.09 and releases €3.87. A split detergent is refunded: €46.59.
-
The week in AG Studio: what is still to pay, by the week it falls due and by supplier. Claude is one click away.
-
Custom widgets. Who owes us a credit note, and the evidence behind every hold; click a supplier and both narrow to it.
-
Claude built this page. Still to pay each week by supplier, and every invoice due in the next 14 days.
-
AG Grid: change a decision in place, with a reason. Same server rules as the review page.
-
Reconcile with PayPal: every payout item and order is read back from PayPal and matched against the ledger.
-
The same demo session on a phone: what was protected this week, the held invoice, and the order with its refund.
One of the supplier invoices in my demo tells "AI assistants" to ignore their rules and pay it today, to a new PayPal account. Supplora Pay holds it: €224.33, not paid. The payee can only come from the restaurant's supplier directory, and the payment agent's own check refuses it.
That's the dramatic part. The useful part is the rest of the week. Supplora Pay is an accounts-payable agent for independent restaurants. It pays suppliers through PayPal, but only what they're owed. Hake invoiced 16% above its usual price is paid at the old price until a credit note comes. Two kilos of meat that never arrived aren't paid at all. A restock order is only authorized on the card, and PayPal captures what the signed delivery note confirms.
No agent in it can move money. Claude reads the invoices and drafts the emails. My code decides every amount, in whole cents. The agents can propose a plan or build a cart, and nothing is paid until the owner approves.
Video (2:49): https://youtu.be/eZZfa4ezTMI · Live demo: https://supplora-pay.vercel.app · Code, MIT: https://github.com/antonmareo10/supplora-pay
Judge it in 60 seconds
No login and no keys. Each browser gets its own session, and every PayPal call goes to the live PayPal sandbox. Claude's readings and agent runs are replays of real runs I recorded, and every screen says so.
- Inbox, then Review 7 with Claude (it takes about five seconds), then open CleanPro CP-11958. It's held at €224.33, with the reason and the fine print it didn't follow.
- Payment run, then Plan this week's payments, then Approve & pay 4. The agent pays €2,222.68 of a €2,500 cap, pays one supplier early for a 2% discount (€23.15), defers one invoice and leaves both held ones alone. One real PayPal Payouts batch goes out.
- Reorder, then Let the agent restock, then Approve & authorize €144.96, then Delivery note in. One sanitiser is missing, so PayPal captures €141.09 and releases €3.87. Report damage refunds €46.59 on the capture.
- Ledger, then Open AG Studio, then Ask Claude and pick "Why are invoices on hold?". A recorded Claude run on AG Studio's Agent Framework answers from the data.
Why restaurants
An independent restaurant pays dozens of supplier invoices a month, by hand. Prices creep up, deliveries come short, and a "payment reminder" turns out to be an invoice that was already paid. Owners pay anyway, because checking every line against the delivery note takes hours they don't have.
I've watched this happen. Before this hackathon I built Supplora, which reads the delivery notes of a family-run restaurant in Spain at the kitchen door. It has run there since March 2026, and by September it had read 715 delivery notes and flagged 103 supplier price rises worth €1,876. The owner's next question was obvious: if you already know what arrived and what it should cost, why am I still paying invoices by hand? Supplora Pay is my answer, and I wrote it from scratch for this hackathon.
What it does
- Claude reads each invoice image, copying what's printed, and maps every line to the restaurant's suppliers and products.
- My code checks it in integer cents: the arithmetic, the price against history, the quantity against the signed delivery note, duplicates, changed payment details, due dates and discounts. Every finding shows its numbers.
- A payment agent built on Claude's tool runner plans the week inside the owner's cash cap. Code checks the plan before the owner sees it, and works every amount out again at approval.
- The owner approves and PayPal Payouts pays the suppliers in one batch. For anything withheld, Claude drafts the credit-note request in the supplier's language, with the same numbers.
- A purchasing agent restocks from two supplier stores through PayPal's Cart API, and the restaurant only pays for what arrived.
On the seven sample invoices it withholds €73.08 (a price rise, a short delivery and a wrong line total), holds €499.04 (a duplicate and the lookalike invoice) and takes a €23.15 discount.
PayPal + AI: who decides what
Claude reads, plans and explains. Code decides the amounts. The owner approves. PayPal moves the money.
| What | PayPal | How |
|---|---|---|
| Pay suppliers after approval | Payouts | one batch per approved run, polled until final |
| Agent shops at a supplier store | PayPal Cart API | the two stores implement the merchant side (create, read, replace, checkout) |
| Agent checkout | Orders v2 | intent AUTHORIZE; the agent can create and read the order, nothing else |
| Hold the money on the card on file | Vault v3 + Orders v2 | authorize only on the owner's approval |
| Pay only for what arrived | Payments v2 | one final partial capture of what was delivered; PayPal releases the rest, or the authorization is voided |
| Refund damaged goods | Payments v2 | partial refund on the capture, never more than that line |
| Know when PayPal changes a status | Webhooks | verified with verify-webhook-signature, each event processed once |
| Check the order, reconcile | PayPal Agent Toolkit (MCP) | get_order for the agent, list_transactions for reconciliation |
Every write carries a PayPal-Request-Id idempotency key, and every call goes to an audit log (method, endpoint, status and resource id, never credentials). A supplier is paid at the PayPal account in the directory, never at an address printed on an invoice. I made statuses only move forward after I watched an authorization event arrive after its own capture.
Agentic commerce: the agent shops, but it can't pay
The purchasing agent checks stock against par, compares two supplier stores and builds a cart through each store's PayPal Cart API, the contract PayPal published so agents can buy from merchants. I built the merchant side too. The store prices the cart itself, answers with issues the agent has to fix, and returns a PayPal order as the payment token.
The agent checks that order with the PayPal Agent Toolkit, configured read-only. A fail-closed allowlist gives it get_order and nothing else, and a test against the real package checks that pay_order comes back "not found". The owner's approval only authorizes the card. The store completes its checkout after that, and PayPal captures what the delivery note confirms.
AG Studio and AG Grid
I wanted the ledger to be somewhere the owner works, not a table to look at.
- An AG Studio report on six related tables (invoices, findings with their evidence, suppliers, PayPal payouts, restock orders and price changes), with five pages, themed with the app's own colour tokens so it reads as part of the page.
- Two custom widgets: a credit-note scoreboard (who owes us money back) and evidence cards that follow every filter. Click a supplier and both narrow to it.
- The Studio Agent Framework on Claude. My own adapter streams each agent turn from Claude Opus 5.5 as AG-UI events and keeps Claude's signed thinking blocks between turns. My accounts-payable clerk is Studio's lead agent with the restaurant's rules added. It hands work to Studio's Data, Planning, Page and Widget agents and has one tool of its own, explain_invoice, which only reads. No agent there can pay, approve or change a decision.
- An AG Grid working view, where the owner changes a decision in place, with a reason, through the same server rules as the review page, and exports a CSV that Spanish Excel opens as is, for the accountant.
The public demo has no API key, so the suggested prompts replay recordings of real runs, and Studio carries out the recorded steps on your own dashboard. In the video it starts at 0:51.
Built during the hackathon
The first commit is from 16 Oct 2026, and the README lists what I built when. There are 104 automated tests, and GitHub Actions runs them with lint, types and the build on every push. SECURITY.md lists 14 ways an agent could misuse money here, each tied to the tests that show it can't, and the build fails if one of those tests disappears. I checked eleven pages with axe at desktop and phone widths; the one finding left is inside AG Studio's chart widget.
The run in the video, on the hosted demo on 22 Oct: Payouts batch QFKBS9VW28H24 (4 payments, €2,222.68), Cart API cart cart_1fa26071bc7048ce86d8, PayPal order 0P680189CP925715R, authorization 1HD57942NV251553E (€144.96), capture 7L3171957P1169033 (€141.09, €3.87 released) and refund 69V20926PL902614R (€46.59). More ids are in the README.
Limits
It's sandbox only, so the payees are placeholders and payout items wait as UNCLAIMED. The restaurant and its seven invoices are fictional, the public demo replays recorded Claude runs (with your own key it runs Claude live), and the delivery note and damage report in the restock flow are scripted and labelled.
What's next
Real supplier PayPal accounts, live delivery notes and prices from Supplora instead of seed data, and Supplora Pay as an MCP server, so any assistant can pay a restaurant's suppliers, always behind the owner's approval.
Where to look, criterion by criterion
- Technical implementation: the PayPal table above, the integer-cent rules, 104 tests and SECURITY.md.
- Design: one look from the inbox to the AG Studio report, and the order card that shows authorized, captured and released.
- Impact: it grows out of Supplora, in use at a restaurant since March 2026.
- Idea: an agent that pays suppliers and can't pay on its own.
- Presentation: the 2:49 video with real sandbox ids, and a demo with no login.
- Best Use of AG Studio: the section above, /ledger/studio, and the video at 0:51.
- Best Agentic Commerce: the Cart API section, Reorder in the demo, and the video at 1:50.
- Best PayPal + AI: "who decides what", the Payment run page, and the video at 1:26.
Built With
- ag-charts
- ag-grid
- ag-studio
- anthropic
- claude
- github-actions
- mcp
- next.js
- paypal
- paypal-agent-toolkit
- paypal-cart-api
- paypal-orders-v2
- paypal-payments
- paypal-payouts
- paypal-vault
- paypal-webhooks
- react
- tailwindcss
- typescript
- zod