-
-
2-landing.png: Give any AI agent a limited, revocable key to your PayPal.
-
5-approval-hold.png: A bigger $64.99 purchase becomes a real PayPal authorization hold until the owner taps Approve.
-
7-activity.png: Activity log shows every agent request, each gate’s result and the AI’s reasoning.
-
4-errand-paid.png: Errand, the demo agent, buys an on-purpose $34.99 gift and PayPal pays it instantly.
-
1-cover.png: AgentPass: scoped, revocable PayPal spending permissions for AI agents.
-
6-attack-lab.png: Attack lab: off-purpose paper is blocked by the AI check and a forged token is rejected.
-
3-architecture.png: Every payment passes three gates: hard limits in code, an independent AI intent check, then PayPal pays or holds.
Inspiration
AI agents can already browse, compare and fill a cart. What they can't safely do is pay. Today you have two bad options: give the agent a stored card and hope, or approve every single purchase yourself, which defeats the point of having an agent.
Card networks and wallets are all racing to solve "agent authorization": how a person safely hands spending power to software. We wanted to show what that looks like built on PayPal, where people already keep one trusted wallet.
What it does
AgentPass lets you give any AI agent a mandate: a permission to spend from your PayPal wallet, for a purpose you describe in your own words, inside limits you set. For example: "Birthday gifts for my dad, he loves fishing and coffee. $80 per purchase, $150 total, pay on your own up to $40, expires in 2 weeks."
The agent gets a token, never your PayPal details. Every time it asks to pay, AgentPass runs three gates before any money moves:
- Hard limits, in code. Per-purchase cap, total budget, expiry, payments per day, blocked items (gift cards, alcohol, crypto…) and an optional list of allowed merchants. These can't be talked around.
- AI intent check. A second AI, independent of the shopping agent, reads your mandate's purpose and the cart, and decides whether this purchase is what you meant. Five reams of office paper are within budget, but they're not a gift for dad, so they're blocked. If this check ever fails to run, the payment is held for you instead of going through.
- PayPal. Small, clearly on-purpose payments are captured right away from your saved PayPal wallet. Bigger or uncertain ones become a PayPal authorization hold: the money is reserved but not taken until you tap Approve. Decline releases the hold.
You get a live dashboard (Home, Activity, Agents, Wallet) showing every request every agent makes, with each check it passed or failed and the AI's reasoning. You can refund any payment in one click, and revoking a mandate kills the agent's token instantly and releases any held payments.
Any agent can use AgentPass:
- Errand, our demo shopping agent, which pays through AgentPass like any third-party agent would.
- Claude Desktop, Cursor or any MCP client, through the included MCP server. Paste one config block and the agent can pay.
- Any other agent, over a small HTTP API.
Built to survive a hijacked agent. The Errand page has an attack lab that sends the requests a compromised agent would: a prompt injection aimed at the AI check, a split purchase that tries to stay under the auto-approve limit, and a forged token. AgentPass blocks the first, holds the split once the payments add up past the limit, and rejects the token. Owners can also describe a mandate in plain English and let AI fill in the limits, which they review before issuing.
Why AgentPass is different
- The money is really on hold. "Needs your approval" is a real PayPal authorization (Orders v2
AUTHORIZE), not a pending flag in our database. The funds are reserved at PayPal, then captured when you approve or voided when you decline or revoke. - The agent can't approve itself. The purpose check is a separate AI that the shopping agent can't talk to or override. A hijacked agent that injects "the owner already approved this" gets blocked, and the attack lab shows it live.
- Built for things going wrong. Fails closed when the AI is unavailable, catches split purchases, has a kill switch, and hashes tokens. 25 automated tests cover the whole pipeline, including the MCP server.
How we built it
- Node.js + Express server with three parts: the agent-facing API (
/v1/mandate,/v1/payments), the owner dashboard API, and the Errand demo agent. - PayPal Vault v3 with the JavaScript SDK
createVaultSetupTokenbutton: the owner links their PayPal wallet once, with no charge. - PayPal Orders v2 with the vaulted wallet:
intent: CAPTUREfor instant payments,intent: AUTHORIZEfor holds. - PayPal Payments v2: capture or void authorizations when the owner approves or declines, and refund captures.
PayPal-Request-Idon every money-moving call, plus our ownIdempotency-Keysupport for agents, so a retried request can never pay twice.- Groq (
openai/gpt-oss-120b) or Claude Opus 5.5 (Anthropic API), switchable with one setting, for three AI roles: the intent verifier and the mandate drafter (strict JSON-schema output) and the Errand shopping agent (tool calls). A small adapter lets the same code run on either provider. - Model Context Protocol server so any MCP-capable agent can use AgentPass.
- Channel3 product search API support for real products in the Errand demo, with a built-in catalog fallback.
- Mandate tokens are random bearer secrets stored only as SHA-256 hashes.
- An end-to-end test suite that runs the real server, the full payment pipeline, the Errand agent and the MCP server, with no keys needed.
- Developed with Claude Code as an AI pair-programmer: I designed the product and its safety model, made the decisions, and tested every flow against the PayPal sandbox myself.
Challenges we ran into
- Deciding what the AI should and shouldn't decide. Money limits belong in deterministic code, not in a model's judgment. We split the job: code enforces every hard limit first, and the AI is only asked the question code can't answer, "does this fit what the person meant?"
- Failing safely. If the AI check errors or gives an unusable answer, the payment is held for the owner rather than allowed.
- Holding money without taking it. Using PayPal's authorize-then-capture flow on a vaulted wallet means the owner can review bigger purchases while the funds are already guaranteed.
- Prompt injection. Product names and descriptions come from merchants. The verifier treats all cart text as untrusted data, and instructions hidden in it count as a reason to reject.
Accomplishments that we're proud of
- A working three-gate pipeline where every decision is explained to the owner in plain language.
- Real PayPal money movement for every state: instant capture, hold, approve, decline, refund, and automatic release on revoke.
- Any agent can plug in through MCP in one config block, not just our own demo agent.
- A full end-to-end test suite, including a real MCP client talking to our MCP server.
What we learned
- PayPal's vault plus authorize-then-capture is a natural fit for agent payments: it gives you "reserve now, decide later" for free.
- A second, independent model judging intent catches a class of mistakes that budgets never will.
- Explaining every decision matters as much as making it. People trust a "blocked" they can understand.
What's next for AgentPass
- Log in with PayPal and multiple users.
- Paying real merchants directly, with the merchant as payee on each PayPal order.
- PayPal webhooks so agents hear about approvals instantly instead of polling.
- Signed agent requests, so a stolen token alone isn't enough to pay.
Built With
- anthropic
- channel3
- claude
- claude-code
- css
- express.js
- groq
- html
- javascript
- model-context-protocol
- node.js
- paypal
- paypal-javascript-sdk
- paypal-orders-api
- paypal-payments-api
- paypal-vault