-
-
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.
- 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 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, 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) 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: 249 automated tests, including split and rounding rules, data isolation between visitors, duplicate-invoice protection 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, so we also verified the webhook path with recorded payments.
- Rounding: making sure shares, percentages and care credit always add up exactly to the receipt total, to the cent.
Accomplishments that we're proud of
- A complete, live product, not a proof of concept: from a receipt photo to PayPal invoices, automatic status 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 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 and proposes, the family decides.
What's next for CareSplit
- Real buyer payments inside the app with PayPal Checkout.
- A care log, so care credit can reflect time actually given.
- Monthly family reports and reminders.
- Support for more languages and currencies.
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.