The AI in this app can read your request, but it can't move your money. The PayPal payment tools sit in server code, and the server only uses them after you've approved twice. That one rule shaped everything else we built, and automated tests check it.

Inspiration

Software that pays for things on your behalf is showing up fast. The part we keep coming back to is the button. Who presses it?

At Dinario we build money software for everyday people, and the rule we care about most is that a person understands a move before it happens. A top-up looked like a good place to try that with PayPal. It's a small, common task. Most of us keep a little money set aside for a trip, groceries or the gym, and adding to it ought to take one sentence instead of a form.

We wanted that sentence to be the only typing a person has to do.

What it does

You type what you want in your own words. "Top up $25 for my trip budget." Or "add forty bucks to groceries."

  1. The AI drafts it. Claude works out the amount and what it's for. If your request is vague, like "top up my trip budget" with no amount, it asks how much. If you ask for something that isn't a top-up, like sending money to a friend, it says so and stops.
  2. You see the cost. The app shows the top-up, the service fee (zero by default in this demo) and the total, in exact dollars, before anything happens.
  3. You approve in PayPal. When you press "Approve $25.00 and continue to PayPal", the app creates a PayPal checkout for exactly that total. You log in and approve it there, like any other PayPal checkout.
  4. You press Pay. Back in the app, we ask PayPal to confirm the order is approved, in US dollars, for the same amount you saw. Then you get one more button, "Pay $25.00 now". The payment is captured only when you press it.

This runs on the PayPal sandbox, so no real money moves. The demo video shows the whole flow, start to finish, with Claude drafting live and a PayPal sandbox buyer account.

How we built it

  • PayPal Agent Toolkit (@paypal/agent-toolkit). We turn on only three of its order tools: create, get and capture (create_order, get_order, pay_order). All of them point at the PayPal sandbox, and the app refuses to start if it's set to anything else.
  • Claude, through the Anthropic API, reads the sentence and returns a structured answer with one of three actions: top up, ask a question, or decline. It is never given a PayPal tool. It can only propose.
  • The server does the checking. It treats the model's answer as untrusted. It re-checks the amount against limits ($1 to $500 by default), works out any fee itself in whole cents, and creates a PayPal order only after you confirm the exact total. A quote expires after 15 minutes, and an order can't be captured twice. A top-up counts as paid only when PayPal reports the capture itself as completed, in US dollars, for the quoted total.
  • A small stack. Node.js 20, Express, and a plain HTML and JavaScript page, about 650 lines of server code. The tests run offline with PayPal and Claude faked. They cover no PayPal call before approval, no capture before PayPal's approval and your Pay press, no double capture, and a mismatched amount blocking payment.

Challenges we ran into

Deciding how much the AI gets to do was the big one. Letting the model call "capture payment" itself would have made a slicker demo. It would also be the wrong design for someone's money, so every money step stays in server code behind a person's tap.

The other was making sure the amount you approve is the amount that gets charged. The total travels through every step as whole cents, and we re-read the order from PayPal before the Pay button appears.

And a model's answer isn't the same every time you ask. So the review card shows the exact dollars on every request. Whatever Claude drafted, you see it before it counts.

Accomplishments that we're proud of

  • One sentence to start, and still two explicit approvals before any money moves.
  • Dollar amounts on every screen, so the total you see at the start is the total you see at the end.
  • An assistant that asks when it isn't sure, instead of guessing a number.

What we learned

The agent should prepare and the person should decide. That felt right for money, and writing the tests made it concrete. Each test is a sentence about who is allowed to do what, and when.

The PayPal Agent Toolkit lets you pick which actions an agent can use. That made it easy to give the app PayPal skills while keeping the risky ones out of the model's reach.

Where it stands

This is a hackathon build. Its first commit is from October 27, 2026. It runs on the PayPal sandbox only, it has no users, and it has never taken a real payment.

The code is public on GitHub under the MIT license. We think the useful part is the pattern. The approval flow is short, plain JavaScript, so a developer building on the PayPal Agent Toolkit can read it in an afternoon and borrow it. For now, the repo is how we expect it to reach people.

What's next

Here's what we plan to build next.

  • Recurring top-ups ("add $50 to my trip fund every payday"), each one still approved by the person.
  • A view of how close a budget is to its goal after each top-up.
  • More currencies and languages.

Built With

Share this project:

Updates

Submission history