-
-
Fair split with Care credit: Ben gives time to care, so his share is 25% lower – the rest is shared by Anna and Clara.
-
AI reads the pharmacy receipt; a person checks every field and the arithmetic ("Amounts add up") before anything is sent.
-
Status updates automatically: Clara's invoice turned Paid through a verified PayPal webhook, while Ben's is still waiting.
-
The PayPal invoice Ben receives, from CareSplit, with his care credit shown as a line discount (sandbox, fictional data).
-
AI assistant: it answers "Who hasn't paid?" and prepares a reminder – nothing is sent until the organiser presses Confirm.
Inspiration
I have worked for 20 years in community pharmacies. Again and again I saw the same quiet tension at the counter: one adult child pays for an elderly parent's medicines every month, while the siblings "will pay back later". Money between siblings is awkward, receipts get lost, and the sibling who does the pharmacy runs and the appointments often pays the most. CareSplit is built for that family.
What it does
- Snap a receipt. AI (Google Gemini) reads the pharmacy, date, items, discount, tax and total from a photo.
- A person checks it. The app verifies the arithmetic ("Amounts add up") and every field can be edited before anything happens.
- AI checks before sending. CareSplit warns when a receipt looks like a repeat (same pharmacy and total within a few days) or is unusually high, and notes in neutral words when a sibling has invoices past their due date. The findings come from plain rules; Gemini only words them, kept to the exact facts. Nothing is blocked: the organiser can dismiss any warning.
- Fair split. Equal shares or custom percentages, for families of 2–4 people. The organiser covers odd cents, so nobody is over-invoiced.
- Care credit. The sibling who gives time (pharmacy runs, appointments, visits) can pay a smaller share. The credit appears on their PayPal invoice as a line discount, with a plain explanation.
- PayPal invoices. Each sibling gets a real PayPal invoice (sandbox), after a confirmation step. The organiser can cancel an invoice or mark it as paid outside PayPal.
- Automatic status. Verified PayPal webhooks move an invoice to "Paid" without anyone pressing refresh.
- AI-written reminders. The organiser gets a short draft reminder in a friendly or neutral tone, written from structured facts (amount and due date) and checked so it never adds numbers, links or addresses. The organiser edits it, and PayPal sends exactly what was approved, with a reminder history per share and at most one reminder a day.
- AI assistant with a human in control. The organiser can ask "Who hasn't paid?" or "Send Ben a reminder". The assistant answers from the family's data and prepares actions as cards; nothing is sent until the organiser presses Confirm.
- Privacy by design. Each visitor gets a private demo family, receipt photos are never stored (only the amounts), and demo data is deleted automatically after 7 days. Amounts and dates only, no medical advice.
How we built it
- Front end: React, TypeScript, Vite, Tailwind CSS, Radix UI, mobile-first.
- Server: Node.js / TypeScript (Fastify), deployed as one service on Google Cloud Run.
- Data: Firestore, with a 7-day TTL policy; secrets in Secret Manager.
- PayPal: Invoicing API (create, send, read status, cancel, remind with a custom note, record payment, line-item discounts) and webhooks with PayPal signature verification. The server always re-reads the real invoice status from PayPal, so a repeated or fake event cannot set a wrong status.
- AI: Google Gemini for receipt reading (with retries and fallback models), for wording the AI checks and reminders (accepted only if they keep the exact facts, otherwise a plain template is used), and for the assistant (function calling over our own tested tools, with a separate model and a global daily budget so receipt reading always keeps its quota).
- Quality: 318 automated tests, including split and rounding rules, data isolation between visitors, duplicate-invoice protection, AI-check and reminder fact validation, and prompt-injection cases.
- We evaluated PayPal Agent Toolkit in the sandbox and chose not to adopt it: our own wrappers already enforce family ownership and human confirmation, and the toolkit allowed free-text extra recipients.
- The whole app was built with Claude Code. I set the idea, the rules and the priorities and approved every step and every cloud change; Claude Code planned, wrote and tested the code.
Challenges we ran into
- Invoicing first returned 403 for our app; it worked after creating a US business sandbox account and a new app linked to it.
- The free Gemini quota is small, so we added fallback models, rate limits and a separate model for the assistant.
- The PayPal sandbox checkout pages were often very slow or hung in a popup, so we also verified the webhook path with recorded payments and moved in-app payment to a same-window redirect.
- Rounding: making sure shares, percentages and care credit always add up exactly to the receipt total, to the cent.
- Keeping AI text honest: every AI-worded warning or reminder is checked against the facts before it is shown.
Accomplishments that we're proud of
- A complete, live product, not a proof of concept: from a receipt photo to PayPal invoices, automatic status, AI checks, AI-written reminders and an assistant.
- Care credit: a split rule built around caregiving, not just around money.
- Safety: human confirmation for every action, verified webhooks, private demo families and no stored photos.
What we learned
- How PayPal invoices, discounts, reminders and webhooks fit together, and why the server should trust PayPal's real status rather than the event alone.
- That AI is most useful when a person stays in charge: AI reads, checks and drafts; the family decides.
What's next for CareSplit
- Pay now inside the app (PayPal Orders API): already built and covered by automated tests, with the amount set by the server and the invoice closed after capture so nobody pays twice. It will be switched on in the live app after a final buyer test in the sandbox.
- A downloadable monthly report for the family.
- Care credit level 2: a simple time log for the caregiving sibling.
- Testing with real families, then moving from sandbox to live PayPal.
Built With
- claude-code
- fastify
- firestore
- gemini
- google-cloud-run
- google-secret-manager
- node.js
- paypal
- paypal-invoicing-api
- paypal-webhooks
- react
- tailwindcss
- typescript
- vite
Log in or sign up for Devpost to join the conversation.