Example: a Telegram Mini App That Splits Group Expenses Inside the Chat
A concrete Mini App for a trip, a flat, or a small team: open from the group, log who paid, simplify debts, settle with Stars, an invoice, or TON. Why `chat_instance` is the workspace, and what I would ship first.
This is the Mini App I reach for when a group already exists and the pain is a spreadsheet. A trip to the mountains. Four people in a rented flat. A small team splitting a client dinner. Someone always pays, someone always “will send it later,” and the later lives in a Google Sheet nobody opens.
Tools like Settler and Fracti already proved the shape: log spend in the group (text, voice, or a sheet), show balances in a Mini App, settle with a tap. I would not rebuild their AI voice parser on day one. I would rebuild the ledger and the settle button. That is the product.
1. The user path in this example
The workspace is the group. Nobody creates an account named “Alps 2026.” They add the bot, open the Mini App from the menu, and the ledger is already this chat.
- Someone adds the bot to the group. The bot asks for permission to read membership so the split list is the people actually in the chat - not a form of emails.
- Olena paid 2400 UAH for the cottage. She opens the Mini App, amount, title, who is in. MainButton = save. Haptic on success. The bot posts a one-line receipt in the group so the others do not have to open the app yet.
- Anyone opens the Mini App later and sees “Andriy owes Olena 600.” Not a matrix. One simplified graph. A “settle” button per edge.
- Settle: mark paid (trust), send a Telegram invoice / Stars, or a TON transfer if that is already how this group moves money. The bot announces “settled” in the group. The edge disappears.
2. Why the Mini App, not only a bot
A text bot can log “/paid 2400 cottage.” It cannot show a fair split with exceptions, edit last night’s dinner, or let Andriy tap-pay Olena without a thread of commands. The chat stays the inbox. The sheet stays the UI.
- Optional: a mention in the group - “@splitbot I paid 50 for dinner” - creates a draft. Confirm in the Mini App. That is how Fracti feels magic. It is also how you get garbage rows if you skip confirm.
- `chat_instance` is the primary key. Two groups with the same people are two ledgers. Do not merge them because the user ids overlap.
3. What I would build first (and what I would not)
A first version is a calculator with a chat. It is not Splitwise with banks and tax reports.
- Ship: add expense, equal split, exclude one person, simplify debts, mark settled, bot receipt in the group, HMAC on every write.
- Ship next: one settle rail that this group already uses. In Ukraine that is often a Mono invoice or “I sent it, tap to confirm.” Stars if the amounts are small and digital. TON only if wallets are already in the group.
- Do not ship first: OCR of crumpled receipts, voice NLP, recurring rent templates, five currencies with live FX, a public profile. That is a second month if the first ledger is used twice.
4. The two bugs that kill a split app
Wrong math and missing people. Everything else is polish.
- Simplify debts with a min-cash-flow pass, then show one number per pair. If you show a raw NxN matrix, people will screenshot it into another sheet.
- Members who leave the group must stay on old expenses and drop off new ones. Snapshot the member set on each row. Do not recompute history against tonight’s member list.
A split Mini App is a ledger with a group as the room
I would ship this for a trip club, a coliving, a small agency, or any WhatsApp-style Telegram group that already argues about money. Next.js sheet, Postgres ledger keyed by `chat_instance`, a bot that only posts receipts and settle prompts, one payment rail. If that is your group - write via the form. We will scope a first version that logs a real dinner this month, not an AI that hallucinates who ate the pizza.
Need this built, not just explained?
Telegram Mini App development: Next.js, payments, bots. Direct contractor.
Ready to discuss your project?
I'm a senior web engineer specializing in React and Next.js - available for freelance projects worldwide.
Location
Kyiv, Ukraine
Upwork
View ProfileTelegram
Contact meViber
Contact me