Inspiration
Every group dinner ends the same way: one person pays, then spends the next week working out who had what, who owes tax and tip, and chasing friends for money. We wanted that to take 30 seconds instead of a week.
What it does
SplitPal turns a receipt into PayPal payment links.
- Add the bill: upload a receipt photo or PDF, or describe it in plain English ("Sam had the veggie wrap, Ana and I shared the fries").
- AI reads it: Claude extracts every line item, tax, tip and service charge, and pre-assigns items from your note.
- Fix anything: tap names to assign items. Shared items are split evenly; tax, tip and fees are split in proportion to what each person ordered.
- One PayPal link per friend: each link opens a PayPal checkout for exactly that person's share, paid straight to whoever covered the bill.
- Watch it settle: a live tracker shows who has paid and who still owes.
How we built it
- PayPal REST APIs (sandbox): OAuth 2.0 client credentials, then Orders API v2 to create one
CAPTUREorder per friend (with the payer's PayPal email aspayeeand aPayPal-Request-Idfor idempotency), and capture on the server after approval. A share is only marked paid when the capture status isCOMPLETED. - PayPal JavaScript SDK: Smart Payment Buttons on each friend's payment page.
- Claude (Anthropic API): vision + text understanding of receipts, with structured outputs (a JSON schema) so the response is always valid, typed data.
- Node.js + Express back end, vanilla HTML/CSS/JS front end, hosted on Render.
Challenges we ran into
- Money math has to be exact. The AI only reads the bill; all splitting is deterministic code in integer cents with largest-remainder rounding, so the shares always add up to the receipt total, to the cent.
- Messy receipts. Faded photos, abbreviations, and service charges vs. tips. Structured outputs plus a human review step keep it reliable.
- Keeping secrets safe. We validate the PayPal client ID before it is ever sent to the browser, so a misconfigured environment variable can't leak another key.
Accomplishments that we're proud of
- From photo to payment links in under a minute.
- A real end-to-end PayPal flow: create order, approve in the PayPal popup, capture, and a live "paid" status.
- Works with no keys at all (demo mode) so anyone can try the flow.
What we learned
How the PayPal Orders v2 lifecycle fits together (create, approve, capture), how to use sandbox buyer and seller accounts, and how to combine a language model with plain code so the AI does the reading and the code does the math.
What's next for SplitPal
- Recurring splits for roommates (rent, utilities)
- PayPal Payouts so an organizer can reimburse a group in one batch
- A group chat bot: forward a receipt photo, get payment links back
Built With
- anthropic
- claude
- css3
- express.js
- html5
- javascript
- node.js
- paypal
- paypal-orders-api
- render