← All Integrations
✈️Telegram Bot

Crypto payments inside your Telegram bot

Let users pay for memberships, digital goods, or services directly inside your Telegram bot. Generate unique payment addresses on demand and confirm payments automatically via webhook.

Get API Key Free →Full API Docs
45 min
Setup time
Any lang
Bot framework
Webhook
Confirmation method
Instant
Payment notification
1%
Fee per payment

What people build with this

🔒

Private channel access

Sell subscriptions to private Telegram channels. User pays → bot verifies → user is added to the channel automatically.

🎮

In-game purchases

Telegram-based games that accept crypto for in-game currency, lives, upgrades, or premium features.

📦

Digital goods delivery

Sell files, keys, codes, or any digital item. Payment confirms → bot delivers the content to the user.

📣

Paid promotions

Channel owners sell shoutouts, pinned posts, or advertisement slots directly through a bot.

🎲

Prediction markets & bets

Accept crypto wagers in Telegram bots for sports predictions, trivia, or other bet-based games.

💼

Freelance & services

Freelancers using Telegram as their primary communication channel. Accept payment without leaving the chat.

Integration guide

01

Create a Telegram bot

Message @BotFather on Telegram and use /newbot to create your bot. Note the bot token — you'll need it in your bot code. The Bekena integration is added to your existing bot logic.

02

Get Bekena API key

Sign up at app.bekena.com. Create a live API key under Settings → API Keys. Set your payout wallet address under Settings → Payout.

03

Create a payment invoice

When a user wants to pay, call POST /v1/invoices with the amount, currency, and a metadata field containing the Telegram user ID. Save the returned invoice ID.

04

Send payment address to user

Extract the payment address and amount from the invoice response. Send the user a Telegram message with the address and exact crypto amount. Include a QR code URL for convenience.

05

Receive webhook on confirmation

Set up a webhook endpoint (any HTTP server: Node.js, Python, PHP, etc.) and register it in the Bekena dashboard. When the payment confirms, Bekena sends a POST to your endpoint with invoice details including your metadata.

06

Fulfill the order

In your webhook handler, extract the Telegram user ID from metadata, verify the payment status is "confirmed", then use the Telegram Bot API to send the user their content, access link, or confirmation.

Code example (Node.js)

The core of a Telegram bot that creates invoices and fulfills orders on payment confirmation.

telegram-bot.js
// When user sends /buy command bot.command('buy', async (ctx) => { const invoice = await bekena.invoices.create({ amount: 10, currency: 'USDT_TRC20', metadata: { telegram_user_id: ctx.from.id } }); await ctx.reply( `Send ${invoice.amount} USDT to: ${invoice.payment_address}` ); }); // Webhook handler — fires on payment.confirmed app.post('/webhook', async (req, res) => { const { status, metadata } = req.body; if (status === 'confirmed') { await bot.telegram.sendMessage( metadata.telegram_user_id, '✅ Payment confirmed! Access: t.me/joinchat/...' ); } res.sendStatus(200); });

Common questions

Do I need a server to receive webhooks?

Yes. You need any HTTP endpoint that can receive POST requests. This can be a VPS, serverless function (AWS Lambda, Cloudflare Workers), or a tunneled local server for development (ngrok).

Can I add a Telegram bot payment to an existing bot?

Yes. The Bekena integration is just API calls and webhook handling. You add the invoice creation logic to your existing bot command handlers and add a webhook route to your existing server.

How do I handle the case where a user pays after the invoice expires?

Bekena detects late payments and sends a webhook with status: "late_payment". Handle this case in your webhook handler — you can either still fulfill the order or refund the user.

Can my bot accept multiple currencies?

Yes. Create separate /pay_usdt and /pay_btc commands, or show the user an inline keyboard to select their preferred coin before creating the invoice.

Build your payment bot today

Free sandbox. 1% live fee. Full API docs.

Get API Key →API Reference