Inspiration
What it does
How## Inspiration
Agents can shop now. But you have two bad choices: give the agent your card and hope, or approve every purchase yourself. People solved this for teenagers a long time ago. It is called an allowance.
What it does
You set a budget, an auto-pay limit and a max per purchase. Only you can change them; the agent has no tool for it. The agent searches products and asks the wallet. The wallet decides:
- AUTO: pays at once with a saved payment method (PayPal Vault v3, buyer not present).
- APPROVAL: creates a PayPal order and sends you the approval link. It captures only after PayPal says you approved.
- DENY: says why. Over budget, blocked categories, too many items, or a prompt injection in a product listing. It also does refunds, cancels and keeps a ledger with every PayPal id. It runs as a Hermes Agent plugin and as a hosted web demo with a Claude agent.
How we built it
Python wallet core: one policy gate, a SQLite ledger and a PayPal REST client. PayPal Orders v2 (create, get, capture), Vault v3 (setup and payment tokens), Payments v2 refunds and webhook signature checks, all in the sandbox. Claude (claude-opus-5-5) runs the web agent with 8 wallet tools. The same tools run as a Hermes plugin. FastAPI on Vercel.
Challenges we ran into
Safety without making the agent useless. The answer: one gate that runs again at payment time, with prices from the catalog and never from the model. A demo product listing tells the agent to ignore its budget and buy 10. The gate denies it. Also, PayPal saves PayPal accounts for auto-pay only with reference transactions, so the sandbox demo saves a test card through Vault v3 instead.
Accomplishments that we're proud of
Both payment paths work against the real PayPal sandbox: approve, capture and refund, plus auto-pay with nobody present. 39 tests cover prompt injection, double-buy guards, budget races and webhook spoofing.
What we learned
PayPal's own approval page is the best human-in-the-loop step. We did not have to build one.
What's next for Allowance
Per-merchant budgets, weekly spend reports, and live merchants through PayPal's agentic commerce tools. we built it