Telegram Stars for Developers: Accept Payments and Withdraw Earnings
Digital goods and services in a bot or Mini App must be sold for Stars: the invoice uses the XTR currency and an empty provider_token. The bot owner withdraws earned Stars through Fragment in Gram, but Stars may become available only after up to 21 days. The withdrawal minimum comes from Telegram's configuration: the docs list 1,000 Stars as the default, and the live value is shown in the bot's balance. For the audience that does not pay, ads through Platformy are a second source of income.
Your bot or Mini App has an audience, but only a few people pay in Stars. Most use it for free. The owner's job is twofold: set up Stars payments the way Telegram requires, so the app does not lose visibility, and earn from the users who never pay. Payments come first below: the rules, the XTR invoice, the two events your bot must answer and withdrawal through Fragment. Then comes the second source of income and how to connect it in Platformy.
Do I have to accept payments in Stars?
For digital goods and services, yes. The Bot Developer Terms (section 6.2) require every transaction in digital goods and services to go through Telegram Stars only. The same section gives the reason: the requirements of the app stores that distribute Telegram.
The consequences are described in two places. The payments documentation says that if you sell digital items for other currencies or through third-party providers, Telegram cannot show your bot or Mini App to mobile users. The terms (section 6.2) add that the owner gets a notice, and if the violation is not fixed, the app may be blocked for store versions of Telegram or removed from Telegram.
A third-party payment provider is for physical goods and services. For those, the provider_token field is filled in. For Stars it stays empty. What counts as a digital item is decided by Telegram under Apple and Google rules, and Telegram advises checking their documentation.
What are Stars and how much does a developer get?
Telegram's documentation describes Stars as virtual units that users spend on digital goods and services in bots and Mini Apps. They also pay for paid media and subscriptions.
What the developer terms say:
- a developer may receive a reward equivalent to 0.013 USD per Star (6.2.4);
- when paying for Telegram ads, one Star gives 0.02 USD of ad credit (6.2.3);
- Telegram sets both estimates itself and may change them (6.2.3, 6.2.4);
- Stars in your balance are not your property (6.2.2);
- Stars are valid for 3 years from receipt and are then written off (6.2.7).
The Telegram blog post of June 30, 2024 says the company takes practically no commission on Stars, so only taxes and payment-system fees remain. The payments documentation adds that final amounts differ by user because of VAT and other fees Telegram does not control. Taxes on your income are left to the developer (6.4).
How do I accept a payment in a bot, step by step?
- Create the bot in @BotFather.
- Send an invoice with
sendInvoice: setcurrencytoXTRand leaveprovider_tokenempty. - When Telegram sends a
pre_checkout_query, answer withanswerPreCheckoutQuerywithin 10 seconds, or the transaction is cancelled. If the order cannot be fulfilled, return a clear reason: Telegram shows it to the user. - Deliver the item only after the
successful_paymentupdate. Answering the pre-checkout query does not mean the payment went through. - Save the
telegram_payment_charge_idfromsuccessful_payment. You need it for refunds. - Set up the
/paysupportcommand and a way to handle requests: you are responsible for justified disputes.
Before launch, the documentation advises turning on two-step verification on the bot owner's account. It also asks for a /terms command or another simple way to reach the terms the user accepts before buying, and a clear support channel. Tell users that Telegram support cannot help with purchases in your bot. You can test payments for free in Telegram's test environment first.
Stars bring money only from people who are ready to pay. The rest of your audience can be monetized with ads, and you can connect them in a few minutes: Connect Platformy for free.
How do I accept Stars in a Mini App?
The Mini App calls Telegram.WebApp.openInvoice(url, callback) with an invoice link. The result arrives in the invoiceClosed event with the status paid, cancelled, failed or pending. With pending the payment is still being processed, and the bot receives a service message once it goes through.
The bot creates the invoice link with createInvoiceLink: for Stars it also takes XTR and an empty string instead of provider_token. Tie delivery to the server-side successful_payment, not to the paid status on the client side: the rule from step 4 applies here too.
How do I refund a payment?
The refundStarPayment method returns a successful Stars payment. It needs the user_id and the telegram_payment_charge_id, so store the payment identifier in your database next to the order.
Under the terms (6.2.1), a refund through the Bot API carries no penalty. If a refund is the outcome of a dispute, the amount is deducted from the app's balance. For unresolved justified disputes Telegram may restrict the app, up to a SCAM label and removal.
How do I withdraw Stars?
Only the owner of the bot or channel can start a withdrawal. What the documentation says:
- The balance must be at least the
stars_revenue_withdrawal_minvalue, and withdrawal must be enabled for this bot or channel. - The request is confirmed with the two-step verification password.
- Telegram returns a link to a Fragment page where you enter a TON wallet address.
- You cannot withdraw more than
stars_revenue_withdrawal_maxat once. To withdraw more, repeat the operation.
Telegram's server passes both parameters to the app in its configuration. The configuration reference lists defaults for them: a minimum of 1,000 Stars and a maximum of 25,000,000 Stars. These are fallback values in case the server did not send the parameter. The live values can differ, so check the threshold in the balance section of your bot.
The 2024 blog post called the reward for Stars Toncoin. The current documentation says Stars are withdrawn in Gram, while the address is still entered for a TON wallet.
When are Stars available?
The terms (6.2.4) say Stars may become available for rewards or ads not immediately but within up to 21 days after receipt. Plan your cash flow around this delay.
In the same place, Telegram reserves the right to temporarily hold or write off Stars because of refunds, suspected abuse or a violation of the terms.
Where else can I spend Stars?
You can direct Stars to Telegram Ads at a special price with a 30% discount. You cannot use them to advertise other people's projects: both the blog and the terms (6.2.3) say Stars work only for the bot or channel that earned them.
What about subscriptions in Stars?
Bots can offer subscriptions in Stars, and channels sell them through paid invite links. There is currently one allowed period: 30 days (2,592,000 seconds in the subscription_period field). A yearly or weekly plan cannot be set up through Stars.
More ways to earn: Mini App and bot.
How do the payment options compare?
| What you sell | How to accept payment | What Telegram's rules say |
|---|---|---|
| Digital good or service | Stars, currency XTR, empty provider_token |
Mandatory, section 6.2 of the Bot Developer Terms |
| Physical good or service | Third-party provider, provider_token filled in |
Telegram does not process these payments; disputes go to the provider (6.1) |
| Subscription to digital content | Stars, 30-day period | No other period is allowed at the moment |
What are the common mistakes?
- Delivering the item on the pre-checkout answer instead of
successful_payment. - Not saving
telegram_payment_charge_idand then being unable to issue a refund. - Answering
pre_checkout_queryafter more than 10 seconds. - Connecting cards for digital goods and risking the loss of mobile visibility.
- Not enabling two-step verification on the owner's account: without the password a withdrawal cannot be confirmed.
- Counting income at "0.013 USD each" and forgetting the delay of up to 21 days, taxes and fees.
- Having no
/paysupportand no purchase terms.
What can I not base my calculations on?
- The withdrawal minimum and ceiling. Only defaults are published; the live values come from the server.
- The availability period of a specific payment. The terms give only an upper limit of 21 days.
- Availability of withdrawal. Under the terms (6.2.4.1), Fragment may not pay out rewards to some users or in some countries, and Telegram is not responsible for that.
- The value of one Star. Telegram may change it.
- Taxes. They depend on your country, and Telegram does not describe them.
- The size of the income. Telegram publishes no estimates of what Stars can earn.
If your budget depends on these, check your bot's balance before you start selling: is withdrawal enabled, and what is the threshold?
What comes next once payments work?
Stars cover paid features and content. If your app has many users but few who want to pay, add a second source of income: ads. For an overview of formats and how to choose, see ads in Telegram Mini Apps and how to choose an ad network for a Mini App. For where to find users, read how to get your first users.
How do I do it in Platformy?
Platformy is a single cabinet for owners of Mini Apps, bots and channels. It covers the part where Stars do not work: users who do not pay.
- Income from ads. You turn on ad formats in your app: banner, full-screen ads, rewarded ads and a tasks wall (offerwall). Platformy pays for the ads shown in USD₮.
- Earnings on tasks. The tasks wall shows paid tasks from advertisers, and you earn on the ones your users complete. You can also become an advertiser yourself: order tasks or ads for your own app to bring users into it.
- Free user exchange. There is no commission. With one switch, your app shows offers from other apps and they show yours, which is cross-promotion, also known as traffic exchange. For each app, the cabinet shows how many people saw the offer, clicked and arrived. More in cross-promotion and traffic exchange between Mini Apps.
- Channels. A channel owner sells ad placements through the cabinet. For other ways to earn on channels, see how to monetize a Telegram channel.
- Analytics. Data on your audience and events sits in the same cabinet as your income.
Ads are reviewed before they are shown. Connecting is very fast and takes three actions: sign in with Telegram, copy one prompt from the cabinet and give it to your coding agent. It takes a few minutes, and connecting is free.
Platformy does not process Stars payments: they go directly through Telegram, as described above. Platformy works alongside them and earns from the audience that does not pay.
Sources
The terms and documentation pages do not show an update date.
- Bot Developer Terms, telegram.org/tos/bot-developers: sections 6.1, 6.2, 6.2.1 to 6.2.4, 6.2.4.1, 6.2.7, 6.4.
- Payments for digital goods, core.telegram.org/bots/payments-stars: XTR, 10 seconds,
successful_payment,/paysupport,/terms, two-step verification, test environment. - Telegram Stars, core.telegram.org/api/stars: description of Stars, withdrawal, Fragment, Gram, 30% discount.
- Client configuration, core.telegram.org/api/config: default values for
stars_revenue_withdrawal_minandstars_revenue_withdrawal_max. - Telegram blog, June 30, 2024: commission, Toncoin, ads for Stars.
- Subscriptions, core.telegram.org/api/subscriptions: 30-day period, paid invite links.
- Mini Apps, core.telegram.org/bots/webapps:
openInvoice,invoiceClosed. - Bot API, core.telegram.org/bots/api:
sendInvoice,createInvoiceLink,answerPreCheckoutQuery,refundStarPayment,subscription_period. - Platformy, platfor.my: features of the Platformy cabinet.
Frequently asked questions
Can I take cards or a third-party payment service instead of Stars for digital goods?
No. The Bot Developer Terms require transactions in digital goods and services to go through Telegram Stars only. The payments documentation says that otherwise Telegram cannot show the bot or Mini App to mobile users.
How do I withdraw earned Stars?
The bot owner starts the withdrawal. It needs the two-step verification password, and Telegram returns a link to Fragment where you enter a TON wallet address. The current documentation says Stars are withdrawn in Gram.
How long until Stars are available for withdrawal?
Telegram's terms say Stars may become available for rewards not immediately but within up to 21 days after they are received. The documentation does not give an exact period for a specific payment.
What is the minimum withdrawal?
It is set by the stars_revenue_withdrawal_min parameter, which Telegram's server passes to the app. The configuration reference lists 1,000 Stars as the default, but the live value can differ, so check it in your bot's balance.
How much money does a developer get per Star?
The terms say a developer may receive a reward equivalent to 0.013 USD per Star, and that this estimate can change. Taxes and payment-system fees are the developer's responsibility.
How does Platformy help if part of my users do not pay in Stars?
Platformy gives you a second source of income from the same audience. You turn on ad formats in your app and Platformy pays for the ads shown in USD₮. You can also earn on tasks and exchange users with other apps for free. Connecting is very fast: copy one prompt from the cabinet, give it to your coding agent, and it takes a few minutes.