Try it in 2 minutes

  1. Open https://mandat-qb77.onrender.com on a phone or a laptop. No sign-up.
  2. Tap Continue with PayPal. It is the PayPal sandbox: use the test buyer account given in the Testing instructions field. No real money moves.
  3. Pick Balanced, then type: "Dinner for 4 in Paris on Saturday around 8pm, 160 € max".
  4. Watch Mandat compare places, negotiate, and hold a deposit with a PayPal authorization (not charged).
  5. Open Activity (every PayPal order, authorization, capture and refund id), Agenda (drag a booking to move it) and your rules (one switch stops everything).

Mandat in numbers

  • 6 PayPal operations in one money cycle: Vault v3 mandate, Orders v2 AUTHORIZE, capture, void, partial refund, invoices (Agent Toolkit)
  • 31 agent tools, and 0 amounts computed by the model: every number comes from code
  • 3 autonomy levels, a daily and a monthly limit, 1 switch that stops every mission, checked again right before each PayPal call
  • 1 PayPal-Request-Id per operation, reused on every retry: no double order, no double capture
  • 25,000+ retailers (Channel3) and real places (Google Places, OpenStreetMap)
  • 2 languages (English, French), text, voice or photo, installable on a phone

Inspiration

AI assistants have become remarkably capable. They answer, they talk naturally, and they can take an action when we ask for it. But look at what we actually hand to a person we trust. Not one order at a time: a job, a budget and a few rules. "Organise Friday's dinner for four. Keep it under 200 €. Pay the small deposits yourself, ask me before anything bigger."

No assistant can be given that today. We still instruct them step by step, and the moment money is involved, everything waits for us, because the only alternative is to hand over a card with no real limit and no record of what was done. So the errands stay ours: comparing three places, booking, paying the deposit, re-booking when plans move, chasing a refund, splitting the bill.

We built Mandat to close that gap. It turns an AI agent from something you instruct into something you can mandate: you sign once with PayPal, you set a budget and your rules, and the agent works inside them, with every euro visible, reversible, and enforced by code, not by a prompt.

Why it matters

  • For people: an evening of errands becomes one sentence and, when it matters, one tap. Mandat searches, compares, negotiates, books, moves bookings when plans change, and settles the bill fairly afterwards.
  • For trust: an agent that can spend money has to be the most predictable part of the product. In Mandat, the model proposes and the code decides: every payment is checked against the mission budget, the daily and monthly limits and your autonomy level before PayPal is ever called. Deposits are held with a PayPal authorization, not charged, until the merchant confirms. One switch pauses everything.
  • For merchants: businesses with their own AI agent negotiate with Mandat after an identity check. Small shops with no AI at all still take part with one tap (accept, propose another time, decline), which is how most of them would actually meet an agent.
  • For PayPal: it shows that agentic commerce can be built today on primitives PayPal already has: a vaulted PayPal account as the signed mandate, authorizations as holds, capture, void and refund as the agent's only ways to move money, and invoices for paying each other back.

What it does

You write or say what you need, optionally with a photo: "Dinner for 4 in Paris on Friday around 8pm, 200 € max, and a ride home." Mandat then:

  1. Asks only what it must (two or three questions with tap answers), then works on its own.
  2. Searches real places and real products: Google Places and OpenStreetMap for venues, Channel3 for products from 25,000+ retailers. It looks at the photos with a vision model and drops what doesn't fit the need.
  3. Deals with merchants. It verifies a merchant agent's signed identity card ("Know Your Agent"), then negotiates availability, group prices and counter-offers. Every quote is recomputed from its lines by code. Merchants without an AI get a booking request they answer with one tap.
  4. Pays with PayPal, inside the mandate. A deposit is an authorization on your saved PayPal account: captured when the merchant confirms, voided if the plan changes first, refunded in full or in part if a paid booking is cancelled.
  5. Follows your rules. Three autonomy levels (Careful: asks before every payment; Balanced: pays small deposits alone; Autopilot: everything inside the mission budget), a daily limit, a monthly limit, and one switch that pauses every mission. When your approval is needed, a push notification brings you to a PayPal sheet where you hold a button to approve, or refuse.
  6. Keeps plans honest. Drag a booking in the agenda and Mandat asks the merchant to move that same booking: nothing is booked or paid twice. Clashes with your other missions are flagged before anything is paid.
  7. Settles up. It splits a bill to the cent and sends each friend a real, itemised PayPal invoice with a pay link and a QR code, then tells you when each share is paid.
  8. Remembers what matters, in your words: sizes and style for you and your people, allergies, your home address, and the facts of each mission ("6 people", "I already have my suit"), so it never contradicts what you said.

