Back to Blog
TELEGRAM STARS API

Telegram Stars API Delivery in Under 10 Seconds: Our Benchmarks

MyStars.tg TeamLast updated 10 min read

If you sell Telegram Stars or Telegram Premium through your own bot, Mini App or website, delivery speed is the part of the Telegram Stars API your customers actually feel. They pay, then they stare at the screen until the Stars land. We recently rebuilt that path in MyStars FaaS, our fulfilment API, and the result is measurable. A typical order now goes from "payment confirmed on-chain" to "Stars delivered" in about 8 seconds, and nine out of ten finish in under 10 seconds.

Telegram Stars API benchmark: about 8 seconds from payment in block to Stars delivered

This post shows the numbers, explains what we changed, and lists the commercial terms for partners who want to resell Stars and Premium without building a Fragment integration themselves.

The numbers: before and after

We measured real production orders paid in GRAM (TON), before and after the change. Every figure starts at the moment the customer's payment landed in a block on the TON blockchain, because that is when your customer believes they have paid. Every figure ends at the moment the order was confirmed as delivered.

Metric Before Now
Payment in block → delivered, median 15.3 s 7.7 s
Payment in block → delivered, 90th percentile 28.0 s 9.2 s
Payment detection, median 6.8 s 2.8 s
Payment detection, 90th percentile 18.2 s 3.2 s
Orders delivered in under 10 seconds fewer than 1 in 10 about 9 in 10

In plain words, the median order is twice as fast, and the slow tail is three times faster. The slow tail is the experience of your unluckiest customers, and that matters most for support tickets.

One honest note: occasionally an order still takes longer. If Fragment returns an error on its side, our system retries the order automatically on a different fulfilment account, and that can take a couple of minutes. It is delivered without anyone touching it. Retries like this are rare, but they exist, which is why we quote the 90th percentile and not just a best case.

Where the time used to go

A Telegram Stars order through an API has four stages:

  1. Detect the payment. Notice that your customer's GRAM or USDT has arrived and that it matches the order.
  2. Fund the purchase. Move the right amount to the account that will buy on Fragment.
  3. Buy on Fragment. Place the order on Fragment, Telegram's official marketplace for Stars and Premium, and sign the payment.
  4. Confirm and notify. Wait for the on-chain confirmation, mark the order delivered and send your webhook.

Before this change, the biggest single cost was step 1. We checked for incoming payments on a 20-second cycle, so a payment waited half a cycle on average and almost a full cycle in the worst case. Steps 2 and 4 each carried a fixed pause of about 3 seconds before the first confirmation check. That timing was built for a TON blockchain that produced a block every 2.5 seconds.

The TON network has since moved on. Since the Catchain 2.0 upgrade went live in April 2026, mainnet produces a block roughly every 400 milliseconds and finalizes in about one second. Our timing was the bottleneck, not the chain.

What we changed

1. Push-based payment detection

We no longer wait for the next polling cycle. MyStars FaaS now subscribes to a real-time stream of finalized transactions on its receiving addresses. When your customer's payment is finalized, the stream notifies us, and the order is checked within moments.

The stream only tells us when to look. The decision is still made by the same verification that checks the amount, the destination and the payment memo before anything moves. Polling stays on as a safety net, so a dropped connection slows detection down but never loses a payment.

This is where the slow tail disappeared. Detection used to take up to 18 seconds at the 90th percentile. Now payments are detected within about 2.5 to 3.5 seconds of their block.

2. Confirmations tuned for sub-second blocks

After each on-chain transfer, our system has to prove the transfer landed before it moves to the next step. The first check used to run after a fixed 3-second wait. Now the first check runs about half a second after sending, followed by quick re-checks.

The safety window that decides a transfer has failed was kept intact. Only the "it already landed, notice it sooner" path got faster. Funding and purchase together now take about 5 seconds, down from about 8.

3. Faster blockchain reads on the order path

The confirmation lookups now go through an indexed transaction API that answers in a few hundred milliseconds. The older history query sometimes took 10 seconds or failed outright. Reads that guard against sending the same payment twice deliberately stay on the slower, stricter path.

4. No idle time between back-to-back orders

When several orders arrive together, each one needs a free fulfilment account. Previously, an order that found every account busy waited for a scheduled re-check up to 30 seconds later, even if an account freed up two seconds afterwards. Now a finished order hands its account straight to the next waiting order. Your webhook is sent in the background and no longer holds that account while your server responds.

