All on Telegram
Record expenses and check balances in Telegram, without another app to download.
TakoSplit / Backend engineering
Building TakoSplit
TakoSplit brings shared expenses and trip settlements into Telegram. I built it around a simple idea: the group chat is already there, so splitting the bills should fit into it.

Chat-native expense ledger
Illustrative Telegram conversation
01 / Why Telegram
The starting point was simple: a lot of people already use Telegram, and the trip conversation is often there too. I didn't want to ask everyone to download another app just to keep track of shared bills.
Why I chose Telegram
I chose Telegram so the group could plan the trip and track its costs in one place. Using a familiar chat kept the setup simple: no extra app to install, and no separate place to check the bills.
Key features
Record expenses and check balances in Telegram, without another app to download.
Use an existing group, or start a private trip with the bot and invite others.
Share a bill evenly or enter a different amount for each person.
Keep track of shared expenses and each person's share as the trip goes on.
Turn the trip's bills into a clear plan of who pays whom.
Get an optional exact-amount QR privately, then complete payment in your banking app.
02 / The architecture
I chose Python and FastAPI for the backend, with PostgreSQL for saved trip records. Telegram handles the conversation, while the backend takes care of calculations, confirmations, and the shared expense history.
The conversation
Commands & buttonsThe connection
Receives updatesThe decisions
Splits & settlementsThe shared record
Saved trip historyThe containerized backend runs as a hosted service.
Hosted PostgreSQL keeps trip state available across service restarts.
03 / How it connects
A trip brings together the people, the bills, and each person's share. Keeping the original expenses separate from the final settlement makes the result easier to understand and revisit.
One connected picture
Who is part of the trip
Who paid, and who shared it
What each person owes or gets back
A plan for who pays whom
04 / Getting the money right
Splitting a bill gets less straightforward when the amount does not divide evenly. I used integer cents so the shares always add up, including when someone enters custom amounts or edits a bill later.
The rounding problem
The remaining cent goes to a predictable share, keeping the total intact.
Everyone's entered amount must reconcile with the bill.
Participants and their proportions stay intact when an amount changes.
05 / Reliable confirmations
A slow response can make someone press confirm again. Confirmation handling is idempotent, so repeating that action does not create another expense.
There is a chance to check the amount and participants before confirming.
In-progress selections are saved so they can survive a service restart.
06 / Simplifying settlement
At the end of a trip, each person's spending and shares are brought together into a net balance. The settlement plan simplifies who pays whom, while the original obligations remain visible to explain the result.
The completed plan is saved so participants can come back to it later. The bot proposes the transfers; people make the payments themselves.
07 / Privacy by design
Trips can start in a Telegram group or in a private chat with the bot, with invite links for others to join. Whichever way the trip runs, PayNow setup and QR delivery stay in private chats, and stored mobile numbers are encrypted.
GROUP WORKFLOW
PRIVATE WORKFLOW

The person who needs to pay can receive an exact-amount QR privately, check the recipient, and complete the transfer in their banking app.
Private delivery requires the participant to have opened a chat with the bot first.
08 / Checks & operations
The tests focus on money calculations, payment-detail validation, and QR generation. Running the bot also means looking after the service and the lifecycle of older trip records.
Coverage includes rounding, custom splits, and edits that preserve the total.
Checks cover number validation, encrypted storage, and masked display.
Tests check the generated image and the payment amount in its payload.
A health check and secret redaction support running the backend.
Scheduled cleanup removes older completed trips so those records do not accumulate indefinitely.