Telegram Bot

View as Markdown

Overview

BlockBee Bot adds crypto subscription payments to your Telegram channels and groups. Set pricing for different time periods; the bot handles everything else.

When a user subscribes, the bot generates a single-use invite link and adds them to your channel. When the subscription expires, the bot removes them automatically. No manual management required.

Setup

Before you can start using the BlockBee Telegram Bot, you need to configure your BlockBee account and create a Telegram bot.

1. Create a BlockBee Account

If you haven't already, sign up for a BlockBee account to get access to the dashboard.

2. Configure Addresses

Set up the cryptocurrency addresses where you want to receive payments at Addresses.

3. Configure Payment Settings

  1. Set Default Currency: Go to Payment Settings and configure your default FIAT currency (USD, EUR, GBP, etc.)
  2. Customize Payment Page: Optionally customize the appearance and branding of your payment pages

4. Generate API Key

  1. Navigate to the API Keys section in your dashboard
  2. Click "Generate New API Key"
  3. Copy the generated API key - you'll need this for the BlockBee Bot

How It Works

The BlockBee Telegram Bot integrates with your Telegram channels and groups to provide automated subscription management:

Payment Processing

  • In-Telegram Payments - Users can pay directly within Telegram using the bot interface
  • Payment Links - Users can also click payment links to complete payments on the BlockBee hosted checkout page
  • Multiple Cryptocurrencies - Supports all cryptocurrencies configured in your BlockBee account

User Management

  • Exclusive Invitation Links - Each subscriber gets a unique, one-time-use invitation link
  • Automatic Access Control - Only subscribed users can join your channel/group
  • Subscription Expiration - Users are automatically removed when their subscription expires
  • Renewal Notifications - The bot sends notifications when subscriptions are nearing expiration, allowing users to renew
  • Renewal Handling - Seamless renewal process for existing subscribers

Subscription Options

  • Flexible Pricing - Set different prices for various time periods (daily, weekly, monthly, etc.)
  • Multiple Tiers - Create different subscription levels with different access rights
  • Automatic Billing - Handle recurring payments and subscription renewals
  • Coupon System - Offer free subscriptions or discounts using coupon codes for promotional campaigns

Create Your Telegram Bot

To create your own bot, you will need to use the BotFather.

Step-by-Step Instructions

  1. Access BotFather - Click here to access the BotFather
  2. Start Conversation - Type /start to initiate the conversation
  3. Create New Bot - Type /newbot to start the process of creating a new bot
  4. Choose Bot Name - The BotFather will prompt you to choose a name for your bot. Remember that the bot's name must end with the word "bot" (e.g., TestBot or MyAwesomeBot)
  5. Get Bot Token - After providing a suitable name, the BotFather will generate a bot token for you. This token is essential for accessing and controlling your bot's functionalities
Figure 1: Creating a new bot with BotFather

Create Project in BlockBee Bot

Step 1: Access BlockBee Bot

To start using BlockBee Bot you must access it and then use the /start command (in some platforms, Telegram makes the Start as a button on the bottom).

Step 2: Create New Project

Then you must click the button "Create new project".

Figure 2: Starting BlockBee Bot with /start command

Step 3: Insert Bot Token

BlockBee Bot will then prompt you to insert your Telegram Bot token and then hit "send".

Figure 3: Creating a new project in BlockBee Bot

If the token inserted is valid, the bot will reply with a success message.

Figure 4: Inserting your Telegram bot token

Configure Your Project

Step 1: Add Bot as Administrator

Add your bot as an administrator to your Telegram Channel before continuing. The steps below will not work until the bot has admin permissions.

Step 2: Manage Projects

Send the /start command again and click Manage projects. Select your bot's name from the list. If it doesn't appear, reconfigure your Telegram Bot from step 1.

Figure 6: Adding your bot as an administrator to your channel

Step 3: Select Channel

Select the Telegram Channel you want to manage. The bot must already be an administrator in that channel.

Figure 7: Managing your projects in BlockBee Bot

Step 4: Configure Subscriptions

After selecting your Telegram Channel, the management options will be displayed. To begin, you will need to set up the subscription price for the desired time periods. You can do this by clicking on the "Subscriptions" button.

Figure 8: Selecting your Telegram channel to manage

Step 5: Set Pricing

Once you click the "Subscriptions" button, a list of options for different time periods will be displayed. Here, you can set up the subscription price for the desired time period that you wish to accept.

Figure 9: Accessing subscription configuration

Step 6: Enter Amount

Upon clicking one of the available options, the BlockBee Bot will prompt you to enter the amount you want to charge in FIAT currency to your customers. BlockBee uses this amount to generate a payment address in the cryptocurrency your customer selects.

Step 7: Activate Bot

Finally, you will need to select the "Activate BlockBee_bot in this group" option to activate the bot in the channel you have chosen.

Testing Your Telegram Bot

Test your Telegram Bot setup using real cryptocurrency with minimal cost.

1. Use Litecoin for Testing

We recommend using Litecoin (LTC) for testing because:

  • Low transaction fees (typically under $0.01)
  • Fast confirmation times (2.5 minutes average)
  • Real blockchain testing without high costs

2. Test with a Small Amount

  • Create a subscription for a small value (e.g., $2.00)
  • Complete the payment using Litecoin
  • This covers all fees with minimal cost (typically under $0.10)
  • Test both pending and confirmed payment states

3. Testing Checklist

  • ✅ Telegram bot creation works
  • ✅ BlockBee Bot project creation works
  • ✅ Bot token and API key configuration works
  • ✅ Channel/group selection works
  • ✅ Subscription pricing setup works
  • ✅ Bot activation in channel works
  • ✅ Payment processing works (in-Telegram and payment links)
  • ✅ User invitation link generation works
  • ✅ Automatic user removal on expiration works
  • ✅ Renewal notifications work correctly
  • ✅ Coupon system functions properly

4. Test User Flow

  • Test the complete user journey from subscription to channel access
  • Verify that invitation links work correctly
  • Test subscription expiration and automatic removal
  • Test renewal process for existing subscribers