en
Back to the list

Telegram Adds In-Message Widgets With TON Payments

source-logo  thedefiant.io 26 m
image

Telegram has introduced interactive widgets that run inside chat messages and can request payments through its native TON wallet, giving developers an in-chat alternative to opening a Mini App.

“Any Telegram message can now become an app,” founder Pavel Durov wrote on his verified Telegram channel. He described the format as downloading instantly at “just 4 KB,” with native rendering, payments and “viral mechanics built in.”

The feature is live, but its initial distribution is narrower: Telegram's developer documentation says production widgets work only in private chats between users and bots. Group widgets, inline distribution through bots and forwarding are available on the test server, not in production.

Know when your
coins move

Alerts, real-time prices, and market news — all in one app
qr-code Point your phone camera to install
4.8 based on 40K reviews in the App Store and Google Play

For TON builders, the change puts a small interactive interface directly in a message bubble rather than behind a button that opens a web page. Telegram added widgets in Bot API 10.4, dated Nov. 9.

The 4 KB figure is a compressed-code ceiling, not a requirement that every app be that size. Each widget is a self-contained HTML document with inline styling and JavaScript, capped at 32 KB before compression and 4 KB afterward.

Telegram runs the JavaScript in a QuickJS sandbox and draws the interface itself, rather than using a browser-style WebView. Widgets have no direct network access: they send requests through Telegram to their bot, which can update the widget's data. Their code stays fixed after the message is sent.

That makes widgets distinct from existing Mini Apps, which are developer-hosted web pages opened on demand. Widgets remain visible as users scroll the chat, but cannot accept keyboard input. Telegram's guide directs developers to link to a bot or Mini App for anything larger.

Payments Through the Built-In Wallet

The documented payment flow uses Telegram's built-in wallet and TON Connect transaction formats. Developers can reuse their TON Connect code without setting up a separate wallet connection or bridge for the widget.

It builds on Telegram's native Gram Wallet, which TON's website describes as a non-custodial wallet developed by Telegram. Gram is TON's native coin, formerly called Toncoin. The Defiant previously covered the wallet's wider rollout.

A widget asks its bot to prepare a transaction, then opens Telegram's wallet confirmation window showing the bot, amounts and destinations. The user must approve. Wallet access depends on app support and regional availability, according to the guide.

Telegram also instructs developers to verify the sender, recipients, amounts and transaction outcome onchain before treating a payment as complete—not simply rely on the returned message hash.

thedefiant.io