Home / Telegram Bot Payment API
Telegram Bot Payment API
E8 Pay lets your Telegram bot, group or Mini App take USDT: your server creates an order with one signed API call, you send the returned link as a button, and one tap opens the E8 Wallet bot to pay.
It suits bot developers and teams selling goods or services inside Telegram.
To integrate, register as a collect merchant with API access, sign requests as the developer docs describe, and deliver after the collect.order_paid callback.
- The PIN is entered on the keypad in the chat
- USDT balance, USDC balance or online payment
- You always receive USDT
The payment flow inside Telegram
- The buyer orders in your bot and your server calls
POST /partner/v1/collect/orders. - Send the returned link as a button:
checkout_urlwith the checkout mode Telegram wallet only, otherwise the bot link is intelegram_checkout_url, likehttps://t.me/E8QB?start=cp_…. - One tap opens the E8 bot, which shows your logo, name, the amount and the order number; the buyer picks a method and enters the payment PIN on the keypad in that chat, without opening the Mini App.
- The money goes to the merchant balance (for online payments after on-chain confirmation) and
collect.order_paidis sent; deliver on that callback or when the order query sayspaid.
How buyers can pay
| Method | How |
|---|---|
| USDT balance | Tap Confirm payment and enter the payment PIN; TRC20 and ERC20 deposits go to the same balance |
| USDC · ERC20 balance | The bot first quotes how much USDC it takes; after confirming with the PIN, the USDC is converted to USDT at that quote and paid to you |
| Online payment USDT · TRC20 | When the balance is short, the bot shows this order's own TRON payment code and the buyer sends exactly the order amount |
| Online payment USDT · ERC20 | The bot shows this order's own Ethereum payment code; the buyer's wallet pays the gas in ETH, confirmed in about 15–20 minutes |
Online payment minimums: 1 USDT on TRC20, 100 USDT on ERC20; below that, ask the buyer to top up and confirm from the balance, which has no such limit.
Payment links and deep links
- Use the link exactly as returned; never build or change it. It has a value only while the order is
pending. - The same
external_refwith the same content returns the original order instead of a second one. - Pass
payer_telegram_idso that only that Telegram user can pay;expires_in_minutesis 5–1440, default 60. - For buyers without Telegram, the same order's
checkout_urlcan open the web checkout (checkout mode Web payment page + Telegram wallet, the default for new merchants).
Code: create an order and get the bot link
From the developer docs; call() is the signed request helper from Request signing.
# call() is the signed request helper from the signing section.
status, doc = call("POST", "/partner/v1/collect/orders", {
"external_ref": "ORDER-1001", # your own order number; repeating it returns the same order
"amount": "75.24", # USDT, at most 2 decimals
"title": "Order 1001",
"expires_in_minutes": 60,
"return_url": "https://api.shop.example/orders/ORDER-1001", # optional, same host as your callback URL
})
order = doc["data"]
pay_url = order["checkout_url"] # web payment page or E8 bot, per your checkout mode
bot_url = order.get("telegram_checkout_url") # only in the web / both modes
# Ship only after collect.order_paid, or when GET /partner/v1/collect/orders/{id} says "paid".Verify every callback before processing it: Callbacks and verification.
FAQ
Does the buyer have to open the Mini App to pay?
No. The payment link opens the E8 bot, and the buyer enters the payment PIN on the keypad in that chat, without opening the Mini App.
What if the buyer's balance is too low?
The bot offers Top up balance and Pay online: the buyer tops up and then confirms, or sends exactly the order amount in USDT (TRC20 / ERC20) to the payment code the bot shows for this order.
Can only one Telegram user pay an order?
Yes. Pass payer_telegram_id when ordering; then only that user can pay.
Which coin do I receive?
USDT, whether the buyer pays from a USDT balance, a USDC balance (converted to USDT at the quoted rate) or online.
Do old startapp links still work?
Query the order again and use the new checkout_url instead of a saved startapp link; older t.me/E8QBBOT links keep working (both usernames are the same bot).