E8 Wallet E8 Pay

Home / Developer docs

Developer docs · E8 Pay integration

Everything needed to integrate the E8 Pay merchant payment API: signing, orders, the payment link, the web checkout page, Telegram wallet payments, callback verification, reconciliation, payouts and refunds. Kept in step with the platform's API notes; what the API actually returns is authoritative.

  • API host https://open.e8qianbao.com
  • Path prefix /partner/v1
  • TRC20 (TRON mainnet) · ERC20 (Ethereum mainnet)
  • No sandbox: local mock server → test callbacks → small real orders
  • Whether the API and deposits are working: service status
  • Based on the API notes of 2026-11-29

Overview and the two integration types

E8 Pay is the merchant payment platform of E8 Wallet. Your server calls the merchant payment API with signed requests: the API host is https://open.e8qianbao.com and every path starts with /partner/v1. The networks are TRC20 (TRON mainnet, USDT contract TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t) and ERC20 (Ethereum mainnet, chain_id 1).

  • The merchant always receives USDT. Buyers can pay with a USDT balance, a USDC balance (converted to USDT at a quote) or by sending USDT online (TRC20 / ERC20).
  • ERC20 is open to every collect merchant since 2026-11-22: on by default, with no application, no new keys and no code changes; merchants already integrated do not integrate again.
  • Collect merchants whose site is not in Telegram, or whose buyers have no Telegram, use the web checkout: with the checkout mode Web payment page or Web payment page + Telegram wallet, checkout_url is the E8 web payment page; see Web checkout.
  • This API does not accept ETH (Ethereum's native coin), TON, or USDT on the TON network. The TON features of the user wallet have nothing to do with this API.

Two integration types

TypeForScopes
Escrow merchant (escrow)Goods and services: the buyer's money is held in platform escrow and settled to the merchant once receipt is confirmedorders:read, orders:write, webhooks:test
Collect merchant (collect)Collection for business platforms: an order opens the web checkout page or the E8 bot, per the checkout mode; also deposit addresses for players, payouts and chain payoutscollect, webhooks:test

Response envelope

Every response has the same outer shape, with the business data in data. Send the request_id to platform support when you report a problem.

JSON
{"success": true, "code": "OK", "message": "success", "data": {"…": "…"}, "request_id": "…"}
{"success": false, "code": "NETWORK_NOT_ENABLED", "message": "This network is not enabled for this merchant", "data": null, "request_id": "…"}

Ignore unknown fields when parsing JSON: query results and callbacks may carry extra optional fields (for example paid_network, paid_asset, network, chain_id).

Keys belong on your server only. An escrow checkout cannot be paid on the buyer's behalf; the buyer must enter their own payment PIN. A collect merchant's payouts and chain payouts spend only that merchant's own balance: when it is short they fail, and platform funds and bonds are never used.

A shorter integration summary is on the technical support page.

Quick start

From applying to the first real payment in 5 steps. The first 4 move no real money.

  1. Apply: open E8 Wallet in Telegram and register as a collect merchant; once approved, apply for API access in the Mini App under Merchant center → API access: scopes, server egress IPs, callback URL and checkout mode, see Account and keys.
  2. Keys: once the platform approves, create a key in API access (payment PIN; the Key ID and Secret are shown once), then generate the callback signature key (Webhook Secret), and keep both in your server's secret store.
  3. Local integration: download the developer kit and run its examples against the local mock server e8_mock.py (127.0.0.1:8787): signing, orders, payment, expiry, player deposits, refund requests and callback verification. The mock runs on your own computer with the same signing algorithm as the real API; it never contacts the platform and moves no real money.
  4. Test callbacks: check your signature with GET /partner/v1/me, then send test callbacks by event type to your real callback URL with POST /partner/v1/webhooks/test, and confirm you verify, deduplicate, and never credit an event whose test is true; see Test callbacks.
  5. First real order: create a small order with POST /partner/v1/collect/orders, open checkout_url and pay it yourself; ship only after collect.order_paid arrives and the order query shows paid. Go live after working through the go-live checklist.

Read by topic

The full integration guide is split into the topic pages below. Links to the old sections of this page lead to the matching topic page.

Request signing

Every request is signed with HMAC-SHA256 using your Secret. This page has the string to sign, test vectors, curl / Python / Node.js / PHP samples, the order of the server's checks and common signing errors.

Accounts and keys

Onboarding, review, keys, the IP allowlist, callbacks and the checkout mode are all handled in E8 Wallet on Telegram (the @E8QB bot and the Mini App).

  1. Open E8 Wallet in Telegram and apply: collect merchants under Profile → Open payment merchant or on the Mini App's Collect merchant page, escrow merchants under Merchant center. Escrow merchants open after approval and paying the bond shown on the page; collect merchants pay no bond and can integrate as soon as they are approved.
  2. Apply in the Mini App's API access page: the scopes; the outbound IP allowlist of your servers (required), IPv4 ranges up to /24 and IPv6 up to /48 (larger existing ranges are kept when you save but cannot be added), requests from other addresses get 403; the callback URL (public HTTPS, no private addresses, redirects are not followed); the purpose and the collection brand (name, logo). Collect merchants also choose a checkout mode; when applying in the bot's Collect merchant center, it is the three buttons of step 3.
  3. The platform reviews the request and may narrow the scopes or set the rate limit.
  4. Once approved, create a key in the Mini App with your payment PIN. The Key ID and Secret are shown only once; the platform keeps no plaintext, so a lost secret means disabling the key and creating a new one.
  5. In the Mini App tap Generate callback key (also with the payment PIN) to get the Webhook Secret, shown once as well; then tap Send callback test to make sure you receive and verify it. The callback secret is only generated and shown in the Mini App, never in the bot and not rotatable there, so it never stays in a chat history.
  6. Later changes to the IP allowlist or the callback URL also need the payment PIN: in the Mini App's API access page, or for collect merchants also in the bot's Collect merchant center. A new callback URL is reviewed again, and callbacks keep going to the old URL until it is approved. The bot tells the merchant about every change.
  7. Collect merchants change their checkout mode later in the Mini App's API access page as well, with the payment PIN, and are notified.
  8. To use API payouts or chain payouts, the owner also turns on API payouts separately in the Mini App's API access page (with the payment PIN). It is off by default; the collect scope alone cannot pay out.

Keys

ItemRule
Key IDtek_ followed by 24 lowercase hex characters, sent in the X-TE-Key header
SecretOnly used to compute request signatures; never appears in a request, a URL or a log; shown once
Webhook SecretThe callback secret, used to verify callbacks from the platform; only generated and shown in the Mini App
ValidityKeys created since 2026-11-29 last 1 year, keys that can pay out (the whole of collect) at most 90 days; reminders come in Telegram 30 and 7 days before, and an expired key gets API_KEY_EXPIRED. Keys created before 2026-11-29 do not expire. A key you disable (or the platform disables in a security incident) stops working at once
Active at onceUp to 2 active keys per client for rotation without downtime: create a new key → switch your servers → disable the old key. Rotate before the key expires

Developer accounts

One technical team can integrate several collect merchants, so merchants no longer pass keys to developers through chats. Each merchant grants access separately and gets its own keys: one key works for one merchant only, there is no master key, and the merchant can revoke at any time. Escrow merchants are not open to developers yet.

How it works

  1. Register: with your own Telegram account (in good standing, with a payment PIN set), register in the Mini App under Developer center: team name, contact, website, description, expected number of merchants, server egress IPs and an optional default callback URL.
  2. Platform review: staff review every application; once approved you get a developer code such as E8-DEV-000001 and the bot tells you. At first you can work for up to 20 merchants at a time (open invitations included); the platform can change it. A developer account holds and pays no money and is separate from your own wallet and merchant roles.
  3. Invite a merchant: in the Developer center, enter the merchant code (E8-M-…), pick the abilities and state the purpose. The invitation goes to the merchant owner's bot chat, and you get an invitation link shown once that only the invited merchant's owner can open; it lapses after 7 days without an answer.
  4. The merchant accepts: the merchant's owner checks your team name, code, the platform-verified mark, the abilities, your server IPs and callback URL, then accepts with the payment PIN; it takes effect at once, and the owner may accept only some of the abilities. A merchant works with one developer at a time. If the merchant has no API access yet, you can draft its application; once the owner confirms it with the payment PIN it goes to platform review.
  5. Create keys: in the Developer center, create keys per merchant (with your own payment PIN). Key IDs start with tdk_, the Secret is shown once, at most 2 active keys per merchant, and the merchant is notified and can see and revoke them. Signing works exactly as with the merchant's own keys, see Request signing.

Abilities

AbilityWhat it allows
collectAll collect features (the three below)
collect:ordersCreate, query and close wallet bills early
collect:addressesPlayer deposit addresses and their deposits
collect:readBalance, payout and chain payout queries, unmatched receipts, statements, merchant wallet ledger, refunds
collect:refundFile refund requests: no money moves, each needs the merchant owner's payment PIN, and the merchant must turn on API refunds; no payout permission needed
webhooks:testCallback tests and resending callbacks

What a key can do = the key's own scopes ∩ the merchant's API access ∩ the abilities the merchant granted you; the abilities do not include payouts, which need the separate payout permission (see Payout permission below). With a developer key, GET /partner/v1/me also returns developer_code, grant_scopes and grant_payout. You never see the merchant owner's personal wallet and cannot change the merchant's checkout mode, API payout switch or limits.

Server IPs and rate limits

  • Your keys accept only your server IPs as confirmed when the merchant accepted, not the merchant's own allowlist; the merchant's own keys do not accept your IPs either (IP_NOT_ALLOWED).
  • Change IPs in the Developer center (payment PIN). Removing IPs applies to every merchant at once. Added IPs apply after the merchant's owner confirms where you may pay out (or asked to), and elsewhere automatically after 24 hours unless the merchant vetoes meanwhile. Old IPs keep working until then; switch servers only after the change applies.
  • For 24 hours after changing the payment PIN, or 72 hours after a reset, you cannot create keys or add server IPs (WITHDRAW_PIN_HOLD / PIN_RESET_HOLD).
  • Rate limits: before signature checks, your registered server IPs use the developer's own allowance (3000 per minute by default) while other IPs stay at 300; each merchant's own per-minute limit still applies, and all your keys together have a per-minute cap (600 by default). Over the limit you get 429 RATE_LIMITED.

Callbacks

  • Every callback carries X-TE-Client (the API client code, such as E8-API-000123) and X-TE-Merchant (the merchant code, such as E8-M-000123). Look up that merchant's callback signature key by X-TE-Client, verify, then process, and deduplicate by X-TE-Event-Id. The signature and the body are unchanged, see Callbacks and verification.
  • A merchant's API access has one callback URL and one callback signature key. In the Developer center you ask to point a merchant's callback to your URL (payment PIN); staff review each merchant, and callbacks keep going to the old URL until then. When you create the callback signature key (payment PIN, shown once), the old key on the merchant's servers stops working. The merchant is notified each time. The URL receives and the key signs every type of callback, so you can change either only when the merchant granted you the whole of collect (orders, addresses and reads); otherwise you get 403 GRANT_NOT_ACTIVE (when you change the URL for all your merchants, that merchant is skipped and listed in skipped) and the merchant changes it in the Mini App.
  • If the checkout page's Back to merchant host differs from the approved callback host, you or the merchant register it in the Mini App, and return_url can use it once staff approve. You can also submit the payment brand; it shows at checkout only after review.
  • Callback deliveries in the Developer center list only the events of the abilities the merchant granted (and its API access allows): collect:orders for orders, collect:addresses for credited deposits, collect:read for payouts and chain payouts, collect:refund for refunds and webhooks:test for the connectivity test; with none of them you get 403 GRANT_NOT_ACTIVE. Resending a callback from the Developer center needs webhooks:test and works only for the types you can see; resending through the partner API with your key (POST /partner/v1/webhooks/events/{event_id}/resend) is limited to the same types.

Payout permission

  • Payouts are off by default: wallet payouts, chain payouts, their review and the payout mode return 403 DEVELOPER_PAYOUT_NOT_GRANTED with a developer key.
  • Paying out takes two confirmations: the merchant's owner turns on Allow the developer to pay out in the Mini App (after reading the risk notice, with the payment PIN), then the platform approves. After that the merchant's own API payouts must still be on, within the merchant's 24-hour limit and automatic / per-payout review mode, and the merchant is told of every payout.
  • There is also a 24-hour cap over all your merchants together (EB and USDC count as USDT), shown in the Developer center; above it you get 409 DEVELOPER_PAYOUT_LIMIT, and nothing is created or debited. The platform can change it.
  • Wallet payouts go only to recipients the merchant confirmed: a developer key pays only E8 accounts the merchant owner confirmed with the payment PIN in the Mini App (API access → Developers → Developer payout recipients); any other account returns 403 DEVELOPER_RECIPIENT_NOT_CONFIRMED, and your own E8 account and the owners of your other merchants never (403 DEVELOPER_RECIPIENT_NOT_ALLOWED). Chain payouts are not limited by this list.
  • You review only the chain payouts you made: chain payouts the merchant's own system asked for are the merchant's to review, and approve / reject with your key returns 403 NOT_DEVELOPER_PAYOUT; when one of yours is approved, the merchant's limit and your combined limit are checked again at that moment, also when the merchant approves it with its own key (over your combined limit: 409 DEVELOPER_PAYOUT_LIMIT).
  • The merchant, you or the platform can turn it off at any time, without the payment PIN.

Revoking and suspension

  • When the merchant revokes, you leave the merchant, or the platform ends the grant, every key you made for that merchant stops at once and the next request returns API_KEY_REVOKED. The merchant's own keys, checkout mode and callback URL stay as they are.
  • While the platform suspends your account or a grant, requests return 403 DEVELOPER_NOT_ACTIVE / GRANT_NOT_ACTIVE; they work again once resumed.

Multi-merchant checklist: store keys (tdk_…) and callback signature keys per merchant; pick the verification key by X-TE-Client; send requests from the server IPs the merchant confirmed; handle rate limits and errors per merchant and stop calling a merchant on GRANT_NOT_ACTIVE or API_KEY_REVOKED; payouts are off by default, so never ask a merchant for its own keys; ship only on collect.order_paid or a query showing paid.

Security advice

  • Keep the Secret and the callback secret on your servers only: never in a front end, an app, a code repository or logs, and never in a request or a URL; it is only used to compute signatures.
  • Put only your own servers' outbound IPs on the allowlist. With a leaked key an attacker can only move your own balance from your allowlisted IPs, so the allowlist must hold nothing but your servers.
  • Rotate keys without downtime: up to 2 active keys per client; create a new key → switch your servers → disable the old key. New keys expire after 1 year (90 days if they can pay out), with reminders 30 and 7 days before: rotate in time.
  • If you suspect a leak: turn off API payouts in the Mini App at once, disable the key and generate a new callback secret, then contact the platform.
  • Leave API payouts off unless you need them; when you do, set your own payout limit in the Mini App to what you actually need.
  • Verify callbacks before processing them and deduplicate by event ID; ship only on collect.order_paid or an order query showing paid.
  • Send payment links only to that order's buyer; never draw chain addresses into your own pages.
  • The platform can suspend a client or disable a single key at any time; while suspended, credited deposits are still called back (only revocation stops them).
  • Never give the Secret to anyone, including people who claim to be platform staff: the platform keeps no plaintext and never needs it.

Go-live checklist

Check each item before going live, in this order: first on the local mock server, then test callbacks to your real callback URL, finally small real orders:

  • The local mock server from the developer kit runs through signing, orders, payment, expiry, player deposits, refund requests and callback verification.
  • GET /partner/v1/me succeeds and scopes, checkout_mode and payout_enabled are as expected.
  • Your server clock is synced (within 300 seconds of the platform) and every request uses a new nonce.
  • You sign exactly the method, path, query string and body bytes you send; nothing re-serializes the JSON after signing.
  • The IP allowlist holds only your own servers' outbound IPs.
  • POST /partner/v1/webhooks/test returns delivered as true and your handler verifies the signature; every event type you handle has been sent once as a test callback, and events with test true are only logged, never credited.
  • Callbacks are verified before parsing, the timestamp is checked, events are deduplicated by X-TE-Event-Id with a unique constraint on txid + event_index, and 2xx is returned only after successful processing.
  • You ship only on collect.order_paid or an order query showing paid; a collect.order_paid after expiry is treated as paid (refund or deliver).
  • checkout_url is used as returned, redirected to or opened in a new tab, never in an iframe; the return_url host is that of your approved callback URL.
  • Unknown JSON fields are ignored; network is stored with each deposit record.
  • Idempotency-Key is saved before each payout or chain payout and reused with the same body on timeouts; MERCHANT_INSUFFICIENT_BALANCE and PARTIAL_PAID are handled.
  • API payouts stay off unless needed; when needed, your own payout limit is set.
  • The Secret and the callback secret are not in front ends, apps, code repositories or logs.
  • One full pass with small real orders: web checkout (TRC20, and ERC20 if needed), Telegram wallet payment, callback, query and reconciliation.
  • For refunds: the key has collect:refund and the merchant owner turned on API refunds; requests carry an Idempotency-Key; update your refund records from collect.refund_requested / collect.order_refunded; check chain addresses with the buyer first.

FAQ

Is there a sandbox or test environment?

There is no sandbox. In order: run the flow against the local mock server from the developer kit (no platform, no real money), check your signature with GET /partner/v1/me, send test callbacks by event type with POST /partner/v1/webhooks/test, then test with small real orders.

How do I know whether the platform is under maintenance?

See the service status page: the API, webhook delivery, TRON deposits, Ethereum deposits and the web checkout each show Operational, Delayed or Maintenance, planned maintenance is announced in advance, and it updates every minute. When delayed, no money is lost: deposits are credited as usual and callbacks follow the retry schedule; do not create orders or payouts twice.

Can buyers without Telegram pay?

Yes. With the checkout mode Web payment page + Telegram wallet or Web payment page only, checkout_url opens the E8 web payment page, where buyers send USDT (TRC20 / ERC20) from any wallet in any browser, without logging in.

Can I collect USDC?

Buyers can pay from a USDC balance only inside the Telegram wallet, converted to USDT for you at a quote; the web checkout and online payments accept USDT only. You always receive USDT.

How long until a payment is credited?

On chain, about 1 minute on TRC20 (solidified blocks) and about 15–20 minutes on ERC20 (finalized blocks); payments from an E8 Wallet balance are credited at once.

What if the buyer sends the wrong amount, the wrong coin, or pays after the deadline?

The order is not completed; the money goes to the merchant balance in the coin received, minus the fee, and the merchant owner is notified. Agree with the buyer on a new order, or a refund in the same coin to a chain address the buyer gives (see unmatched receipts under Collect merchant refunds).

Can orders be refunded?

Yes. Escrow checkouts are refunded in full with POST /partner/v1/orders/{id}/refund. For collect merchants' orders (since 2026-11-27), file a request through the refund endpoints; the buyer can also ask in the bot, and the merchant owner can refund in the Mini App. Every refund needs the merchant owner's payment PIN. Partial refunds are allowed, in total at most the order amount, within 90 days of payment; collection fees are not refunded.

collect.order_paid arrived after the order expired. What now?

Always treat it as paid. A transfer on chain before the deadline is on time, so a late-confirmed online payment can complete after partner_order.expired; if the order is closed, refund the buyer or deliver anyway, but never drop it.

We integrated before 2026-11-27. Do we have to change code?

No. Existing merchants are on Telegram wallet only, and checkout_url and all responses stay the same. For the web checkout, switch in the Mini App under API access → Checkout mode (with the payment PIN); afterwards checkout_url is the web payment page and the bot link is in telegram_checkout_url.

Can one development team integrate several merchants?

Yes. Use a developer account: register in the Mini App's Developer center, invite merchants after platform review, each merchant's owner grants access with the payment PIN, and you create keys per merchant (one key works for one merchant only); the merchant can revoke at any time.

Can I embed the payment page in my site?

No. The payment page refuses to be embedded by other sites; redirect the current page or open a new tab.

Can I generate the payment address or QR code for buyers myself?

No. An order's payment address is shown by the E8 payment page or the bot; the deposit address API is only for player deposits, never for purchases.

Signing always returns INVALID_SIGNATURE?

Check each point: the method is upper case; the path includes the query string, exactly as sent; the body was not re-serialized after signing; an empty body uses the e3b0c442… hash; the Secret is complete. Compare step by step with the test vector above.

Does the platform refund on the merchant's behalf?

No. The merchant decides: every refund needs the merchant owner's payment PIN and comes from the merchant balance. Platform staff can neither start nor approve a refund and never advance money; buyers who disagree with the merchant's decision should contact the merchant first.

More questions? Use Live support at the bottom right, or reach official support @E8QBofficial or the support bot @E8QBadminBOT on Telegram.