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
- Create a bot with @BotFather and copy the token.
- Set
TELEGRAM_BOT_TOKEN; also setTELEGRAM_WEBHOOK_SECRETin production. - Point the webhook to
https://your-host/api/telegram/webhookwith matching secret_token. - Set
PONTOON_PUBLIC_ORIGINso 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.