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.
Home / Developer docs
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.
https://open.e8qianbao.com/partner/v1E8 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).
checkout_url is the E8 web payment page; see Web checkout.| Type | For | Scopes |
|---|---|---|
| Escrow merchant (escrow) | Goods and services: the buyer's money is held in platform escrow and settled to the merchant once receipt is confirmed | orders: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 payouts | collect, webhooks:test |
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.
{"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.
From applying to the first real payment in 5 steps. The first 4 move no real money.
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.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.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.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.
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.
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.
Every callback is signed with HMAC-SHA256 using your callback secret. This page lists the events, shows sample callbacks and Python / Node.js / PHP verification code, says how a callback must be handled, and how to send test callbacks by event type.
Orders, receipts, unmatched receipts, daily statements and the merchant wallet ledger can all be queried. This page covers the query and statement API, and player deposit addresses with their reconciliation.
Payouts to players and on-chain payouts only use the merchant's own balance; a refund is a request that runs only after the merchant owner approves it with the payment PIN. This page covers payouts, collect merchant refunds and escrow checkouts.
The API limits requests per source IP and per client, and every error has a fixed code. This page has the rate limits and every error code with its HTTP status, meaning and what to do.
The developer kit has Python, Node.js, PHP, Go and Java samples and a local mock server that never touches the platform or real money; there is also an OpenAPI description of the public partner API only.
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).
collect scope alone cannot pay out.| Item | Rule |
|---|---|
| Key ID | tek_ followed by 24 lowercase hex characters, sent in the X-TE-Key header |
| Secret | Only used to compute request signatures; never appears in a request, a URL or a log; shown once |
| Webhook Secret | The callback secret, used to verify callbacks from the platform; only generated and shown in the Mini App |
| Validity | Keys 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 once | Up 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 |
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.
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.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.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.| Ability | What it allows |
|---|---|
collect | All collect features (the three below) |
collect:orders | Create, query and close wallet bills early |
collect:addresses | Player deposit addresses and their deposits |
collect:read | Balance, payout and chain payout queries, unmatched receipts, statements, merchant wallet ledger, refunds |
collect:refund | File 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:test | Callback 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.
IP_NOT_ALLOWED).WITHDRAW_PIN_HOLD / PIN_RESET_HOLD).RATE_LIMITED.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.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.return_url can use it once staff approve. You can also submit the payment brand; it shows at checkout only after review.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.DEVELOPER_PAYOUT_NOT_GRANTED with a developer key.DEVELOPER_PAYOUT_LIMIT, and nothing is created or debited. The platform can change it.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.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).API_KEY_REVOKED. The merchant's own keys, checkout mode and callback URL stay as they are.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.
collect.order_paid or an order query showing paid.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:
GET /partner/v1/me succeeds and scopes, checkout_mode and payout_enabled are as expected.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.X-TE-Event-Id with a unique constraint on txid + event_index, and 2xx is returned only after successful processing.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.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.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.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.
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.
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.
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.
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.
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).
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.
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.
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.
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.
No. The payment page refuses to be embedded by other sites; redirect the current page or open a new tab.
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.
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.
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.