Everything lands in two views. Activity is a bank-statement view of every payment, with a printable receipt carrying its PayPal order, authorization, capture and refund references, plus an AG Studio dashboard you can question ("where did my money go this month?"). Agenda is a Bryntum calendar of every booking and estimated delivery.

It works in English and French, by text, voice or photo, as an installable web app on a phone or a desktop.

Where the data comes from. Places come from Google Places and OpenStreetMap and products from Channel3; every booking runs through Mandat's network of merchant agents, which opens in any city. All payments use the PayPal sandbox.

How we built it

PayPal is the core. Every money call goes through the official PayPal Server SDK (@paypal/paypal-server-sdk 2.5.0, generated by APIMatic), with typed models and three controllers:

Step PayPal API What it means for the user
Mandate Vault v3: setup token, one approval on PayPal, payment token You sign once; the agent can then pay without you, inside your rules
Hold Orders v2, intent: AUTHORIZE, paid with the vault token The deposit is reserved, not charged
Settle Payments v2: capture Money moves only when the merchant confirms
Release Payments v2: void Plans changed before confirmation: the money never left
Undo Payments v2: refund (full or partial) A paid booking was cancelled: the money returns, and so does the budget
Share Invoicing through the PayPal Agent Toolkit (create_invoice, send_invoice, generate_invoice_qr_code, get_invoice) Each friend gets an itemised invoice with a QR code; Mandat checks every 2 minutes which ones are paid

Every write carries its own PayPal-Request-Id, reused on every retry (timeouts, 409, 429, 5xx), so a lost connection returns the same order or capture instead of creating a second one. We wrote this layer with the APIMatic Context Plugin for the PayPal SDK in our coding assistant.

The money rules live in code, not in the prompt. Before PayPal is called:

  • the full price of the booking, not just the deposit, must fit in what is really left of the mission budget;
  • the payment must respect the daily limit (across all missions, including the ones running at that moment) and the monthly limit;
  • above your autonomy threshold, the agent can only open an approval: one per merchant, never shown twice, and a payment already made can never be made again;
  • the account is read again right before the call, so the stop switch or a revoked mandate applies even in the middle of a turn, and the budget is checked once more;
  • if the local record of a hold fails, the PayPal authorization is voided at once, so no money is ever held without a trace; a capture is locked against double taps; a void PayPal refuses is reported as "still held", never as cancelled;
  • only the user can raise a budget, by saying the new amount.

The agent is a DeepSeek tool-calling loop with 31 tools (find places and products, inspect a place, quote, verify a merchant, negotiate, request or move a booking, hold, void, refund, buy, split, remember, plan, remind). It cannot do arithmetic in its head: a calculate tool returns exact results, and any reply whose numbers don't match is rewritten before you see it. At every turn, code injects the mission's books and the facts you set, so the agent cannot drift on amounts, dates or head counts.

Around it: Channel3 for products; AG Studio (AG Grid) for the Activity dashboard, whose agent runs on our model through a small server adapter, so the key never reaches the browser, with a custom tool that reads the books exactly as the app computes them; Bryntum Calendar for the Agenda, with drag-to-reschedule wired to the agent; Node.js and Express on Render; plain HTML, CSS and JavaScript as an installable PWA; Web Push; Google Speech-to-Text and a Chirp 3 HD voice; Cloudflare R2 for durable storage.

Tools we used, and how

  • PayPal Server SDK (@paypal/paypal-server-sdk 2.5.0): Vault v3 setup and payment tokens (the mandate), Orders v2 AUTHORIZE paid with the vault token (deposits held, not charged), Payments v2 capture, void and refund. Idempotent with one PayPal-Request-Id per operation.
  • PayPal Agent Toolkit (@paypal/agent-toolkit): bill splits as real, itemised PayPal invoices with a pay link and a QR code, and their payment status.
  • APIMatic: the PayPal Server SDK is APIMatic-generated, and we built the PayPal layer with APIMatic's Context Plugin for that SDK.
  • DeepSeek: the agent's reasoning and tool calls, photo reading, the merchants' negotiating agents (structured JSON offers), and the AG Studio assistant.
  • AG Grid / AG Studio: the Activity dashboard (spending by category, committed per mission, every payment in a grid) and its built-in agent, run on our model through a server adapter, reading the books through a custom tool.
  • Bryntum Calendar: the Agenda of every dated booking and estimated delivery; dragging an event asks Mandat to move the booking with the merchant.
  • Channel3: real product search across online retailers, with photos, prices and stock.
  • Render: hosting of the live demo (Blueprint render.yaml in the repo).
  • Google Places, Speech-to-Text and Chirp 3 HD voice; OpenStreetMap and MapLibre; Cloudflare R2: real places and photos, voice in and out, maps, durable storage.

