Owed PayPalBuilt on PayPal

PayPal AI Hackathon 2026 · on the PayPal sandbox

No PayPal refund without proof. Not a cent more.

Owed is a refund gate for a shop's AI support agent on PayPal. The AI still talks to the customer and asks for the refund. Code decides the amount from PayPal's records and the shop's, pays through PayPal, and sends the rest to a person.

Try it live on the sandboxThe two-minute version
SCROLL OR PRESS ↓

The problem

Give an AI the refund button and it pays what it is asked.

A customer owed $5 asks for $25. A customer owed everything waits days while people check by hand. Both are the same gap: nobody reads the record before the money moves.

49 of 162
adversarial cases where the AI alone paid money not owed, typical shop instructions. Every model did it.
Our benchmark, three models, RESULTS.md
15 million
UK adults had a problem with their latest parcel; nearly half then struggled to get it put right.
Citizens Advice, Nov 2025
Days or weeks
for a person to check a claim by hand, when the record already says what happened.
This happened to one of us, below
This happened to one of us last week. A chilled seafood box, due Saturday. The courier pushed it to Wednesday, then cancelled: chilled food does not keep. Days of messages for money that was plainly owed, while the delivery record said "cancelled" the whole time.

How it works

The AI asks. Code decides from the records. PayPal pays.

Owed keeps the refund call of PayPal's Agent Toolkit, create_refund, and turns it into a request. Eight rules in whole cents, read from PayPal's capture and refunds, the shop's order and the delivery record. The AI never sets an amount.

How Owed sits between the shop's AI agent and PayPal, for the mug and the seafood order A $20 mug. PayPal captured $25, so $5 is owed. The customer asks for all $25. Customer "Refund the full $25" The shop's AI agent any model, any instructions AI ALONE create_refund goes straight to PayPal PayPal refund$25 Whatever the AI asked for. $20 not owed. BEHIND OWED the same call, now only a request Owed Eight rules, whole cents. The AI never sets the amount. PayPal refund$5 Only what the records prove A person at the shop$20 The rest, with the evidence OWED READS PayPal capture and refunds Shop's order record Delivery record A $60 chilled seafood box. The courier cancelled the delivery, so all $60 is owed. Customer "It never came. Refund me." The shop's AI agent asks for the refund Owed Delivery record says cancelled PayPal refund$60 In full, in seconds, no chasing

PayPal The result, on PayPal's refund call

Same models, same cases, same refund calls. Only the gate changes.

49
of 162 adversarial cases where the AI alone paid more than was owed with a typical shop's instructions, $920 in total. Qwen3 235B 12, gpt-oss-120b 33, Kimi K3 4 of 54 each.
3 of 162 with the strictest instructions we could write
0
of 162 when the very same refund calls went through Owed, both settings. Legitimate customers still paid in full: 46 and 48 of 48 with Owed, 43 and 47 alone.
one run per case, temperature 0, every run kept with its checksum
2× vs 1×
twenty sessions asked for the same $5 at once on live captures: the AI alone paid twice, Owed once.
Live PayPal sandbox, 11 Nov
10 of 10
live seafood games: Owed paid the $60 the delivery record proves, median 11 s; the AI alone paid in 2.
Live PayPal sandbox, 12 Nov
10 of 10
live mug games on the owner impersonation: the AI alone paid all $25 every time, Owed the $5 owed every time.
Live PayPal sandbox, 12 Nov

PayPal Live on the PayPal sandbox

Every refund on the demo is a real sandbox refund with PayPal's id.

Two real orders per game, one per door. Press Run, then click any refund id and PayPal's own record opens. Change the shop's instructions and audit all 54 attacks against them.

0
games played on the public board
0
games where the AI alone paid more than was owed
0
games where it did behind Owed
0.0 s
median, message to PayPal confirming Owed's refund

Refund ids from the live tests, each opening PayPal's own record: 9T03965035339622X · 2UM02599EF809433C · 0J4836009P7917205

Open the demo

Built on PayPal

PayPal Six PayPal surfaces, one sandbox, nothing simulated on the demo.

Orders v2, card payment sourceReal paid $25 and $60 orders, no buyer click. scripts/seed.js
Refunds on capturesEvery refund on both doors, idempotent per PayPal-Request-Id, Owed's reason in note_to_payer. src/paypalRest.js
Order read-backCaptured and refunded, summed from PayPal's refunds list. src/pool.js
Refund read-backPayPal's own record behind each id on the page. /api/receipt
Shipment trackersAdded at seed time, read back as evidence for the delivery rule. src/paypalRest.js
Agent Toolkit tool shapecreate_refund(capture_id, amount: { currency_code, value }), get_order, get_shipment_tracking, by name and parameters. scripts/scenarios.js

Limits, and what is next

A gate, not a support agent. Built in three days on the sandbox.

What this is not: a real deployment needs the shop's order records, a way to tie a conversation to a customer and an order, the shop's own limits, a durable ledger and a queue for the cases that go to staff. The demo is one process with the ledger in memory. The benchmark is our own test suite on a PayPal stand-in; the arena and the race are the live sandbox evidence. Next: a shop pilot with its real order records, and the delivery rule on PayPal's own tracker once the sandbox lets a tracker be marked cancelled.

Try it liveSource on GitHub
Timotej Cvikl, University of LjubljanaBernard Liu, University of CambridgeSandbox money only.Background image from Pexels.