E8 Wallet E8 Pay

Home / Developer docs / Orders and checkout

Orders and checkout

Create an order to get one payment link, checkout_url; the merchant's checkout mode decides whether it opens the web checkout or the Telegram wallet. This page covers the order API, checkout modes, the web checkout and Telegram wallet payments.

  • API host https://open.e8qianbao.com
  • Path prefix /partner/v1
  • Based on the API notes of 2026-11-29

Orders and the payment link

A collect merchant's purchases use orders only. Turn the returned checkout_url into a pay button: it opens the E8 web payment page or the E8 Wallet bot according to your checkout mode, so your order code is the same whether the customer is on your website, in Telegram or in an app.

Do not use the deposit address API to collect payments, and never show a chain address or draw a QR code in your own system: the order's address is shown by the E8 payment page or the bot.

POST /partner/v1/collect/orders · Scope collect

FieldRequiredDescription
external_refYesYour own order number, 1–64 characters of A-Z a-z 0-9 _ - : .. The same external_ref with the same content returns the original order (201 the first time, 200 after); different content returns EXTERNAL_REF_REUSED and leaves the original unchanged
amountYesThe order amount, always in USDT: a decimal string "75.24" or a JSON number 75.24, at most 2 decimals and at most 100000 per order. You do not, and cannot, choose a network when ordering
titleNoTitle; the order number when omitted
descriptionNoDescription
expires_in_minutesNoValidity in minutes, 5–1440, default 60
payer_telegram_idNoOnly this Telegram user may pay
return_urlNoAddress of the “Back to merchant” button on the web checkout page once paid or expired; rules under Web checkout
Python
# 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".

Response (excerpt)

JSON
{
  "success": true, "code": "OK", "message": "success",
  "data": {
    "id": "…", "external_ref": "ORDER-1001", "title": "Order 1001",
    "amount": "75.24", "currency": "USDT", "status": "pending",
    "checkout_url": "https://app.e8qianbao.com/pay/?t=…",
    "telegram_checkout_url": "https://t.me/E8QB?start=cp_…",
    "expires_at": "…", "return_url": "https://api.shop.example/orders/ORDER-1001"
  },
  "request_id": "…"
}
  • id is the order ID; query it with GET /partner/v1/collect/orders/{id}.
  • checkout_url is set only while status is pending and is null otherwise. With the checkout mode Telegram wallet only it is the bot link https://t.me/E8QB?start=cp_...; with the other two it is the web payment page https://app.e8qianbao.com/pay/?t=... and the bot link moves to telegram_checkout_url.
  • Use the returned link exactly as it is: never build it yourself and never change a character. Older t.me/E8QBBOT links keep working (both usernames are the same bot); for a saved startapp link, query the order again and use the new checkout_url.
  • The button can redirect the current page (for example a server-side 302 to this address) or open a new tab; the web payment page cannot be placed in an iframe.
HTML
<a href="CHECKOUT_URL_FROM_THE_API" target="_blank" rel="noopener noreferrer">E8 支付 / E8 Pay</a>

Checkout mode

Each collect merchant chooses what the payment link opens: when applying for API access (the Mini App's API access page, or step 3 of the application in the bot's Collect merchant center), and later in the Mini App under API access → Checkout mode. A change needs the payment PIN, the bot tells the merchant owner, and it applies at once to every unpaid order.

Checkout modecheckout_urltelegram_checkout_url“Pay with Telegram wallet” on the page
Web payment page + Telegram wallet (both, the default for new merchants)Web payment pageBot linkYes
Web payment page only (web)Web payment pageBot link (for your own use)No
Telegram wallet only (telegram, every merchant integrated before 2026-11-27)Bot link, exactly as beforeField not present—
  • GET /partner/v1/me returns checkout_mode: what the payment link actually opens right now (telegram while the platform temporarily cannot serve the page).
  • The platform can also turn on the web payment page for an individual merchant (even one that chose Telegram wallet only is then treated as web); this is rarely needed.
  • The web payment page accepts USDT only (TRC20 / ERC20); USDC can only be paid from a balance in the Telegram wallet.
  • With web you can still give telegram_checkout_url to buyers who have Telegram yourself (for example as a second “Pay with E8 Wallet” button). Whichever is used, the order becomes paid and is never paid twice.
  • After switching back to Telegram wallet only, a payment page a buyer already has open gives no new address and points to the bot instead; transfers to an address already shown are credited as usual.
  • Merchants integrated before 2026-11-27 get exactly the same responses and change no code; they switch in the Mini App when they want the web checkout.

Web checkout

For collect merchants whose site is not in Telegram, or whose buyers have no Telegram (E8 web payments). The order API, signing, keys and callbacks are exactly those of Telegram wallet payments; onboarding, API keys, the IP allowlist and the callback URL are still handled in E8 Wallet on Telegram.

