Digital Goods Invoicing, Bot API Webhooks, and Developer Monetization Payouts
Monetizing digital goods and subscriptions inside Telegram bots and Mini Apps previously required fragmented credit card merchant gateways or risky off-platform checkout redirects that violated mobile app store guidelines. Telegram Stars (⭐) introduces a compliant, frictionless digital payment currency built directly into Telegram's Bot API (currency: "XTR"). Consumers purchase Stars seamlessly via Apple In-App Purchases, Google Play In-App Billing, or discounted direct web checkouts via Fragment. For developers, accumulated Stars can be converted into Toncoin (TON) on the Fragment marketplace or reinvested into Telegram Ad campaigns with zero platform commission. Understanding Stars invoicing, webhook verification lifecycles, and developer monetization cash-outs is mandatory for any modern Telegram Web3 application builder.
App Store Compliance
100% compliant with Apple App Store and Google Play guidelines for digital goods, avoiding account or bot bans.
Native Bot API Invoicing
Create seamless one-tap checkout modals in chat using standard sendInvoice endpoints with currency: "XTR".
Fragment TON Payouts
Convert earned Stars directly into Toncoin cryptocurrency on Fragment, withdrawable to any non-custodial wallet.
0% Ad Credit Subsidies
Reinvest Stars directly into Telegram Ads with zero commission, effectively offsetting app store platform cuts.
1. Implementation Workflow: Integrating Telegram Stars Payments
Configure BotFather for Telegram Stars Invoicing
Message @BotFather → Select your bot → Bot Settings → Payments. Enable Telegram Stars as the designated payment provider. Note that no external Stripe or merchant API keys are needed!
Dispatch Invoice Payload via sendInvoice
Call the Telegram Bot API method sendInvoice with parameters: currency: "XTR", and define the price array: prices: [{"label": "VIP Pass", "amount": 100}]. 100 amount units corresponds exactly to 100 Stars.
Handle pre_checkout_query & successful_payment Webhooks
Your backend must respond to incoming pre_checkout_query within 10 seconds via answerPreCheckoutQuery(ok=True). Upon payment completion, Telegram dispatches successful_payment containing the Telegram charge ID for order fulfillment.
Execute Fragment Toncoin Withdrawal
Navigate to Fragment.com → Connect your bot owner account → View accumulated Stars balance. After the standard 21-day fraud protection holding period, initiate withdrawal to convert Stars into Toncoin directly to your wallet.
2. Interactive Simulator: Telegram Stars Invoice & Revenue Yield Calculator
3. Telegram Stars vs. External Payment Gateways
Evaluating Stars compliance and conversion mechanics against third-party processors:
4. Architectural Overview: Telegram Stars Webhook & Settlement Flow
5. Frequently Asked Questions (FAQ)
Can Telegram Stars be used to sell physical products like t-shirts or coffee?
How long does a developer have to wait before withdrawing Stars into Toncoin?
Can bot developers issue partial or full refunds in Stars?
refundStarPayment method. Developers pass the original user ID and telegram_payment_charge_id to immediately return Stars to the consumer's Telegram balance without incurring financial penalty fees.