Gem: Telegram How To

Selling digital goods and services for Stars

What it is

Anything digital a bot or Mini App sells, from an e-book to a game item, must be priced in Stars (currency XTR). Apple and Google rules demand it, even if you also sell on your own site; otherwise Telegram can't show your bot to mobile users. Crypto is out too; physical goods can use regular payment providers. Of $1.99 paid for 100 Stars, the developer gets $1.30.

How to do it

  1. Create a bot in @BotFather.
  2. Send an invoice with sendInvoice (currency XTR, empty provider_token) or a link from createInvoiceLink.
  3. When the buyer taps Pay, answer pre_checkout_query with answerPreCheckoutQuery… When the buyer taps Pay, answer pre_checkout_query with answerPreCheckoutQuery within 10 seconds, or the payment is cancelled.
  4. Deliver only after the successful_payment update, and save its telegram_payment_charge_id for refunds.
  5. Add /terms and /paysupport. Buyers must accept your terms before paying.
  6. Test in Telegram's test environment, then go live.
  7. Track earnings: bot profile › Edit › Balance on iOS and Android; Bot Info › ⋮ › Manage Bot › Balance on Desktop.

Watch out

With Gem

Gem sells for you: /myprojects → Sell → + New offer, in words («Supporter for 1 Star: a badge and a thank-you»). Gem reviews the offer before it sells, the buyer pays in your project's Mini App, gets the badge and thanks once, and you hear about each sale in @gembot.

Sources

Open in Telegram ↗