Skip to content

How to Set Up a Telegram Stars Payment Bot ​

Quick Summary (TL;DR):

  • Goal: Sell digital access (e.g., premium links, PDF downloads, private channel access) using Telegram Stars (XTR).
  • Time to set up: ~5 minutes.
  • Key Node needed: Payment Node (with currency set to XTR).
  • Ready Template: ⚡ Import the Paid Access Solution Template

The Challenge: Why selling access in Telegram is hard with custom code ​

If you wanted to build a Telegram Stars payment bot using custom code (like Python's aiogram or Node.js gramY), you would have to:

  1. Register invoices manually via the Telegram Bot API using the XTR currency code.
  2. Set up an asynchronous listener for pre_checkout_query requests and approve them within a strict 10-second window.
  3. Manage database records to associate the payment with a specific Telegram User ID.
  4. Set up file delivery or generate temporary private channel invite links upon payment success.

Using TeleGo.io, you can achieve all of this visually. The visual scenario builder handles invoice delivery, transaction validation, and automatic user tagging out of the box.

Step-by-Step Implementation Flow ​

Here is the logic we will construct: User Clicks Buy ➔ Bot Sends Invoice (Stars) ➔ Payment Confirmed ➔ Bot Delivers Access Link

If you haven't connected your bot yet:

  1. Open Telegram and search for @BotFather.
  2. Send the /newbot command, choose a name, and copy the HTTP API Token.
  3. Open your TeleGo.io Dashboard, go to Bots, click Add New Bot, and paste the token.

Step 2: Create a Product in TeleGo ​

Before building the scenario, define what you're selling:

  1. Go to Workspace Settings → Integrations → Payments → enable Telegram Stars → Save.
  2. Go to Workspace Settings → Products & Payments → click Create Product.
  3. Choose Telegram Stars (XTR) as the provider.
  4. Fill in:
    • Name: e.g., "Premium E-Book Access"
    • Description: shown to users at checkout
    • Price (Stars): e.g., 50 (≈ $0.02 per Star)
  5. Click Save.

Step 3: Add the Payment Card to Your Scenario ​

In TeleGo, payments happen inside a Message Node using the payment card type — there is no separate Payment Node:

  1. Open your scenario canvas and add a Message Node.
  2. Set the card type to payment.
  3. Select the product you created in Step 2.
  4. Connect the button's next link (fires after successful payment) to an Actions Node:
    • Action: tag.add → e.g., paid_premium
  5. Connect the Actions Node to a Message Node that delivers the content:

    "Thank you! Here is your invite link: https://t.me/+example-invite-link"

No failure branch needed

If the user cancels or doesn't have enough Stars, the payment sheet closes and the user stays on the same message — they can try again by clicking the button. The next link only fires on successful payment.

⚡ The Fast Track: Deploy in 1 Click ​

You don't need to configure these connections manually. You can load our pre-configured Paid Access template.

  1. Go to the TeleGo Template Gallery.
  2. Install the "Paid Access" template.
  3. Replace the placeholder invite link/file with your own, and click Publish. Your bot is ready to collect Stars immediately!

Frequently Asked Questions (FAQ) ​

Q: Does TeleGo charge a fee on Telegram Stars transactions? ​

A: No, TeleGo does not take a percentage cut of your Stars. Standard Telegram/Apple/Google processing fees apply (typically 30% cut taken by Telegram/App Stores, though Stars can be spent on ads or withdrawn via Fragment with lower fees).

Q: Can I use Stripe or PayPal instead of Stars? ​

A: Yes. If you are selling physical goods or in-person services, such as sessions at your studio, you can connect your Stripe account under Workspace Settings ➔ Integrations ➔ Payments and select Stripe (USD/EUR) inside the Payment Node instead of Telegram Stars.

(Note: Under Apple and Google App Store policies, digital goods delivered inside a Telegram bot must use Telegram Stars to comply with in-app purchase terms).

TeleGo.io Docs