Inspiration
Splitting a bill is easy when nothing changes. Real group purchases change: someone can't afford their share, someone drops the coach, the tickets cost more. The spreadsheet gets edited, the group chat scrolls on, and nobody is sure which version they agreed to or what they still owe. We wanted the plan, the consent and the money to stay in step.
What it does
- New: Cases: each side adds the evidence they have (a photo, pasted messages, a voice note) and it becomes one shared timeline of facts marked agreed, disputed or unknown. The settlement uses only agreed facts, shows its arithmetic, and PayPal runs only after both sides accept.
- A group tab shows the total and each person's exact share, to the cent, with one colour per person.
- Anyone organising can propose a change. It becomes a new numbered revision, and every earlier approval is marked historical, so nobody is held to a plan they never saw.
- People can state spending limits. The draft shows who is over their limit and by how much.
- The organiser can describe what needs to change in plain words. A model reads the request and proposes a new split; the app shows how the model understood the request, lets the organiser correct that reading, and only copies the result into the draft when the organiser chooses to.
- Agreements are recorded per person against one exact revision.
- Only when everyone has agreed does the app create PayPal orders: one per person, each for exactly their share.
- Each payer approves on PayPal. The organiser captures each payment with an explicit confirmation, and the tab shows what is retained and what is still to collect.
- If the plan changes after someone has paid, the app works out additional amounts or returns against what was already captured.
In the demo: three friends, $220 of tickets and coach. Ben can only put in $80. The model proposes $70 / $80 / $70, everyone agrees to revision 2, three PayPal Sandbox orders are created, Ben pays his $80 and it is captured.
How we built it
- Node.js server with no dependencies and no build step; plain HTML, CSS and JavaScript modules in the browser.
- Exact-cent allocation and limit fitting are deterministic code. The model never does the arithmetic that people are charged from without the result being shown and accepted first.
- AI: any OpenAI-compatible chat endpoint. The demo uses a local open-weight model (Qwen2.5 7B through Ollama). The model's structured reading of the request is validated, displayed and editable.
- PayPal: REST Orders v2 in the PayPal Sandbox. OAuth, one order per payer, status reads, explicit capture, and refunds for changed plans. Credentials stay on the server.
- Work can be kept in the browser or saved to a file and reopened elsewhere.
Challenges we ran into
- Models misread requests. An early version applied the model's answer directly; we changed it so the reading is shown first and wrong readings can be corrected or thrown away.
- Rounding. Splits have to add up to the total exactly, so allocation works in cents and moves the fewest item cents.
- Payments outlive plans. A capture belongs to the revision it was approved under, so changed plans need net amounts, not fresh charges.
Accomplishments that we're proud of
- A full real run in the PayPal Sandbox: orders per person, guest approval, explicit capture, and the tab reconciling to the dollar.
- Consent that is tied to a revision, not to "the plan" in general.
- An AI feature that is useful and still leaves every money decision with a person.
What we learned
The hard part of group money is not the maths. It is knowing which version everyone agreed to. Making revisions and agreements first-class made the payment side simple.
What's next
- Private invitation links so each person reviews and agrees from their own phone.
- Automatic reminders for people who have not agreed or paid.
- Returns to the original payer when a plan gets cheaper.
Built With
- css
- html
- javascript
- node.js
- ollama
- openai-compatible-api
- paypal
- paypal-orders-api
- paypal-sandbox
- qwen
