Lessons from our products

Designing UPI-Based Group Settlement: Lessons From SplitMitra

Group expense settlement is a graph problem with a human outcome: reduce many small debts to the fewest sensible payments, then make each payment one tap. This is how we approached it in SplitMitra.

By Cloud Technopix · Published 4 August 2026 · 11 min read

The problem: debts that multiply

When friends share a trip, a flat or a dinner, the expenses are easy to record and awkward to settle. Each person pays for different things, so the raw record is a tangle of "A owes B", "B owes C" and "C owes A". Paying each of those separately means many small transfers, each with its own reminder and chance of being forgotten. In SplitMitra our aim was to reduce that tangle to the fewest payments that leave everyone square, and to make each payment one tap in India's UPI ecosystem.

Step one: work with net balances

The first insight is that who paid for what matters less than where each person ends up. For every member, add up what they paid and subtract their share of everything. The result is a net balance: positive if the group owes them, negative if they owe the group. Across the whole group these balances always sum to zero, because every rupee spent is somebody's share.

This reduction is powerful. A web of pairwise debts collapses into a short list of people who are owed money and a short list of people who owe it. Everything after that is about matching the second list to the first.

Step two: simplify the debts

With net balances, a simple and effective approach is to repeatedly match the person who owes the most with the person who is owed the most, settle as much as the smaller of the two amounts allows, and continue until all balances are zero. Each step clears at least one person completely, so a group of n people needs at most n minus 1 payments.

Finding the mathematically minimal number of payments in every case is a harder problem in general, and for the group sizes people actually travel in, the simple greedy method gets very close. We chose it because it is easy to explain. People will pay what the app tells them only if they can see why the number is right.

An example in the style shown on the SplitMitra site: a six-transfer tangle reduced to two.
Before simplificationAfter simplification
Six separate pairwise debts among the groupTwo payments settle everyone
Each person tracks who they oweEach person sees one or two payments
Reminders needed for every pairFewer reminders, fewer disputes

Why fewer transfers matter more than clever maths

A settlement is a social event as much as a calculation. Every extra transfer is another message, another screenshot of a payment and another moment where somebody says "I thought you paid that". The best algorithm is the one that leaves the group with the shortest list of things to do, and explains it plainly.

That also shaped how we handle fairness. Splits can be equal, by exact amounts, by percentage or by shares, and the settlement view always shows the original expenses behind the numbers, so a member who doubts a figure can trace it.

Step three: make payment one tap

Telling someone to pay 1,240 rupees is only half the job. The friction is in the payment itself: opening a payment app, finding the person, typing the amount and a note. UPI supports deep links and QR codes that carry the payee, the amount and a note, so the app can hand off to the user's preferred payment app with every field filled in.

  • A deep link opens the payment app on a phone with payee, amount and reference prefilled
  • A QR code lets someone pay from a different device, or lets the payee collect in person
  • The app records that a payment was made so the group's balances update for everyone

Designing this well means treating the payment app as a partner. We prepare the request and record the result, but the money moves between the people and their own bank apps, not through us.

Keeping everyone in sync

A group is several people editing one shared record on different phones. If two people add expenses at once, or someone marks a payment while another is viewing the balances, the numbers must still agree. SplitMitra treats the group's expense list as the source of truth and recomputes balances from it, instead of storing balances that might drift. Updates are delivered to members in real time, so what one person sees matches what the others see.

Edge cases worth designing for

  • Rounding: shares rarely divide evenly, so the leftover paisa must be assigned deterministically so totals still match
  • Edits and deletions: changing an old expense changes balances, so the settlement view must update and show what changed
  • Members who join late or leave early: shares apply only to expenses they took part in
  • Different currencies on a trip: record the rate used so the conversion can be audited
  • Partial payments: someone pays part of what they owe, and the balance should show the remainder

What we took from it

  1. Reduce to net balances first. It turns a graph problem into two short lists.
  2. Prefer an algorithm you can explain over one that is marginally better on paper.
  3. Own the whole path to the outcome. Calculating who pays whom is useless if paying is still annoying.
  4. Derive state from the record of events rather than storing results that can drift.

Group settlement is one of the problems behind the consumer apps we build, and the same approach applies to any product where several people share costs. If you are planning something similar, our mobile app development service covers the app, the real-time back end and payment integrations, and you can reach us on the contact page.

Does SplitMitra move money between members?

No. It prepares UPI payment requests and records when they are made. Payments happen between members and their own payment apps.

Is the simplified payment list always the absolute minimum?

It is always short and always correct, and for typical group sizes it is at or very near the minimum. We favour a method members can understand and check.