

We aim to provide a user-friendly and secure application that simplifies the payment process and eliminates the hassle of splitting bills between peers.
Introduction Manage and share expenses with tonconnect! It is a bot designed to help create invoices in a telegram group chat. Members of the group are able to pay for the bill or expense with cryptocurrencies.
It makes it easy to make financial transactions with anyone regardless of country or location. All you need to do is add your members to the same telegram group chat as bot and enter a few commands!
Guideline To get started, follow these simple steps:
Invite all members sharing expenses to the Telegram group. Search for “Split” on the search bar and invite the bot to the group. Type “start” to begin interaction with the bot The bot will ask you to enter the usernames of the members to charge. Simply type in the usernames separated by spaces and preceded by '@'. Once the members are added, user can proceed to private chat with the link below to finalize the bill details and create the split for everyone to pay their share. Members can then go to the private chat to access the web app and review the payment request. To pay the invoice, members need to connect their Tonkeeper wallet to the web app. Please note that currently only oUSDC can be received by the invoice creator, while payers can send either TON, oUSDC and oETH.
User Authentication and Security The ton-connect bot uses the 'ton-proof' protocol for user authentication and security. When a user connects to the bot, the client requests a payload from the server, which includes a random string. The client signs the payload using their TON wallet, and sends the signed payload back to the server. The server verifies the signature and sends a response to the client with the user's wallet address and a JWT token. The client saves the JWT token in local storage and uses it for maintaining the logged-in state.
Payment Request Creation and Tracking To create a payment request, a user starts a private chat with the bot and opens the Telegram web app. The user enters the command '/start' in the private chat, and the bot responds with a prompt to enter the usernames of the members they want to charge. Once the user has entered the usernames, the bot creates a payment request and sends it to the members in the private chat.
The server has a worker running on the background to check whether the payment requests have been settled or not. The worker queries the TON Blockchain network using the Toncenter API.
Payment Processing Members can pay the invoice in the web app. The web app currently supports only oUSDC as a receivable coin for the receivers, but oUSDC, oETH, and TON are available for senders.
If the sender selects a coin other than oUSDC, the bot uses 'stonfi' to swap the sender's coin and transfer the corresponding amount of oUSDC to the receiver's wallet.
Transaction Verification When a user requests a payment link, the server generates url with the cell data, message and the destination to send the message to. The request is then marked as active, and a worker periodically verifies the status of active requests.
Since stonfi's swap feature relies on jetton's transfer, the verification process checks the destination of out_msg. If the transaction sent from the sender's wallet to the destination is confirmed within the specified time (3 minutes), the transaction is considered complete.
For standard jetton transfers, the verification process examines the source of in_msg. After marking the request as active, if a transaction is found in the sender's transaction history where the source of in_msg matches the receiver's jetton wallet, the payment is considered confirmed.
This approach is a workaround and may not be the most efficient or optimal solution. It is recommended to review and refine the code in future iterations to improve its maintainability and performance.
Roadmap Introduction As we continue to grow and improve it, we are excited to share our roadmap. This roadmap outlines the new features and updates we have planned to enhance the user experience and expand our services.
Phase 1: Usability Improvements In the first phase of our roadmap, we'll focus on improving the usability of ton connect. This includes:
Expanding the range of supported cryptocurrencies for both senders and receivers, making it even more convenient for users to pay and receive payments. Integrating with additional wallets, including browser wallets and the upcoming Telegram Messenger integrated wallet, to provide more options for our users to connect and make transactions. Phase 2: New Features Once we have increased user traffic, we'll introduce new features to our platform, such as:
A Telegram-based payment system that enables local merchants to receive payments from international users through tokens. This blockchain-based system will reduce card fees and incentivize merchants to use our service by sharing the savings from reduced fees with them. Integration with popular financial apps and platforms, allowing users to connect their existing accounts for seamless payments and transactions. Implementing a detailed transaction history feature, where users can track and review their previous payments and requests, providing better financial management and accountability. Crypto escrow service: A generated deposit account that will only be released if the terms of trsnaction are met by both parties. An incentivized system to award active users and encourage usage. Phase 3: Expansion and Partnerships As it gains more traction, we plan to:
Collaborate with other companies and platforms to widen our reach and provide more comprehensive payment solutions for our users. Explore strategic partnerships within the crypto and fintech industries, leveraging the strengths of both sides to create innovative and user-friendly payment experiences. Expand our services to support various use cases, such as event ticketing, crowdfunding, and subscription payments.