🔥 Live offer: limited-time discount on the Pro plan Grab the deal
BotifyHost
Monetization

How to Accept UPI, Cards & Crypto Payments Inside Telegram Bots with Razorpay

Monetize your Telegram bot in India and worldwide. Step-by-step code to generate dynamic Razorpay payment links and auto-approve VIP members.

#UPI#Razorpay#Payments#Monetization

Telegram is one of the highest-converting platforms for selling digital subscriptions, premium courses, trading signals, and software tools. In India, enabling instant UPI payments (Google Pay, PhonePe, Paytm) increases conversion rates by up to 300%.

Generating Razorpay Payment Links in Python

import os
import razorpay
from telegram import Update, InlineKeyboardButton, InlineKeyboardMarkup
from telegram.ext import ApplicationBuilder, CommandHandler, ContextTypes

client = razorpay.Client(auth=(os.getenv("RAZORPAY_KEY_ID"), os.getenv("RAZORPAY_KEY_SECRET")))

async def buy_vip(update: Update, context: ContextTypes.DEFAULT_TYPE):
    user = update.effective_user
    
    # Create dynamic payment link
    payment_data = {
        "amount": 19900,  # 199.00 INR in paise
        "currency": "INR",
        "accept_partial": False,
        "description": "BotifyHost VIP Subscription (1 Month)",
        "customer": {
            "name": user.first_name,
            "email": f"user_{user.id}@botifyhost.app"
        },
        "notify": {"sms": False, "email": False},
        "reminder_enable": True,
        "notes": {"telegram_user_id": str(user.id)}
    }
    
    payment_link = client.payment_link.create(payment_data)
    link_url = payment_link["short_url"]
    
    keyboard = [[InlineKeyboardButton("💳 Pay ₹199 via UPI / Card", url=link_url)]]
    reply_markup = InlineKeyboardMarkup(keyboard)
    
    await update.message.reply_text(
        "Click below to complete your payment securely via UPI or Card. Once paid, you will instantly receive your VIP invite link!",
        reply_markup=reply_markup
    )

Automating Channel Invite Generation

Once your webhook receives confirmation that the payment status is paid, your bot can call Telegram's create_chat_invite_link API with member_limit=1 to deliver a one-time single-use link automatically!

Ready to put this into practice? Upload your bot to BotifyHost and it stays online 24/7. Try the full dashboard free for 3 days, or host 1 bot free from our Android app.
BotifyHost
Written by the BotifyHost Team

We run Telegram and Discord bots for a living, and write up the fixes we use every day. Questions about this guide? Ask us on Telegram.

Your bot, online
while you sleep.

Deploy free in under a minute. Upgrade only when you need more power.

Need Help? Chat on Telegram