Inspiration

Splitting a bill with friends takes seconds. Collecting the money takes days. You chase people on chat apps, argue about who had the drinks, and lose track of who has paid. We wanted one app that handles the whole thing, from "who owes what" to "money received", with PayPal moving the money and AI removing the arithmetic and the awkwardness.

What it does

SplitPay AI turns a plain-language message into a fair split, sends every friend a real PayPal invoice, and tracks who has paid.

  • Describe it: type "Dinner was $120, Rahul had drinks so he owes more" and AI returns a fair split.
  • Manual split: pick people and type an amount for each.
  • Receipt scan: upload a bill photo, tap who had which item, and tax and tip are shared in proportion.
  • Review first: nothing is sent until the user confirms the preview.
  • Real PayPal invoices: one invoice per friend, created and sent through the PayPal Invoicing API.
  • Payment tracking: the Status tab reads the latest invoice status from PayPal and shows Paid or Waiting.
  • One-tap reminders: unpaid friends get a WhatsApp or SMS message with their PayPal pay link already inside.
  • Saved contacts and history in Postgres, in a mobile-first interface.

How we built it

  • Frontend: React and Vite, mobile-first, hosted as a Render static site.
  • Backend: Node.js and Express, hosted on Render.
  • Payments: PayPal Invoicing API in the sandbox.
  • AI: Google Gemini for text-to-split and receipt reading.
  • Database: Neon Postgres for contacts, splits and invoices.

The flow: the user picks friends and describes an expense, the API returns a preview, the user confirms, the API creates and sends a PayPal invoice for each friend, and the Status tab refreshes payment status from PayPal.

How we use PayPal and AI

PayPal: an OAuth client-credentials token, then the Invoicing API v2 to create an invoice, send it, and read it back for its status and payer link. The invoice is the payment request, and friends pay it with their own PayPal account.

AI (Gemini): it understands free-text expenses and returns structured JSON, and it reads receipt photos and returns merchant, items, tax, tip and total. Guardrails: our code re-verifies every amount in cents and fixes rounding, a human reviews each split before anything is sent, and model calls retry and fall back across several Gemini models when one is busy.

Challenges we ran into

  • PayPal sandbox setup: invoice creation failed with a permissions error until we enabled the Invoicing feature on the app. Sending then failed because Indian sandbox accounts cannot send invoices, so we moved to US Business and Personal test accounts. PayPal also blocks paying an invoice from the merchant's own account.
  • Exact money: AI can slip on arithmetic, so all amounts are checked and rounded in cents on the server.
  • Busy or retired models: Gemini sometimes returned "high demand" or a retired model name, so we added retries and an ordered fallback list.
  • Hosting that survives judging: free tiers sleep or pause. We chose a database that does not pause after a week of inactivity and added a clear "waking up the server" message in the app.

Accomplishments that we're proud of

  • The full loop works live: describe, split, PayPal invoice, pay, and see Paid in the app.
  • Receipt scanning with fair proportional tax and tip.
  • A review step before any money request is sent.
  • A clean, accessible mobile interface a real group of friends could use.

What we learned

How the PayPal Invoicing flow fits together, how to keep AI output trustworthy when money is involved, and how to work as a two-person team with branches, pull requests and reviews. We used Claude for planning and pair-programming and Cursor for UI refinement. The product itself runs on Gemini.

What's next

User accounts with per-user data, editing contacts, recurring splits, multiple currencies, scheduled reminders, and PayPal webhooks in place of polling.

Try it

Live app, code and testing steps are linked on this page. Everything runs in the PayPal sandbox with test money. The first request can take up to a minute while the free server wakes up.

Built With

Share this project:

Updates

Submission history