Telegram invoice bot

Link a merchant API key and treasury in Telegram, then create hosted checkout invoices with /invoice and share the /pay URL (Binance / OKX steps included).

Setup

  1. Create a bot with @BotFather and copy the token.
  2. Set TELEGRAM_BOT_TOKEN; also set TELEGRAM_WEBHOOK_SECRET in production.
  3. Point the webhook to https://your-host/api/telegram/webhook with matching secret_token.
  4. Set PONTOON_PUBLIC_ORIGIN so replies include payUrl.
bash
curl "https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN/setWebhook"   -d "url=https://pontoon.dev/api/telegram/webhook"   -d "secret_token=$TELEGRAM_WEBHOOK_SECRET"

Commands

/link <apiKey> <treasury> [tron|bsc|ton]
/invoice <amountUsdt> [orderId] [chain]
/status
/unlink
The API key is verified on /link and never stored in plaintext. Link in a private chat, not a group.