Telegram Stars + Telegram Mini Apps + No-code = $$$! See how this works and how to get started.

The ultimate payment system is hereâTelegram Stars! A no-coderâs paradise, especially if you build stuff on Directual in the first place. Decentralized, accessible, and already widely used all over the world. Build it, rake in the cashâwhatâs not to like?
This article is there for the unfamiliar or the fence-sitters. See what Telegram Stars are, how they fit into Telegram Mini Apps, and how it all ties together with no-code.
Okay, letâs cut to the chase: hundreds of millions of users are messing around with bots and mini apps on Telegram every single month. Theyâre buying stuff, getting services, playing gamesâyou name it. Now, Telegram's latest update lets these bots and mini apps hawk digital goods and services too.
Itâs not new for businesses to sell physical stuff on Telegram through these bots and apps, but now they can push digital products as well. This means everything from e-books to online courses and game items can be sold directly on Telegram.
Telegram Starsâdigital cash you buy within the app, and now theyâre letting you pay for all these digital goods. You can grab these Stars through stuff like Apple, Google, or this PremiumBot thing, then blow them on whatever digital goodies you want.
These Stars go well with Apple and Google rules, so developers and users get easier access to in-app purchases right from their phones. Also, developers will soon be able to cash out their Stars for Toncoins via something called Fragment.
Try it out: @directual_stars_bot is where you can give some tips to the Directual team! Below, we'll unveil the details of how this bot operates on our platform.

Some more facts as to why itâs worthwhile to use Telegram Stars:
And hereâs the pricing:

Gently yoinked from the Telegram blog
All of this can be brought together with no-code on Directual. That's right, even if you canât code your way out of a paper bag, you can still build this stuff on Directual and get it running on Telegram. More reach, more sales, less hassle.
Telegram Bot Payments let sellers take payments for stuff directly from Telegram users, all for free.Â
Telegram Payments are designed right into the app, so you can trade digital goods and services for Telegram Stars, which you can turn into rewards later.
You set up a bot to sell digital goods and services. Your bot can pop invoices into chats, groups, or channels. If you've got inline mode, your bot can even send bills to other chats, like directly to someone else.
Invoices come with a photo, a description, and a big âPayâ button. Hitting that button opens a special payment screen right in the app.
Since itâs all digital, all transactions go through in Telegram Stars. Users buy these Stars through regular in-app purchases or via @PremiumBot, and then use them to buy your digital stuff.
The payment part is super smooth â no need for personal info like full names, addresses, or credit card numbers.
To get started taking payments, you need a Telegram bot. Create one using @BotFather if you haven't yet.
Basically, here's what you'll do:
Note: for digital stuff, you wonât need a provider_token. Thatâs just for physical goods.
You can mess around with payments in Telegram Stars using Telegramâs test environment. Make sure you pick the right parameters depending on what you're selling.
Switch âPay from Forwardsâ on or off when making invoices with @ShopBot to see the difference.
Pre-checkout: the user buys Stars if needed, then smacks the pay button. The Bot API then sends a pre_checkout_query Update to your bot. Your bot has to respond with answerPrecheckoutQuery within 10 seconds, or the dealâs off. You can throw in an error message if thereâs a snag.
Checkout: if the order and payment are good, the API sends a successful_payment message. Your bot should then deliver whatever the user bought.
Make sure you get that successful_payment update before you give out the goodsâjust replying to a pre_checkout_query isnât enough to seal the deal.
If the invoice was in a chat with @yourbotname, it shows up as a Receipt for the userâthey can check it anytime to see their transaction details. If it was sent to a different chat, the Pay button stays active, and itâs up to the merchant bot to decide if it'll take more payments.
Before you let your merchant bot loose, make sure to check off these points:
And thatâs the gist of it on the Telegram side. Now letâs talk Directual side!
Simple!
Assuming youâve already got a Telegram bot up and running, hereâs how to hook it up with Directual.
And thatâs pretty much it! For the bot part, anyways.Â
Use the Telegram step in âProfessional modeâ, call the method sendInvoice, specifying the details in the body: description, title, prices and currency = XTR (the code of Telegram Stars).


When a user pays, Telegram sends a specific request with pre_checkout_query parameter. We need to catch that request and response calling answerPreCheckoutQuery method, approving the transaction.



And that is it! Anyone can build the same on Directual. Moreover, the upcoming Telegram plugin update will make the process super-easy.
Also simple.
Here are the two ways you can tweak the TMA plugin settings:

Auto log in. Set to True: it logs users in automatically when they open TMA. Set to False: users have to hit "Log in with Telegram" to get in. Use False if you're letting users log in with other methods like email or Google.
Disable registration. True means users can't log in if there isnât a matching WebUser ID already. False automatically creates a WebUser ID when someone logs in.
If someoneâs registered with TMA and later tries to log in via a web browser, theyâll need a username/password. You can generate a one-time password and shoot it over via your Telegram bot.
If you havenât got a Telegram bot yet, kick things off in BotFather with the /newbot command. Once youâve got your bot, stick your Directual-based app onto it as a webapp using the /newapp command. Just follow what BotFather tells you.

Boom, youâre all set! When testing, remember the login kicks in automatically when the user hits the login page.
Want to learn more about Telegram Stars, Mini Apps, bots, and whatever else theyâre bringing out thatâs already integrated with Directual? Come and talk to us liveâthe links to our communities are provided below.
Cheers, happy building!