Why speed matters if you resell Stars

  • Fewer "where are my Stars?" tickets. When delivery takes 8 seconds, the customer is still looking at your confirmation screen when the Stars arrive.
  • Better conversion in Mini Apps and bots. A short, predictable wait keeps people in your flow. A 30-second gap on a phone feels like a failure.
  • Simpler product design. You can show "delivering…" for a few seconds instead of building email-style "we will notify you" flows.
  • Bursts don't punish anyone. A campaign or giveaway that triggers many purchases at once no longer creates a queue of idle waits.

Commercial terms for partners

MyStars FaaS is built so a solo developer can start with one order and a reseller can scale to thousands without renegotiating anything.

  • No deposit and no prepaid balance. Each order is paid by its own on-chain payment, so your money stays in your wallet until you place an order. More on that in the non-custodial section below.
  • No subscription and no setup fee. You pay per order and nothing else.
  • No minimum volume. There is no monthly commitment. The only limits come from Telegram itself: at least 50 Stars per Stars order, and Premium in 3-, 6- or 12-month plans.
  • Transparent price. You pay Fragment's own cost for the item plus a 5% markup.
  • Network-fee floor on small orders. Every order carries a minimum of 0.05 GRAM above Fragment's cost to cover blockchain network fees. At today's rates this floor only applies to orders below roughly 80 Stars. A smaller order never costs more in total than a bigger one.
  • Two payment currencies. Pay in GRAM (TON) or USDT on TON. USDT orders show the network fee as a separate line, so the breakdown is explicit.

Non-custodial by design: your money and your keys stay with you

Many wholesale Telegram Stars setups ask you to park money with the provider before you can sell anything. MyStars FaaS works the other way around, and for a small team this is often the deciding advantage.

  • We never hold your funds. There is no balance on our side to top up and nothing to withdraw later. Each order is its own on-chain payment, and if an order cannot be delivered, the refund goes back on-chain to the wallet that paid for it, which is yours.
  • We never hold your keys, and we never ask for your seed phrase. You pay each order from your own wallet. If you want it fully automated, our optional self-custody wallet SDK signs payments inside your own server process, and the signing key never reaches us.
  • No working capital required. Your customer pays you first, and you pay the order from that same money. The payment you just received is your liquidity, so you can launch with an empty wallet and grow without financing a prepaid float.
  • You control the money flow. Your retail price, your margin, your customer refunds and the wallet that holds your revenue all stay on your side. The SDK includes a helper that adds your own retail markup to our quote, calculated to the cent.

Who this is for

  • Telegram bot and Mini App builders who want to sell Stars or Premium alongside their own product.
  • Resellers and marketplaces that need wholesale fulfilment with predictable pricing and no capital locked in a prepaid balance.
  • Games, loyalty programs and communities that reward users with Stars or gift Premium.
  • Solo developers, indie hackers and vibe coders. You get a typed SDK, a full OpenAPI reference that AI coding tools read well, and a quickstart that fits on one screen.

If you are still comparing providers, our checklist on how to choose a Telegram Stars and Premium API covers custody, prepaid balances and webhooks in depth.

Start in three steps

  1. Get an API key. Open @my_stars_tg_bot and choose API access.
  2. Install an SDK. Run npm install @mystars-tg/faas-sdk for TypeScript or JavaScript, or pip install mystars-faas for Python. Any other language works over plain HTTPS.
  3. Quote, create, pay, track.
import { MyStarsClient } from "@mystars-tg/faas-sdk";

const client = MyStarsClient.production(process.env.MYSTARS_API_KEY!);

const quote = await client.getPricing({ type: "stars", quantity: 100, payment_currency: "ton" });
const order = await client.createOrder(
  { type: "stars", recipient: { username: "durov" }, quantity: 100, payment_currency: "ton" },
  { idempotencyKey: `order-${myOrderId}` },
);
// Pay order.payment.amount to order.payment.pay_to_address with order.payment.memo as the comment.
const finished = await client.waitForOrder(order.order_id, {
  onUpdate: (o) => console.log(o.status),
});

For the full flow, read our Fragment API guide for Telegram apps and bots. It covers webhook verification, the Python version and a working blueprint bot. The B2B overview of selling Telegram Stars via API walks through the order lifecycle and launch checklist. Every endpoint is documented in the API reference, and the product overview lives on the Telegram Stars API for developers page.

What's next

We keep measuring the new detection path, including busy periods with many simultaneous orders, and will refresh these numbers as they evolve. If you already integrate with MyStars FaaS, you don't need to do anything. The speedup is server-side, and your existing code gets it automatically.

Back to Blog