0x571f3536571f…571f3539

ConfirmedInfrastructure538 vB172 sat/vB3 min decode

Telegram Ships In-Message Widgets With Native TON Payments

Telegram's Bot API 10.4 adds sandboxed in-chat widgets capped at 4 KB, with TON Connect payments through the built-in Gram Wallet and mandatory on-chain verification.

Telegram Adds In-Message Widgets With TON Payments
WitnessTelegram Adds In-Message Widgets With TON PaymentsFirmbee / pixabay

Outputs

  1. Telegram shipped in-message widgets in Bot API 10.4, dated Nov. 9.

  2. Widget code is capped at 32 KB before compression and 4 KB after.

  3. Widgets run JavaScript in a QuickJS sandbox with no direct network access.

  4. Payments use Telegram's built-in wallet and TON Connect transaction formats.

  5. Telegram requires on-chain verification of sender, recipients, amounts and outcome before treating a payment as complete.

Telegram rolled out in-message widgets on Nov. 9 through Bot API 10.4, giving TON developers a way to run small interactive interfaces directly inside a chat bubble — and pay through Telegram's built-in wallet using TON Connect transaction formats.

The change removes a step from the current flow. Until now, bots drove users to a button that opened a developer-hosted web page, the existing Mini Apps model. Widgets stay visible as the user scrolls the chat, so the interface lives inside the conversation rather than behind a launch tap.

What can a widget actually do?

Each widget is a self-contained HTML document with inline styling and JavaScript. Telegram caps the code at 32 KB before compression and 4 KB after. That 4 KB figure is a ceiling, not a target — the documentation frames it as a compressed-code limit.

The execution model is strict. Telegram runs the JavaScript in a QuickJS sandbox and renders the interface itself, rather than loading a browser-style WebView. Widgets have no direct network access: they send requests through Telegram to their bot, and the bot can push updated data back into the widget. Once the message is sent, the widget's code is frozen.

There's a hard input limitation too. Widgets cannot accept keyboard input. Telegram's developer guide tells builders to link out to a bot or a Mini App for anything that needs more than what a static-render widget can carry.

How do payments work?

The documented payment flow runs through Telegram's built-in wallet and reuses TON Connect transaction formats. A widget asks its bot to prepare a transaction, then opens Telegram's wallet confirmation window showing the bot, the amounts and the destination addresses. The user has to approve before anything moves.

For developers, that's the practical win: TON Connect code can be reused without standing up a separate wallet connection or a bridge just for the widget.

The wallet itself 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 wallet's wider rollout was previously covered by The Defiant.

Wallet access isn't universal, though. It depends on app support and regional availability, according to the guide — a constraint developers need to design around.

What does Telegram tell builders to verify?

One line in the documentation stands out for anyone handling money. Telegram instructs developers to verify the sender, recipients, amounts and the final transaction outcome on-chain before treating a payment as complete — not to rely on the returned message hash alone. That pushes confirmation logic onto the bot side and aligns widget payments with standard on-chain settlement practice.

The operational upshot is a split surface. Mini Apps remain the tool for full web experiences, hosted on developer infrastructure and opened on demand. Widgets cover lightweight, persistent, in-chat interactions with a payments rail attached and a fixed code payload.

Developers building against the Nov. 9 API release now have a decision to make per use case: a 4 KB sandboxed widget with native wallet flow, or a Mini App for anything that outgrows it.

via cryptonews.net (Source)

More from Daniel Okafor

Daniel Okafor

Show full bio

Correspondent covering people, launches and day-to-day practice in crypto and web3 industry at Mempool Brief.

1,020 articles