INSPIRATION: Every group meal, trip, or shared grocery run ends the same way: one person pays the full bill, and then the group chat turns into archaeology. Who had the second beer? Did we split the appetiser? Why is my share higher than yours? The maths is easy — the agreement is the hard part, and the host who fronted the money ends up chasing friends for days. We built SplitPal AI so the split is produced from the receipt itself, explained line by line, and settled immediately: each person pays only their own share, through their own PayPal checkout, while the host watches the money arrive instead of sending reminders.

WHAT IT DOES:

  1. Capture the expense — The host pastes receipt text (or types a plain-language note like "Pizza 18,000, two beers 9,000, salad 7,000 — Minji had the salad"). A structured parser extracts line items: name, quantity, unit price.
  2. Split it fairly — Items are assigned to participants (or split equally); tax and tip are allocated proportionally to each person's items, never flat, so nobody subsidises someone else's splurge. A deterministic split engine does the arithmetic.
  3. Explain every share — For each participant, the app generates a short, evidence-based breakdown: which items, which shared items, their slice of tax/tip, and the final amount. If someone asks "why is mine 12,400?", the answer is on screen, not in a chat argument.
  4. Settle with PayPal — Each participant gets a PayPal checkout for exactly their share (PayPal Orders v2, Sandbox). Captures are recorded per share, so the host's dashboard shows Paid / Pending per person, total collected, and total outstanding, updating as payments land.
  5. Nudge, don't nag — For unpaid shares, the app drafts a polite reminder message that includes the recipient's own itemised breakdown and their payment link. The host copies and sends it; SplitPal never sends messages on its own.

HOW WE BUILT IT: Next.js + TypeScript with Tailwind CSS for the interface and a lightweight in-memory store for the demo session (expenses, line items, participants, shares, PayPal orders/captures). PayPal integration uses the Orders v2 API (create order per share → buyer approval → capture) against the free PayPal Sandbox, with capture status re-checked server-side before a share is marked PAID, and idempotency keys per share so a double-click or retry can never create a duplicate charge. Extraction and explanation are deliberately kept deterministic: (1) extraction — a structured parser turns receipt text into line items and flags low-confidence lines instead of guessing; (2) explanation — per-person breakdowns and reminder drafts are generated from the already-computed split. All money maths is done by a tested, deterministic split engine, and the host confirms every split before any checkout is created.

CHALLENGES WE RAN INTO: Parsing real receipts is messier than it looks: quantities hide inside item names, discounts appear as negative lines, and "2 x" prefixes break naive parsers — the extraction schema had to carry quantity and unit price separately and flag low-confidence lines for the host to fix instead of guessing. Fair tax/tip allocation also needed care: rounding each person's slice independently makes the shares stop adding up to the bill total, so the engine allocates in whole currency units and assigns the remainder deterministically. Finally, a share must never be marked paid on the browser's word alone — the server re-fetches the PayPal order and only records PAID on a COMPLETED capture.

ACCOMPLISHMENTS THAT WE'RE PROUD OF:

  • The full split — receipt in, shares out — runs end-to-end, and the hosted demo creates real PayPal Sandbox orders (verified live, not mocks): orders 56K722946R226353H and 7HR23818XN1976521 created during local verification, and 5LY26506N4705250L created from the live deployment at splitpal-ai.onrender.com, each returning a Sandbox approval URL with amounts matching the computed shares. Capture completes as soon as the buyer approves in the Sandbox checkout, and the server re-verifies the order before marking a share PAID.
  • The split engine is covered by unit tests for equal splits, assigned items, proportional tax/tip, and rounding (shares always sum exactly to the total).
  • The explanation layer never calculates or charges. Every amount a participant sees was produced by deterministic, testable code.

WHAT WE LEARNED: Splitting a bill is a trust problem disguised as a maths problem. People don't refuse to pay because the arithmetic is hard — they hesitate because they can't see why they owe that amount. Putting an explained, item-level breakdown in front of each person, attached to a checkout for exactly that amount, removes both the argument and the delay. We also learned to keep generated text away from the money path: extraction and explanation are great automation jobs; arithmetic and payment state belong to deterministic code verified against the PayPal API.

WHAT'S NEXT: Photo/OCR receipt capture, recurring splits for roommates (rent, utilities), multi-currency trips, PayPal Payouts so a host who overpaid a shared refund can redistribute it, and a "settle all" link the host can drop into any group chat.

Built With

  • next.js
  • node.js
  • paypal-checkout
  • paypal-orders-v2-api
  • paypal-sandbox
  • tailwind-css
  • typescript
Share this project:

Updates

Submission history