How Mandat answers the judging criteria

  • Technological implementation. The full PayPal money cycle runs on the sandbox through the official Server SDK and Agent Toolkit: Vault v3, Orders v2 AUTHORIZE, capture, void, partial refund, invoicing, idempotent retries. The AI is not a chat layer on top: a 31-tool agent plans and acts, while code enforces every money rule.
  • Design. A complete product, not a proof of concept: first run with PayPal, autonomy levels and limits, live mission view, hold-to-approve sheet, push notifications, receipts, a statement, a dashboard, an agenda, voice and photo input, English and French, light and dark, installable on a phone.
  • Potential impact. A specific problem (errands that stop at the payment step) for a specific audience (busy people and the small merchants they book with), solved with PayPal primitives that exist today, and shown end to end in the video.
  • Innovation. The idea of a mandate: an agent you give a mission, a budget and rules, where PayPal authorizations act as holds and capture only follows the merchant's confirmation. Agent-to-agent negotiation with an identity check, and a one-tap path for merchants with no AI.
  • Presentation. A video under 3 minutes showing one mission from sentence to paid booking to refund and bill split, a live demo with no sign-up, and a public MIT repository with setup instructions.

Challenges we ran into

  • Money that is right to the cent, every time. Language models round, forget and contradict themselves. We moved every calculation into code, made the code rewrite any answer whose numbers don't match the books, and inject a fact sheet the agent cannot override.
  • Never paying twice, never asking twice. A retried request could ask the user to approve the same deposit again. Now one approval stays open per merchant, a payment already made cannot be made again, and approvals the plan no longer needs are closed on their own.
  • Idempotency with PayPal. A retry after a timeout must return the same order and the same authorization, never a new one. One request id per operation, reused on every retry, solved it.
  • Rescheduling without paying twice. Moving a booking first created a second one. Now a move is a request on the existing booking, which changes only once the merchant agrees; its deposit and budget never move.
  • Reading a brand from a photo. The vision model sometimes guessed a brand from the shape. Mandat now reads the printed name five times, keeps the majority spelling, and never names a brand it did not read.
  • Product search across markets. A national catalogue was too thin for some products, so the search follows the mission's currency and checks photos before suggesting anything.

Accomplishments that we're proud of

  • A full money cycle on the PayPal sandbox, from one signed mandate to hold, capture, void, partial refund and invoices, through PayPal's official SDK and Agent Toolkit.
  • Money rules that hold even when the model is wrong: budget at full price, daily and monthly limits, autonomy levels, no double payment, a stop switch checked right before every PayPal call.
  • Merchants without any AI can still take part with one tap.
  • It works in English and French, by text, voice or photo, in any city, on a phone or a desktop.

What we learned

Trust in an agent comes from limits you can see and that cannot be talked around: a budget per mission, deposits that are held rather than spent, a yes when it matters, and a record of every movement. PayPal's primitives (vault, authorization, capture, void, refund) map almost one to one onto how people already trust a human assistant with money. The hard part was not calling the APIs; it was making sure the model can never be the one deciding how much money moves.

What's next for Mandat

Next: merchants paid directly. Each merchant is paid on its own PayPal account, merchants join through the same one-tap inbox, and revoking the mandate in Mandat also deletes the payment token on PayPal's side.

Then: standing mandates. Today a mandate covers one mission. Next, it becomes a routine with the same rules and the same stop switch: "keep the pantry stocked, up to 60 € a week", "book the cleaner every other Friday", "tell me before any subscription renews". And shared missions, where a group plans together and each person pays their part.

The bigger idea. Today we tell assistants what to do, step by step. Tomorrow we will tell them what we want and what they may spend. That only works if people can trust an agent with their money, and Mandat is that layer of trust, built on PayPal: a mandate signed once, a budget, rules enforced by code, a yes when it matters, and a stop switch that always works.

Built With

Share this project:

Updates

Submission history