Flow

  1. POST /partner/v1/collect/orders creates the order, optionally with return_url.
  2. Turn the returned checkout_url into an “E8 Pay” button that redirects the current page or opens a new tab. The link looks like https://app.e8qianbao.com/pay/?t=...; use it exactly as returned.
  3. The buyer opens it in any browser, with no login and no sign-up: the page shows your approved brand name, the amount, the order number and a countdown. Without an approved brand it shows “E8 Pay merchant”.
  4. The buyer picks a network: USDT · TRC20 (TRON), or USDT · ERC20 (Ethereum; only if your merchant has Ethereum collection and the amount is at least 100 USDT). With only one network available it is shown directly. The page gives this order's own address, a QR code (the address on TRC20; on ERC20 an EIP-681 transfer code with the amount, switchable to an address-only code for wallets that cannot read the amount) and Copy address / Copy amount, and reminds the buyer to send only USDT, only on the selected network, for exactly the amount.
  5. The buyer sends exactly the order amount from any wallet. The page refreshes the status every 5 seconds: awaiting payment → confirming on chain (ERC20 only: the transfer is seen and awaits finality) → paid; it shows expired when nothing arrived before the deadline.
  6. Once credited, collect.order_paid is sent as usual (payer_telegram_id is empty; merchants with Ethereum get paid_network and paid_asset). Ship only on the callback or paid from GET /partner/v1/collect/orders/{id}, never because the buyer came back to your site, return_url was opened or someone shows a screenshot.
  7. Once paid, the page shows a receipt (order number, amount, time received, network, transaction hash), plus Contact merchant (an https link or email you submit in the Mini App's API access page and the platform approves) and E8 support; the page still collects nothing about the buyer.
FieldOpensHow the buyer pays
checkout_urlThe E8 payment page in a browser (no Telegram)Only an on-chain USDT transfer from any wallet (TRC20 / ERC20)
telegram_checkout_urlThe E8 bot (Telegram), i.e. the checkout_url of the Telegram wallet only modeUSDT balance, USDC balance conversion, online payment

Crediting rules

  • The amount must match the order exactly; timeliness is judged by block time, so a transfer on chain before the deadline is on time.
  • TRC20 counts solidified blocks only, about 1 minute; ERC20 counts finalized blocks only, about 15–20 minutes.
  • Online payment minimums: 1 USDT on TRC20, 100 USDT on ERC20; below that the page does not offer the network.
  • A wrong amount, a wrong coin (for example USDC sent to the ERC20 address) or a transfer on chain after the deadline does not complete the order; the money goes to the merchant balance in the coin received, minus the fee, the merchant owner is notified, and you settle a refund or a new order with the buyer. The page tells the buyer the amount or time does not match the order.
  • The page has no “I have paid” button and nothing is confirmed by hand. The page and the bot's online payment show the same address for the same order.

return_url (optional)

  • Pass it with the order; once paid or expired, the page shows a “Back to merchant” button that leads there. Without it there is no such button.
  • It must be https:// on exactly the host of your approved callback URL (for example, with the callback https://api.shop.example/e8/hook only https://api.shop.example/... is allowed). For another host, ask the platform to verify it is your own site and register it; only exact hosts count, no subdomains. No user name or password, at most 500 characters. Otherwise RETURN_URL_NOT_ALLOWED (422).
  • It appears in order query results (absent when not passed). Changing return_url for the same external_ref returns EXTERNAL_REF_REUSED.
  • It only leads back and carries no payment result; the page sends no Referer, so the token never reaches your site.

Link lifetime

Once the order is no longer pending, order queries return checkout_url as null; do not send it to buyers any more. A page the buyer already opened still shows paid or expired for 24 hours after the order's deadline, then says the link has expired.

Security notes

  • The token is signed by the platform and bound to this one order and its deadline: it can only view this order and get its address, never charge, refund or change it. Changing any character breaks it.
  • The page shows only the approved brand name, the amount, the order number, the status and the address: no merchant code, no callback URL, no buyer details and no internal IDs.
  • The payment page is a page of the E8 Mini App and calls only the public endpoints the Mini App already uses; money is credited only after the on-chain transfer is confirmed.
  • The page's endpoints are rate limited per source address and per order (each address at most 60 views and 10 network choices a minute). Do not poll the payment page from your server; reconcile with callbacks and GET /partner/v1/collect/orders/{id}.
  • Treat the link like an order number: send it only to that order's buyer, never to a public group (anyone else could only see the amount and the address, and move no money).

Messages the buyer may see on the page

These are not responses of your API; the payment page shows them to the buyer:

Error codeHTTPMeaning
CHECKOUT_NOT_FOUND404The link is invalid or was changed
CHECKOUT_LINK_EXPIRED403More than 24 hours since the order's deadline; ask the buyer to order again on your site
CHECKOUT_UNAVAILABLE409The order is already paid or expired; no address is given
WEB_CHECKOUT_UNAVAILABLE409The merchant switched to Telegram wallet only, paused business or the API access was disabled
PAY_OPTION_UNAVAILABLE / AMOUNT_BELOW_ONLINE_MIN409This network is not available right now / the amount is below this network's minimum
RATE_LIMITED429Refreshing too often

This section matches Technical support · E8 web payments for merchants.

Telegram wallet payments

With the checkout mode Telegram wallet only, checkout_url opens the E8 bot; in the other two modes the bot link is in telegram_checkout_url, and with Web payment page + Telegram wallet the page also has a “Pay with Telegram wallet” button.

  1. One tap opens the E8 bot, which shows your logo, name, the amount and the order number.
  2. The buyer picks a payment method in the bot (table below) and enters the payment PIN on the keypad in that chat, without opening the Mini App.
  3. Once paid, the money goes to the merchant balance (for online payments after on-chain confirmation) and collect.order_paid is sent. However the buyer pays, you receive USDT.
Payment methodHow the buyer paysWhen it is offered
USDT balanceTap Confirm payment and enter the payment PIN. The USDT balance is network-free: TRC20 and ERC20 deposits go to the same balanceAlways
USDC · ERC20 (Ethereum) balanceThe bot first quotes how much USDC it takes; after confirming and entering the PIN, the USDC is converted to USDT at that quote and paid to youWhile the platform's USDC conversion is on and the buyer has a USDC balance
Online payment USDT · TRC20 (TRON)The bot shows this order's own TRON payment code (your logo in the middle) and the buyer sends exactly the order amountAlways when the balance is short
Online payment USDT · ERC20 (Ethereum)The bot shows this order's own Ethereum payment code (starting with 0x) and the buyer sends exactly the order amount; the buyer's own wallet pays the gas in ETH, confirmed in about 15–20 minutesWhen the balance is short and the platform's ERC20 collection is on

With too little balance, the bot offers Top up balance and Pay online. Topping up means the buyer funds their own wallet in the E8 bot and then confirms the payment. When both networks allow online payment, the buyer picks a network after tapping Pay online and then sees the code.

Rules for USDC balance payments

  • Before the PIN is entered, the screen states how much USDC is taken. The quote lives as long as an in-app swap quote (tens of seconds) and works once; if it expires or the price moves beyond the allowed range, the payment fails without charging and the buyer taps Quote again.
  • Conversion and payment happen in one step: either the USDC is taken and the order is paid, or neither happens. The USDT obtained is at least the order amount, with any remainder left in the buyer's USDT balance; you receive the same USDT as for a USDT balance payment (with the same collection fee).
  • While in-app swaps are paused (for example when USDC drifts from 1 dollar), closed or at their limit, the option is hidden or the payment fails, and the buyer can use another method.
  • USDC cannot be paid online: on-chain confirmation takes over ten minutes, and nobody carries the USDC/USDT price difference in the meantime. If a buyer still sends USDC to the ERC20 payment code, the order is not completed; the USDC goes to your merchant USDC balance minus the fee, the merchant owner is notified, and you settle a refund with the buyer.

Rules for online payments (same on TRC20 and ERC20)

  • The amount must match the order exactly. A wrong amount, a wrong coin, or a transfer whose block time is after the order's deadline does not complete the order; the money goes to the merchant balance in the same coin, minus the fee, the merchant owner is notified, and you settle a refund or a new order with the buyer.
  • Timeliness is judged by block time: on chain before the deadline is on time even if the platform confirms later. TRC20 counts solidified (irreversible) blocks only, about 1 minute; ERC20 counts finalized blocks only, about 15–20 minutes.
  • A transfer to an order that is already paid (a duplicate payment) also goes to the merchant balance and the merchant owner is notified; no further callback is sent. Each transfer is credited once, and an order is never paid twice.
  • Minimums: 1 USDT on TRC20; 100 USDT on ERC20 (each order's ERC20 address is used once, and for small amounts the on-chain cost of collecting it would exceed the fee). Below the minimum, online payment on that network is not offered; ask the buyer to top up and confirm from the balance, which has no such limit.

After a payment the merchant owner gets a Telegram notice; for balance payments the buyer gets one too (a USDC payment states how much USDC was taken and the conversion number), while online payments notify only the merchant. This is not escrow: once paid, the money is in the merchant balance with no “confirm receipt” step; for escrow use escrow checkouts.