Inspiration

Whoever organizes a group trip ends up acting as its bank. They pay the riad deposit on their own card, work out a fair split when three people skip the desert tour and one wants the single room, then spend weeks chasing twelve friends before each supplier deadline.

Expense-splitting apps record who owes what after the fact. They don't collect the money, they don't chase anyone, and they don't pay the hotel. We wanted an agent that does that whole job before the trip, and does it safely, because it moves real money.

What it does

  1. Reads the bookings. The organizer pastes the confirmation emails. Claude extracts each supplier, its total, its payment schedule (a 30% deposit by 1 March, the balance by 15 April) and where to pay it.
  2. Splits the costs. Claude decides who takes part in each booking and who owes a supplement, using the organizer's notes on each traveller ("skips the desert tour", "wants the single room"). The arithmetic is done in code, so each booking's shares add up to its total, to the cent.
  3. Collects. Every traveller gets a PayPal invoice for each payment date, due 10 days before the supplier deadline it covers. Invoices accept partial payments, and deadlines close together are merged into one invoice.
  4. Pays suppliers. PayPal webhooks report every payment. As soon as the pot covers a supplier deadline, the agent pays it through PayPal Payouts and writes down why. Payments above the organizer's limit wait for one click of approval.
  5. Answers and acts. "Who still owes money for the riad?" "Remind everyone who is late." The agent answers from live data and sends the reminders.

The dashboard shows the pot as a jar that fills as payments arrive, a Bryntum Scheduler timeline of every payment in and out, and a log of everything the agent did and why.

Try it: open the example trip (Marrakech, 12 travellers, €4,425 across a riad, a desert tour and airport transfers), press Pay as traveller on a few rows and watch the pot fill. When the deposit is covered, the agent pays the riad on its own. The riad balance is above the €1,500 autopay limit, so it waits for Approve and pay. Everything runs in the PayPal sandbox; no sign-up needed.

How we built it

  • Claude (Anthropic API). Haiku 5.5 with structured output turns free-form confirmation emails into typed bookings and deadlines. Opus 5.5 with structured output plans the split and flags inconsistent bookings (for example, rooms that don't fit the group). Opus 5.5 with tool use is the agent, with three tools: get_trip_overview, send_payment_reminder and pay_supplier. It runs whenever a payment webhook changes which deadlines the pot covers, and in the organizer's chat. The fixed prefix (tools and system prompt) uses prompt caching.
  • PayPal Invoicing v2: create, send and remind, with partial payments allowed and the organizer and trip shown as the sender.
  • PayPal Payouts: pays suppliers from the pot. The batch id is derived from the supplier deadline, so each deadline can be paid only once.
  • PayPal Webhooks: INVOICING.INVOICE.* and PAYMENT.PAYOUTS*, with signature verification and deduplication by event id. OAuth 2.0 client credentials with a cached token, and a PayPal-Request-Id on every write.
  • Guardrails in code, not in the prompt. Whatever the model says, the code it calls only pays a supplier when the pot covers that deadline and every earlier one, holds anything above the autopay limit for approval, sends at most one reminder per instalment every 24 hours, and keeps the money set aside if PayPal refuses a payout. Every action is logged with its reason.
  • Bryntum Scheduler for the timeline: suppliers and travellers as resources, every deadline and instalment as an event coloured by status, the trip dates shaded and a line for today.
  • Next.js 16, React 19, Tailwind 4, Postgres with Drizzle (money stored as integer cents), deployed on Render from a Blueprint: a web service and a managed Postgres database.
  • A public demo that can't burn the budget: per-visitor hourly limits and a global daily cap on AI calls and invoice sends.

Challenges we ran into

  • Making an agent that moves money safe. We moved every rule that matters out of the prompt and into the functions the agent calls, so a wrong model answer can't pay the wrong supplier or pay twice.
  • Splits that add up. Supplements, people who skip a booking and 30/70 payment schedules make rounding errors easy. The model only decides who pays what share; code does the cents, so every booking sums exactly to its total.
  • Sandbox realities. PayPal rejects payer emails with accented characters, so the setup screen validates them. Simulated traveller payments don't add to the sandbox balance while Payouts spend it, so the demo business account needs a large balance. We also checked that retrying a refused payout with the same batch id works.
  • Deploying. The production build ran out of memory on Render's Linux builders while bundling the Bryntum package with Turbopack, even though it used under 1 GB on macOS. We reproduced it in a Linux container, narrowed it down to that one import, and switched production builds to webpack (1.3 GB).

Accomplishments that we're proud of

  • The agent doesn't just recommend. It pays a real (sandbox) supplier on its own, at the right moment, and explains why.
  • End to end on real PayPal APIs: 24 invoices out, payments in by webhook, payouts out, and every step visible in the log and on the timeline.
  • Judges can try the whole flow in a minute, without an account.

What we learned

  • For agents that handle money, the model should make judgment calls (who takes part, which supplier is next, what to tell a late traveller) and the code should own the amounts, the dates and the permissions.
  • PayPal Invoicing with partial payments plus webhooks covers instalment collection without building a payment page.

What's next for TripPot

  • Forwarding confirmation emails to the trip instead of pasting them, and reading PDF confirmations.
  • Paying suppliers that don't use PayPal (bank transfer details captured at extraction).
  • Multi-currency trips and accounts for travel agents who run several groups at once.

Built With

Share this project:

Updates

Submission history