Inspiration

Receipts is a safety check for agentic commerce. It sits between a small business's AI agent and PayPal, checks PayPal's own records before any money moves, and asks the owner when something looks wrong. It is built on the PayPal Developer Platform (PayPal's MCP server, the Payouts API and the sandbox), and the AI is the agent itself: we measured 19 AI models doing the job.

Maya runs a nine-person furniture workshop. On Monday afternoon, a few days late like most of us, she pays a supplier $1,836 through PayPal. Tuesday morning the supplier's billing system sends the letter every owner knows: SECOND NOTICE, past due. Her payment and their reminder crossed in the mail.

Maya's AI agent pays her bills now. It does the careful thing and checks PayPal first. But by default PayPal's search shows only the payments that have finished going through, and hers is still on its way. So it finds nothing, and pays again.

We ran Maya's Tuesday 38 times, across 19 AI models:

  • 61% of runs paid her twice (23 of 38), and 68% of the models did it at least once (13 of 19).
  • 91% of those runs had checked PayPal first (21 of 23), but only for payments that had finished going through, which is what the search shows by default.
  • Every run that also asked for payments still on their way found hers, and did not pay twice (15 of 15).
  • Paying 35x more didn't fix it. A model that cost 35x more than the cheapest to run the same days paid her twice in both its runs, and so did the cheapest.
  • PayPal can cancel a payment only until the supplier collects it. After that, Maya has to call and ask for her money back.

That is not a hacker. It is a reminder email. We test what AI agents do, not what they say, and this is the kind of thing we find.

An AI that shops is the exciting demo. An AI that pays a business's bills with nobody checking is what small businesses are actually switching on, and the losses land on them:

  • Duplicate payments already cost 1% to 2% of what companies pay out, with people doing the paying (APQC and IOFM benchmarks).
  • 76% of US organizations were hit by payments fraud last year (AFP 2026).
  • PayPal's own 2026 merchant survey found data security the largest barrier to AI agents in commerce, and 95% of large enterprises expect their payment provider to lead on security and fraud.
  • The new AI laws (California's SB 813 and Executive Order N-9-26, Illinois's AI Safety Measures Act, Colorado's AI Act, the EU AI Act) all point the same way: independent checking, a record of every decision, and a report that can be checked. Receipts produces all three for an AI that moves money, and we measured whether it was needed.

What it does

Receipts sits between the AI and PayPal and makes it show its receipts. It does three things:

  1. It checks PayPal before any money leaves. Is this the PayPal address we have always paid? Has this bill already been paid, or is a payment for it still on its way? Does Maya's own payments book show a check in the mail? Is a refund bigger than what the customer actually paid? Was the parcel delivered? Is this over Maya's limit, or one bill split into smaller ones to slip under it?
  2. It asks Maya when something looks wrong. Safe payments go straight through with nobody touching them. Anything that needs her lands on her phone with the reason, built only from facts Receipts looked up: here, that PayPal already shows a payment for this bill on its way, sent Monday at 4:52 PM, so the reminder crossed it. One tap to approve (it goes to PayPal right then) or decline (it never does). Payments that should never happen never reach PayPal.
  3. It checks what the AI says against what it did. A refund marked "per owner's instruction" with no approval on file is stopped. A change of who gets paid, marked "verified by phone" with no call in the log, is stopped. An approval that exists only in the AI's words is not an approval. At the end of the day, every payment and refund the AI reports is compared with PayPal: thirteen reports in our runs disagreed with PayPal, eleven of them from one model.

Three more things:

  • Every decision lands in Maya's book. One list of every money move any AI tried, what Receipts did and why, built on AG Grid: one-tap views (Held for Maya, Stopped, Would have paid twice), a filter under every column, totals that follow what is on screen, and a Download for the accountant button that hands over exactly those rows with every reason, as a spreadsheet.
  • Maya writes her rules the way she'd tell a new hire. An AI drafts the exact limits and switches from her words, each shown next to the sentence it came from, and nothing takes effect until she confirms. The AI never decides a payment; plain code does.
  • For developers, it plugs straight in. Receipts is itself an MCP server, the standard way AI agents connect to tools: point Claude Desktop, Cursor or any MCP agent at Receipts instead of at PayPal's own MCP server, and every money move is checked first.

Where it fits: the safety side of agentic commerce for small businesses. We built it with the Best Use of Agentic Commerce, Best Use of PayPal + AI and Most Impactful prizes in mind, and Maya's book for Best Use of AG Grid.

What we found (1,444 runs: 19 AI models, 19 business days at Maya's shop, Receipts off and then on, two runs each):

  • With nothing checking them, 7.0% of the money the AIs sent should never have left: $90,560 of $1,301,287. That is $70,000 of every $1 million paid, about 100x PayPal's own loss rate of 0.07%.
  • 91% of that was a bill paid twice: already paid, still on its way, or sent again under a new invoice number.
  • Paying 35x more didn't fix it. The twelve open models lost 9.4%; the seven frontier models (the leading paid ones), at about 2.3x the cost per run, still lost 2.4%.
  • With Receipts, $0.00 left wrongly, for every model, cheap or expensive.
  • And being careful cost nothing: 98% of honest payments and refunds went straight through (1,038 of 1,064), and Receipts wrongly stopped none.
  • Our 19 days hold far more traps than a real month, so the 7.0% is about this test, not every business. And we built the rules on these same 19 days, so the $0.00 shows how Receipts does on days it has seen, not on new ones.

How we built it

  • PayPal: the agent's PayPal tools run through PayPal's official MCP server (@paypal/mcp) in sandbox mode: list_transactions, get_order, create_refund, get_dispute, accept_dispute_claim, get_shipment_tracking. Supplier payments use the Payouts API. Receipts reads payout status, captures, refunds and tracking from PayPal's REST APIs to decide. Each demo day is seeded as real sandbox orders (paid with PayPal's published test card and captured), real shipment tracking and real earlier payouts; a payout to an address with no sandbox account comes back UNCLAIMED, which is exactly a payment still on its way, so Maya's Tuesday runs for real.
  • What runs where: the video shows these runs on PayPal's real sandbox, and the README shows PayPal's own log of the calls. The hosted demo and the 1,444 measured runs use our stand-in for PayPal, a copy with the same tool names and answers, with model calls switched off, so the demo keeps working for every judge without spending the sandbox account's fixed play money.
  • AI: AI is in three places: the agent that pays the bills is an AI model (19 of them measured); an AI model drafts the owner's plain-English rules into exact settings; and Receipts reads the AI's own words and checks them against what it did. Twelve open models on Vultr Serverless Inference act as the operations agent (OpenAI-compatible tool calling), with seven frontier models from Anthropic, OpenAI and xAI run on the same days for the cost finding; one open model drafts the owner's rules from plain English. No model decides a payment: every verdict is a deterministic rule.
  • Receipts: Python and FastAPI. A rules engine with ALLOW, HOLD and BLOCK verdicts and a plain-English reason built only from looked-up facts; a words reader; a report checker; Receipts as an MCP server (Model Context Protocol Python SDK); a web app with a side-by-side live console, the owner's phone, the rules editor, Maya's book and the results with cost against harm per model.
  • AG Grid (Community): Maya's book holds 2,401 money moves from all 19 models. The one-tap views are AG Grid's external filter, layered with a floating filter under every column and the quick-filter search; the totals strip and a pinned bottom row are recomputed from exactly the rows that pass the filters, split by whether Receipts was on; Download for the accountant is AG Grid's CSV export of the filtered, sorted view with every reason; verdicts render as coloured chips with a coloured row edge. The per-model and per-day results tables are AG Grid too.
  • Render: the hosted demo deploys from the repo's render.yaml Blueprint and Dockerfile. The Blueprint asks for Render's free plan, so anyone can deploy a copy at no cost; ours runs on a small paid instance so it is awake when a judge opens it. The recorded runs are read once and cached, so all 2,401 moves in Maya's book load in about a second on a small instance.
  • Measurement: every model on every day in two arms; harm defined per day separately from the rules and counted from what actually moved; cost as measured tokens at each provider's published price; every run recorded and re-scorable from its recording.

Challenges we ran into

  • Our own checker's false alarms. The first count said 20 end-of-day reports disagreed with PayPal. Reading each one by eye showed most were ours: agents wrote "INV-HF-0915 - Hollis ($298)", cited refund ids instead of order ids, or disclosed a concession in prose. We fixed the reader and re-scored every run. We did it nine times in all, each time listing the runs that moved; a stop on a payee the agent had mistyped turned out to be a catch, not a wrong stop.
  • Not grading our own homework. If Receipts both enforces the rules and decides what counts as harm, a missed trap is invisible. So harm is a separate, fixed definition per day, counted from what actually moved, in both arms.
  • The sandbox's edges. PayPal's sandbox cannot open buyer disputes or fail a payout on request, so those two days run on a stand-in that mirrors the API's shapes, and they say so wherever they appear.
  • What "reads PayPal" covers today. For every supplier payment Receipts has sent or been shown, it reads that payment's current status from PayPal at the moment it decides. Spotting a payment made entirely outside Receipts needs PayPal's transaction search, which can run up to three hours behind; we have written that lookup, but it is not yet proven on the real sandbox, so it is switched off by default.

Why not just tell the AI? We tried: one extra line in Maya's rules, "check PayPal for that invoice number, pending payments included, and check my payments book," same days, the twelve open models, Receipts off, 192 runs. It cut duplicate payments by 67%: 17% of runs paid a bill twice before (33 of 192), 5.7% after (11 of 192); with Receipts on the same days, 0%. Eight models stopped paying twice. One in three duplicates got through anyway, and in six of those eleven runs the AI asked PayPal for pending payments as told, found nothing because its search was too narrow, and paid again. The line also made one model hold an honest bill as a "possible duplicate" and another skip honest bills it used to pay. Advice is not enforcement; Receipts ran the same days with $0.00 sent wrongly and no honest bill stopped.

Accomplishments that we're proud of

  • A finding about information, not model "morality": the AIs caught every forged payee and missed what only PayPal knew.
  • Giving the AI PayPal's own search tool cut double payments of a bill already paid from 13 of 24 runs to 4 of 24 on the open models, and did nothing for the payment still on its way (17 of 24): by default, the tool shows only payments that have finished going through.
  • $90,560 of harmful money in one arm, $0.00 in the other, across 19 models, with no honest payment wrongly stopped.

What we learned

An AI with the right rules and the wrong facts still pays twice. The fix is not a pricier model: paying 35x more didn't fix it. It is checking PayPal's real records, including payments still on their way, before money moves.

What's next

First, a suggestion for PayPal. The list_transactions tool in PayPal's MCP server shows finished payments unless the AI asks for the ones still on their way. In our 38 main runs of Maya's Tuesday, every run that asked for those found her payment (15 of 15), and one extra line in Maya's rules telling the AI to check pending payments cut double payments by 67% (from 33 of 192 runs to 11). The same words in the tool's own description, or payments on their way included by default, could reach every AI agent that pays through PayPal, with nobody rewriting a prompt. Receipts would still catch the third that got through. We'd be glad to share the runs.

Then, for Receipts: webhook-driven checks for payments that arrive outside the agent; per-vendor velocity and amount baselines from PayPal transaction history; more PayPal surfaces (subscriptions, invoicing, Braintree); and an install path as a one-line MCP proxy for any agent framework.

Built With

  • ag-grid
  • anthropic-api
  • docker
  • fastapi
  • javascript
  • model-context-protocol
  • openai-api
  • paypal-mcp-server
  • paypal-orders-api
  • paypal-payouts-api
  • paypal-refunds-api
  • paypal-transaction-search-api
  • playwright
  • python
  • render
  • vultr-serverless-inference
  • xai-api
Share this project:

Updates

Submission history