All use cases
Telegram bots12 min readTelegram bot operators and crypto app builders

How to launch a Telegram bot payment flow from test mode to live mode

A Telegram payment bot should not go live the day the send button works. It needs a test-mode path, clear receipt messages, spending limits, and a launch checklist before real users send funds.

The product flow

A user opens the Telegram bot, chooses a paid action, receives a quote, pays in USDC, and gets access when the payment is confirmed. The bot should make that feel simple, but the backend must still handle state, retries, and receipts.

The safest launch path is to build the whole flow in test mode first. Use test API keys and devnet funds until the bot can quote, request payment, verify status, and recover from failures.

ROI for Telegram bot teams

Telegram bots often monetize through subscriptions, paid alerts, gated groups, or one-off reports. Card billing adds friction for global crypto-native users. Manual wallet payments add support work and reconciliation risk.

A stablecoin flow gives the bot a measurable revenue path: quote, pay, unlock, receipt. The ROI comes from replacing manual payment checks with an automated backend that can serve users at any hour.

Data model

type TelegramPaymentIntent = {
  telegramUserId: string;
  chatId: string;
  walletId: string;
  productCode: "premium_alert" | "research_report" | "group_access";
  amount: number;
  token: "USDC";
  paymentId?: string;
  status: "quoted" | "pending" | "confirmed" | "failed";
};

Create the bot wallet

Give the bot a wallet in test mode. If users pay into one shared bot wallet, your database must track each payment intent carefully. If each user receives a dedicated wallet, reconciliation is easier but wallet count grows faster.

const wallet = await fetch("https://api.viaclave.com/v1/wallets", {
  method: "POST",
  headers: {
    "Authorization": "Bearer vc_test_YOUR_KEY",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ label: "telegram-alert-bot" }),
}).then((res) => res.json());

Create the payment after the user accepts

Do not create payments for every menu view. Create the payment only after the user confirms the purchase. Store the payment ID and show a clear pending message in Telegram.

const payment = await fetch("https://api.viaclave.com/v1/payments/send", {
  method: "POST",
  headers: {
    "Authorization": "Bearer vc_test_YOUR_KEY",
    "Content-Type": "application/json",
    "Idempotency-Key": "telegram_1842_premium_alert_2026_05_06",
  },
  body: JSON.stringify({
    from_wallet_id: "wal_user_or_bot",
    to_wallet_id: "wal_platform",
    amount: 1000000,
    token: "USDC",
    memo: "Telegram premium alert",
  }),
}).then((res) => res.json());

Telegram messages that reduce support

  • Quote message: show price, token, and what the user receives.
  • Pending message: explain that the bot is waiting for payment confirmation.
  • Confirmed message: include receipt ID or payment ID.
  • Failed message: explain whether the user should retry or contact support.
  • Live-mode warning: make it obvious when real funds are being used.

Move from test mode to live mode

Do not change the product flow when you move to live mode. Change the API key, wallet funding, monitoring, and support process. The user should see the same bot behavior, only now it uses live keys and mainnet stablecoins.

  • Replace `vc_test_` keys with `vc_live_` keys.
  • Fund the live wallet with enough USDC for expected refunds or payouts.
  • Verify webhooks in production.
  • Add status and support links to Telegram messages.
  • Set tighter limits for the first production week.

Launch checklist

  • Every paid action has a product code and memo.
  • Every payment intent has an idempotency key.
  • Every confirmation unlocks one clear entitlement.
  • Every failure has a retry path.
  • Every admin can find the payment by Telegram user ID.

Build this workflow in test mode

Create a test API key, connect the MCP server, or call the REST API directly. Viaclave's test mode lets you try wallet creation and test stablecoin payments without real funds.