Inspiration

Anyone who has planned a group trip knows the pattern. Someone books the hostel, pays for everyone, and then spends weeks chasing friends for money. Plans change in a messy chat ("I'm only staying 2 nights", "I'll take the private room"), and nobody is sure what they actually owe. Worst of all, one person backs out at the last minute and the whole booking falls apart.

We asked a simple question: what if nobody had to pay until everyone had committed?

What it does

TripMate GroupCommit turns a group trip into one shared plan and one shared decision.

  • One AI group chat, one plan. Friends talk normally, in English or Hinglish. The AI picks up the facts ("main sirf 2 raat rukungi", "dinner $60 for everyone") and the app updates a single versioned plan. Every change needs everyone's approval again.
  • Fair split, to the cent. The stay is split by nights. Shared costs like food, cabs and activities are split among the people who join them.
  • Commit together with PayPal. Each member approves their share as a PayPal authorization: the money is on hold, not charged.
  • An AI agent watches the deadline. If someone hasn't committed close to the deadline, the agent checks the real order status with PayPal and suggests options: someone covers, re-split, extend, or cancel. It works out the exact amounts for each option.
  • Humans decide, PayPal executes. Nothing moves until the right people vote yes. Then the app captures all holds at once or voids all of them. Nobody is charged for a trip that doesn't happen.

Our rule throughout: AI recommends → humans approve → backend checks → PayPal executes.

How we built it

  • Next.js 15 + TypeScript for the app and API, with Tailwind for the UI.
  • PayPal Orders v2 with AUTHORIZE intent creates one hold per member. Payments v2 captures or voids those holds.
  • The PayPal Agent Toolkit (get_order) gives the AI agent read-only access, so it can verify real payment status. It never moves money itself.
  • Gemini and Groq (Llama 3.3) through the Vercel AI SDK understand chat messages and write the agent's recommendation. If one provider is down, the app falls back to the other.
  • An autopilot loop runs the agent on its own when a deadline gets close, so nobody has to remember to press a button.
  • Signature-verified webhooks, email/password login with JWT, and WhatsApp-style invite links. Deployed on Render.

The money maths is deliberately not done by AI. Shares are integer cents, split with the largest-remainder method so the total always matches exactly:

$$ s_i = \left\lfloor \frac{T \cdot n_i}{N} \right\rfloor + r_i, \qquad \sum_i s_i = T $$

where \( T \) is the total in cents, \( n_i \) is member \( i \)'s nights, \( N \) is the group's total nights, and the leftover cents \( r_i \) go to the largest remainders.

Challenges we ran into

  • Keeping AI away from money. The model only extracts facts and explains options. All amounts are computed in code, and every action needs human approval.
  • Things changing mid-decision. If someone pays while the group is voting on a "cover" option, the old proposal could double-charge. Each proposal stores a fingerprint of the payment state and is blocked if anything changed.
  • Model changes during the hackathon. Our first Gemini model stopped accepting new keys, and newer models handled multi-step tool calls differently. We added a fallback: the app calls the PayPal Toolkit directly, then asks the model for one structured recommendation.
  • Sandbox surprises. An India-registered sandbox business account couldn't receive the payments, so we moved to a US business account.
  • Where does the money go? Sending money straight to an outside hotel's PayPal needs PayPal's multiparty (partner) setup. For now the app records the merchant PayPal reports on every order, shows it to the group, and blocks capture if any hold would pay someone else.

What we learned

  • Authorize-then-capture is a powerful tool for group decisions, not just checkout.
  • An AI agent is most trustworthy when its tools are read-only and humans hold the final say.
  • Small guardrails (integer cents, version numbers, stale-proposal checks) matter more than clever prompts.

What's next

Real merchant payouts through PayPal multiparty, a proper database, email and WhatsApp reminders, and multiple currencies.

Built With

Share this project:

Updates

Submission history