# TronDealer — Complete Documentation > Stablecoin payment gateway and multichain crypto infrastructure on 15 blockchains. Accept dollar stablecoins with zero price volatility on 13 of them (USDT on 10, USDC on 9, plus USDG and DOC) and native coins (BTC, LTC, BNB, ETH, POL, RBTC, TRX, SOL, GRAM, XLM). Self-serve REST API with automated deposit detection, HMAC webhooks, and fund sweeping. ## What is TronDealer? TronDealer is a stablecoin payment gateway and blockchain infrastructure provider built by QvaPay. It lets businesses accept dollar stablecoins on 13 blockchains through a single REST API (USDT and USDC on Ethereum, BSC, Polygon, Arbitrum, Base, Optimism, Avalanche and Solana; USDT on TRON and TON; USDC on Stellar; USDG on Robinhood Chain; DOC on Rootstock) — with zero price volatility, automated deposit detection, and instant webhook notifications. It also accepts native coin deposits — Bitcoin (BTC), Litecoin (LTC), BNB on BSC, ETH on Ethereum mainnet, POL on Polygon, RBTC on Rootstock, TRX on TRON, SOL on Solana, GRAM on TON, and XLM on Stellar. Unlike traditional crypto gateways (NowPayments, CoinGate, Plisio) that focus on Bitcoin and hundreds of volatile tokens, TronDealer specializes in stablecoins: dollar-denominated assets that hold a 1:1 USD peg. This eliminates the #1 merchant concern with crypto payments — price volatility. The V2 API is **self-serve**: you register programmatically and receive an API key instantly. There is no sales call and no "request a demo" gate. ## Core Value Proposition - **Zero volatility** — merchants receive exactly the dollar amount their customers pay - **Multi-chain** — USDT is receivable on 10 blockchains and USDC on 9 (11 with either one); the customer chooses the network, the merchant gets the payment - **Fully automated** — deposit detection, confirmation, webhook notification, and fund sweeping, all without manual intervention - **API-first and self-serve** — every operation is available via REST; registration requires no human approval - **Flexible payouts** — sweep to your own wallet, or settle to a QvaPay or Zelle account (custodial) ## Supported Blockchains and Tokens | Blockchain | Native | Stablecoins | Standard | V2 deposits? | Key advantage | |---|---|---|---|---|---| | TRON | TRX | USDT | TRC20 | Yes (+ TRX native) | Lowest fees, highest global USDT volume | | Ethereum | ETH | USDT, USDC, PYUSD | ERC20 | Yes (+ ETH native) | Largest DeFi ecosystem, PayPal USD support | | BSC (BNB Chain) | BNB | USDT, USDC | BEP20 | Yes (+ BNB native) | Fast, low cost (USDT/USDC are 18-decimal here) | | Solana | SOL | USDT, USDC, USDG | SPL | Yes (+ SOL native) | Sub-second finality (USDG is Token-2022) | | Base | ETH | USDT, USDC | ERC20 | Yes (stablecoins only) | Coinbase Layer 2 | | Polygon | POL | USDT, USDC | ERC20 | Yes (+ POL native) | Low-fee Layer 2 | | Arbitrum | ARB/ETH | USDT, USDC, ARB | ERC20 | Yes (stablecoins + ARB token) | Ethereum Layer 2 | | Optimism | ETH | USDT, USDT0, USDC | ERC20 | Yes (stablecoins only) | Ethereum Layer 2 (OP Stack, chainId 10). USDT0 (`0x01bFF41798a0BcF287b996046Ca68b395DbC1071`, 6 decimals) is a separate contract from bridged USDT; webhooks report it as asset `USDT0` | | Avalanche | AVAX | USDT, USDC | ERC20 | Yes (stablecoins only, no V1) | Fast finality | | Robinhood Chain | ETH | USDG | ERC20 | Yes (USDG only, no native ETH) | Robinhood users withdraw USDG directly to it (Arbitrum Orbit L2, chainId 4663) | | Bitcoin | BTC | — | Native | Yes (native BTC) | Digital gold standard | | TON | GRAM | USDT | Jetton | Yes | Telegram ecosystem | | Stellar | XLM | USDC | Native (Circle USDC) | Yes (+ XLM native, memo-based) | Final in one ~5 s ledger | | Litecoin | LTC | — | Native | Yes (native LTC) | Fast Bitcoin alternative (2.5-min blocks) | | Rootstock (RSK) | RBTC | DOC | ERC20 | Yes (DOC and native RBTC) | Bitcoin merge-mined sidechain (chainId 30); DOC is Money on Chain's USD stablecoin, 18 decimals | Token decimals note: most stablecoins are 6 decimals, **but BSC USDT/USDC are 18 decimals**. Always read decimals from `/api/v2/networks` rather than hardcoding. Native coin deposits: BNB (BSC), ETH (Ethereum mainnet only — not Arbitrum/Base/Optimism), POL (Polygon), RBTC (Rootstock), TRX (TRON), SOL (Solana), GRAM (TON — the native coin's post-rebrand ticker; the API always says `GRAM`, never `TON`, for the asset) and XLM (Stellar) are accepted deposit assets alongside the stablecoins, BTC, and LTC. The ARB governance token (ERC-20 `0x912CE59144191C1204E64559FE8253a0e49E6548` on Arbitrum, 18 decimals) is also a deposit asset on `arb` and is treated like a native coin: webhooks report `amount` in USD at the detect-time spot, `amount_native` in ARB and `price_usd`. Native AVAX is not a deposit asset. On EVM chains and TRON, only **direct** native transfers are detected — value moved inside a contract call (internal transactions, smart-wallet withdrawals) is not detected; use a direct transfer when paying a deposit address in native coin. GRAM on TON has no such limitation — contract-originated transfers are detected too. ## V2 API — Stablecoin Payment Gateway The V2 API is the primary integration point. It is multi-client and organized into seven isolated subsystems — **EVM** (bsc, eth, pol, arb, base, opt, avax, rh, rsk), **TRON**, **Solana (SOL)**, **Bitcoin (BTC)**, **Litecoin (LTC)**, **TON**, and **Stellar (XLM)**. ### Base URL ``` https://www.trondealer.com/api/v2 ``` ### Authentication Client API operations use an API key prefixed with `td_`, sent as a header: ``` x-api-key: td_your_api_key_here ``` ### Step 1 — Register (self-serve, no human approval) Two public registration endpoints return a `td_` API key immediately: - `POST /api/v2/clients/register-open` — open registration, rate-limited to 1 per IP per hour. - `POST /api/v2/clients/register-public` — same, but protected by a Cloudflare Turnstile CAPTCHA token (`turnstile_token`). Use this from browser-facing onboarding flows. (There is also `POST /api/v2/clients/register`, which requires the `secret-key` header — for internal/server-side provisioning.) **Request body:** ```json { "name": "My Store", "payout_method": "wallet", "sweep_wallet_evm": "0xYourEvmPayoutAddress...", "sweep_wallet_tron": "TYourTronPayoutAddress...", "webhook_url": "https://yourapp.com/webhooks/trondealer", "webhook_secret": "your_hmac_secret", "min_confirmations": 12 } ``` Field rules: - `name` (required) — 2–100 chars. - `payout_method` (required) — one of `wallet`, `qvapay`, `zelle`. - `wallet` requires at least one of `sweep_wallet_evm` (EVM address) or `sweep_wallet_tron` (TRON Base58 address). Sweeps forward funds on-chain to these addresses. - `qvapay` requires `qvapay_account` (custodial settlement to a QvaPay account). - `zelle` requires `zelle_contact` (custodial settlement via Zelle). - `webhook_url` (optional) — must be HTTPS and public (private/internal IPs are rejected). - `webhook_secret` (optional) — up to 256 chars; enables HMAC-SHA256 webhook signatures. - `min_confirmations` (optional) — integer 1–100; overrides the per-chain default on the EVM networks and TRON. A value below a network's default applies only with `payout_method = 'wallet'` and a sweep wallet set for that network family; with `qvapay` or `zelle` the network default is the minimum. **Response (201):** ```json { "success": true, "client": { "id": "uuid", "name": "My Store", "api_key": "td_...", "webhook_url": "https://yourapp.com/webhooks/trondealer", "min_confirmations": 12, "sweep_wallet_evm": "0x...", "sweep_wallet_tron": "T...", "payout_method": "wallet", "is_active": true, "created_at": "2026-01-15T10:30:00Z" } } ``` Store the `api_key` securely — it is shown only once. ### Step 2 — Assign a deposit wallet Each subsystem exposes the same three wallet operations. The route prefix selects the subsystem: | Subsystem | Wallet routes | |---|---| | EVM | `POST /api/v2/wallets/assign`, `/wallets/balance`, `/wallets/transactions` (pass `network` in body) | | TRON | `POST /api/v2/tron/wallets/assign`, `/balance`, `/transactions` | | Solana | `POST /api/v2/sol/wallets/assign`, `/balance`, `/transactions` | | Bitcoin | `POST /api/v2/btc/wallets/assign`, `/balance`, `/transactions` | | Litecoin | `POST /api/v2/ltc/wallets/assign`, `/balance`, `/transactions` | | TON | `POST /api/v2/ton/wallets/assign`, `/balance`, `/transactions` | | Stellar | `POST /api/v2/xlm/wallets/assign`, `/balance`, `/transactions` (wallets identified by `memo`, see below) | **EVM example** — `POST /api/v2/wallets/assign` ```json { "label": "order-12345", "single_use": true } ``` - `network` — not needed on assign: one EVM address is valid on every EVM chain (`bsc`, `eth`, `pol`, `arb`, `base`, `opt`, `avax`, `rh`, `rsk`) and deposits on any of them are detected. On `rsk`, show the address in lowercase: Rootstock wallets that validate the chain-specific checksum (EIP-1191) reject the EIP-55 mixed-case form the API returns. Pass `network` only on `balance` (one chain per read). TRON/SOL/BTC/LTC/TON use their own route prefix instead. - `label` (optional) — your order/user identifier. Reusing a label returns the existing **active** wallet for that client; deactivated wallets are never reused. - `single_use` (optional, default `false`) — when true, the wallet is marked `inactive` after its first successful sweep, removing it from the active scan set. Useful for high-volume per-order flows. **Response (201):** ```json { "success": true, "wallet": { "id": "uuid", "address": "0xAbC1234567890DEF1234567890abcdef12345678", "label": "order-12345", "status": "active", "single_use": true, "created_at": "2026-01-15T10:30:00Z" } } ``` Show `wallet.address` to your customer as the deposit address. **Stellar (XLM + USDC) — memo wallets.** Every Stellar wallet is a **memo on one shared deposit address**, so the assign response carries three payment fields: ```json { "success": true, "wallet": { "id": "uuid", "address": "GCJAXR32J2VAFVCX4G32O52XNMT5XSKHOJ7V7XJE7CHIP3ZHU365LQAM", "memo": "1234567890123456789", "memo_type": "id", "muxed_address": "MCJAXR32J2VAFVCX4G32O52XNMT5XSKHOJ7V7XJE7CHIP3ZHU365KEJCCD2H32MBCWWVE", "label": "order-12345", "status": "active", "single_use": true, "created_at": "2026-10-13T10:30:00Z" } } ``` - **The memo is mandatory.** Show the customer `address` AND `memo` (memo type **ID**), or the `muxed_address` alone — a muxed `M...` address embeds the memo, so wallets that support it need no separate memo. A payment to the plain `address` without the memo cannot be attributed to any wallet; it is held for manual review, not credited. - `memo` is a decimal **string** (a u64 that does not fit a JSON number exactly) — never parse it as a number. - Accepted: native XLM (minimum 2 XLM) and Circle USDC (issuer `GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN`, minimum 0.40). Smaller payments are ignored. - Because the address is shared, `balance`, `transactions` and `check-hash` identify the wallet by `{ "memo": "..." }` (or `{ "muxed_address": "M..." }`), never by `address`. `balance` returns the deposits credited to the memo that have not been swept yet (there is no per-wallet on-chain balance). - A deposit to the memo is credited even if the wallet was deactivated meanwhile (the funds are already in the gateway's account). - Finality: a closed Stellar ledger is final — deposits arrive with `confirmations: 1`. Webhook payloads add `ledger` and `memo` after `tx_hash`; `network` is `"xlm"` and `asset` is `"XLM"` or `"USDC"`. **Managing a wallet (dashboard/mobile, authenticated with the same `x-api-key` or the dashboard session):** `PATCH /api/v2/clients/me/wallets/{id}` (EVM) or `PATCH /api/v2/clients/me/{tron|sol|btc|ltc|ton|xlm}/wallets/{id}` with a JSON body containing `label` (string up to 50 chars, or `null` to clear; 409 if another wallet already uses it) and/or `status` (`"active"` | `"inactive"`). Deactivating removes the wallet from the deposit scan set — funds arriving while it is inactive are not detected (XLM is the exception: a payment carrying the wallet's memo is credited whatever its status). Reactivating puts the wallet back in the scan set from that moment on — it does **not** rescan the inactive period. A deposit that arrived while the wallet was inactive is credited by declaring its hash (see "Declare a missed deposit by hash" below). Wallets with no activity for 120 days are deactivated automatically. Response: `{ "success": true, "wallet": { "id", "address", "label", "status", "created_at" } }`. ### Step 3 — Check balances `POST /api/v2/wallets/balance` (EVM; `network` in body) or the subsystem-prefixed equivalent. Rate limit: 1 balance request per minute per client per subsystem (shared with the dashboard variant of the route). Over the limit the API answers `429` with `{ "error", "code": "RATE_LIMITED", "retry_after" }` and a `Retry-After` header. Balances are live on-chain reads; rely on webhooks for deposit detection instead of polling. ```json { "network": "bsc", "address": "0xAbC...1234" } ``` On the EVM route each request reads ONE chain: send `network` (`bsc`, `eth`, `pol`, `arb`, `base`, `opt`, `avax`). If `network` is omitted, `eth` is used. An unknown value returns `400`. Balances are keyed by network. **Response (200):** ```json { "success": true, "wallet": { "address": "0xAbC...", "label": "order-12345", "status": "active" }, "balances": { "bsc": { "BNB": "0.0042", "USDT": "150.50", "USDC": "75.00" } } } ``` ### Step 4 — Transaction history `POST /api/v2/wallets/transactions` (or subsystem equivalent). ```json { "network": "bsc", "address": "0xAbC...1234", "limit": 20, "offset": 0, "status": "confirmed" } ``` **Response (200):** ```json { "success": true, "wallet": { "address": "0xAbC...", "label": "order-12345" }, "total": 42, "limit": 20, "offset": 0, "transactions": [ { "tx_hash": "0xabc123...", "block_number": 45678901, "from_address": "0xSender...", "to_address": "0xAbC...", "asset": "USDT", "amount": "100.00", "confirmations": 15, "status": "confirmed", "detected_at": "2026-01-15T10:35:00Z" } ] } ``` The natural hash field varies by chain: EVM/TRON use `tx_hash`/`tx_id`, Solana uses `tx_signature`, and Bitcoin and Litecoin use `tx_hash` + `vout_index` together (a UTXO needs both for unique identity). ### Declare a missed deposit by hash `POST /api/v2/wallets/check-hash` (EVM; `network` in body) or the subsystem-prefixed equivalent (`/api/v2/{tron|sol|btc|ltc|ton|xlm}/wallets/check-hash`). On Stellar send `{ "memo": "...", "tx_hash": "..." }` instead of `address` (the address is shared); only transfers carrying that memo are credited, and the hash must be within the Stellar RPC's ~7-day history. Use it when a customer paid one of your deposit addresses but no webhook arrived — the usual cause is a wallet that had been deactivated (120 days idle, or by you) before the payment landed. Send the address and the transaction hash the customer gave you: ```json { "network": "bsc", "address": "0xAbC...1234", "tx_hash": "0x9f2c..." } ``` - The wallet must be yours (404 otherwise). The transaction is fetched once and every leg that pays that address is recorded as `detected`; the normal confirm → webhook → sweep pipeline takes over, so you receive the standard `transaction.incoming` / `confirmed` / `swept` webhooks. - If the wallet was inactive it is reactivated on the spot. **No historical rescan is run**: declare each missed deposit by its own hash. - Idempotent: repeating a hash answers `credited: true` with `new_transactions: 0`. A hash that exists but paid a different address answers `credited: false`. A hash the node cannot find yet (still propagating, wrong chain) or a reverted transaction is a `400` — retry later or check the network. On bsc/eth/pol/rsk, a transaction that pays your wallet in native coin from inside a contract call (smart-wallet senders) is recorded only once it has the network's default confirmations: before that the call answers `400` "Transaction is unconfirmed on …" and records nothing; declare the same hash again a few minutes later. - `tx_hash` carries the chain's natural identifier: the 0x hash on EVM, the transaction id on `/tron/`, the base58 **signature** on `/sol/`, the txid on `/btc/` and `/ltc/`. On TON, for a USDT deposit use the hash explorers show under your deposit address (it belongs to the wallet's jetton wallet). - Rate limit: 5 calls per minute per client per subsystem → `429 { "code": "RATE_LIMITED", "retry_after" }` + `Retry-After`. **Response (200):** ```json { "success": true, "wallet": { "id": "uuid", "address": "0xAbC...", "label": "order-12345", "status": "active" }, "tx_hash": "0x9f2c...", "network": "bsc", "confirmations": 27, "credited": true, "reactivated": true, "new_transactions": 1, "duplicates": 0, "matches": [ { "asset": "USDT", "amount": "150.50", "from_address": "0x9a1...", "to_address": "0xAbC..." } ] } ``` ### List supported networks (no auth) ``` GET /api/v2/networks ``` Returns the canonical catalog of chains, assets, decimals, contract addresses, and confirmation thresholds. Consume this rather than hardcoding — new networks appear without a client-side release. Cached 5 minutes. ```json { "success": true, "networks": [ { "key": "tron", "family": "tron", "label": "TRON", "default_min_confirmations": 19, "assets": [ { "symbol": "USDT", "decimals": 6 } ] }, { "key": "bsc", "family": "evm", "label": "BSC", "network_param": "bsc", "native_token": "BNB", "default_min_confirmations": 10, "assets": [ { "symbol": "USDT", "decimals": 18, "contract": "0x55d398326f99059fF775485246999027B3197955" }, { "symbol": "USDC", "decimals": 18, "contract": "0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d" } ] } ] } ``` The `family` field tells you which route family to call: - `evm` → `/api/v2/wallets/*` with `network: ""` - `tron` → `/api/v2/tron/wallets/*` - `sol` → `/api/v2/sol/wallets/*` - (BTC and LTC follow the same `/api/v2/{btc,ltc}/wallets/*` pattern.) ### Transaction lifecycle Every deposit moves through these stages automatically: 1. **detected** — found on-chain by the scanner 2. **confirmed** — block confirmations meet the threshold 3. **notified** — webhook delivered to your endpoint 4. **swept** — funds moved to your payout destination Per-chain default confirmations: BSC/ETH/BASE/AVAX = 10, Polygon = 20, Arbitrum/Optimism = 6, TRON = 19, Solana = 1 (finalized), Bitcoin = 2, Litecoin = 6 (~15 min at 2.5-min blocks), TON = 1 (fast finality), Stellar = 1 (closed ledgers are final). Override per client with `min_confirmations` (registration or `PATCH /clients/me`); it is read on the EVM networks and TRON, the other networks always use their own value. Raising it always works. Lowering it below a network's default works only when deposits are swept to your own wallet (`payout_method = 'wallet'` with a sweep wallet for that network family): with a custodial payout (`qvapay`, `zelle`) the network default is the minimum. **A `detected` deposit is not final.** On the EVM networks a deposit is read again on-chain before it becomes `confirmed`, and its confirmations are counted from the block it is in at that moment. If its transaction is no longer on the chain (the block it was first seen in was replaced), it is never confirmed: you received `transaction.incoming` and nothing else, and the deposit leaves `GET /wallets/transactions`. If the transaction is mined again later, it is reported as a new deposit. Credit balances only from `transaction.confirmed`. **Amount contract for native assets:** for BTC, LTC, TRX, SOL, BNB, ETH, POL, GRAM and XLM deposits, the webhook `amount` is the **USD equivalent** at the CoinGecko spot frozen at detect time, with `amount_native` (on-chain units) and `price_usd` (the spot used) alongside. Stablecoins keep `amount == amount_native` and `price_usd = 1.00`. If no USD price is available, the notification is deferred and retried on the next tick — it is never sent with partial data. ### Minimum deposit **Stablecoin payments (USDT, USDT0, USDC, PYUSD, USDG, DOC) below 0.40 are not processed** on any chain: no transaction is recorded, no webhook is sent, nothing is credited to a QvaPay/Zelle payout, and `wallets/check-hash` does not credit them either. Make sure your checkout never requests less than 0.40. Native coins have their own minimums, in native units (below these a deposit is ignored the same way): BTC 0.0001 (~$10), LTC 0.01 (~$1), BNB 0.001, ETH 0.0002, POL 7, RBTC 0.00001, TRX 2, SOL 0.005, GRAM 0.4, XLM 2. ARB token: 3 ARB. With `payout_method = 'wallet'` the sweep fee (0.4% + $0.30 below $10, see Sweep fees) still applies on top, so a 0.40 deposit forwards about 0.10. ### Webhooks Webhook events: - `transaction.incoming` — deposit detected (not yet confirmed) - `transaction.confirmation_update` — confirmation count advanced while still pending (opt-in, EVM + BTC + LTC only) - `transaction.confirmed` — confirmations met - `transaction.swept` — funds swept to your payout destination (best-effort) **`transaction.confirmation_update` (opt-in):** disabled by default; enable per client with `"notify_confirmation_updates": true` via `PATCH /api/v2/clients/me`. While a deposit is still pending, you get an extra webhook each time the confirmation count advances (at most one per scan tick on EVM, one per block on Bitcoin and Litecoin — where multi-block confirmation targets, 2 confs at ~10 min/block on Bitcoin and 6 confs at ~2.5 min/block on Litecoin, make progress genuinely useful). The payload matches the deposit payload below plus a `min_confirmations` field (the target count), so you can render `confirmations / min_confirmations` progress. Delivery is fire-and-forget: no retries, missed updates are not re-sent, and ordering vs `transaction.confirmed` is not guaranteed — treat it as cosmetic, render the highest count seen, and stop on `transaction.confirmed`. Never credit funds from this event; only `transaction.confirmed` is authoritative. **Payload:** ```json { "event": "transaction.confirmed", "timestamp": "2026-01-15T10:40:00Z", "data": { "tx_hash": "0xabc123...", "block_number": 45678901, "from_address": "0xSender...", "to_address": "0xYourWallet...", "asset": "USDT", "amount": "100.00", "amount_native": "100.00", "price_usd": 1.0, "confirmations": 15, "wallet_label": "order-12345" } } ``` `transaction.incoming` payloads carry the subsystem's natural hash field (`tx_hash`, `tx_id`, `tx_signature`, `tx_digest`, `tx_hash` + `vout_index` for BTC/LTC, or `tx_hash` + `ledger` + `memo` for Stellar). For native assets (BTC, LTC, TRX, SOL, BNB, ETH, POL), `amount` is the USD equivalent (`amount_native × price_usd`, spot frozen at detect time); for stablecoins `amount == amount_native` and `price_usd` is `1.00`. **HMAC verification:** if you set `webhook_secret` at registration, every webhook includes: ``` X-Signature-256: sha256= ``` Verify by computing `HMAC-SHA256(webhook_secret, raw_request_body)` and comparing against the header (constant-time compare). **Retries:** failed deliveries are retried with backoff; errors are recorded. ### Sweep fees and payouts - When `payout_method = 'wallet'` and the asset is a stablecoin, a sweep fee of **0.4% (+ $0.30 fixed when the amount is below $10)** is deducted on-chain before forwarding to your `sweep_wallet_*`. - Native coin deposits are swept too: on EVM (bsc/eth/pol/rsk) the native coin is swept as a primary asset, with the same 0.4% (+ $0.30 below $10) fee for wallet-payout clients, converted to native units at the USD spot; TRX-only sweeps on TRON delegate bandwidth only (no energy) and sweep the full balance (MAX); on Solana, native SOL is drained to zero in the same atomic sponsored transaction as the SPL sweep (the main wallet pays the fee); on TON, GRAM is drained with a full-balance MAX send signed by the deposit wallet itself (no gas top-up needed — the drained balance pays its own fee). `transaction.swept` webhooks for native assets carry the USD `amount` plus `amount_native` and `price_usd`. - On Stellar, deposits already sit in the gateway's deposit account; the sweep is one batched payment from it per client and asset (net to your `sweep_wallet_xlm` — a G... address, no memo is sent — and the fee leg in the same transaction). One `transaction.swept` webhook is sent per memo wallet, with `wallet_memo` and its share of the fee. - `payout_method = 'qvapay'` or `'zelle'` settles custodially to your QvaPay account or Zelle contact. For native assets, the custodial conversion to USD uses the detect-time price. - Per-subsystem sweep mechanics differ (gas auto-funding on EVM; energy delegation on TRON; sponsored atomic transactions on SOL; consolidating PSBT where each wallet pays its own miner fee on BTC and LTC) — these are handled automatically and need no client action. ### Error responses ```json { "error": "Description of what went wrong" } ``` | HTTP | Meaning | |---|---| | 400 | Bad request — missing/invalid parameters | | 401 | Unauthorized — missing/invalid API key | | 403 | Forbidden — client deactivated, or CAPTCHA failed (register-public) | | 404 | Wallet not found or not owned by your account | | 429 | Rate limited (registration, balance reads, check-hash) | | 500 | Internal server error | ### OpenAPI specification ``` https://www.trondealer.com/v2-openapi.json ``` OpenAPI 3.0.3, importable into Postman, Swagger UI, or any API client. Rendered interactively at `https://www.trondealer.com/en/docs`. ## Integration Guide ### Quick start (self-serve) 1. **Register** — `POST /api/v2/clients/register-open` with your `name` and `payout_method`. Receive a `td_` API key instantly. 2. **Assign a wallet** — call the assign endpoint for your chain to create a deposit address (use `label` to track the order). 3. **Show the address** — display it to your customer for payment. 4. **Receive a webhook** — TronDealer detects the deposit and posts `transaction.confirmed` to your `webhook_url`. 5. **Funds settle** — after notification, funds are swept to your wallet (or settled via QvaPay/Zelle). ### Typical use cases - **E-commerce checkout** — assign a wallet per order; act on the confirmed webhook. - **WooCommerce** — install the TronDealer plugin for a no-code checkout (see guides). - **Subscription billing** — assign a wallet per subscriber; monitor recurring deposits. - **P2P / escrow** — assign wallets for escrow; verify deposits before releasing. - **Payouts / remittances** — accept stablecoins on any chain, settle on your preferred network. ### Guides - Integration walkthrough: https://www.trondealer.com/en/guides/integration - WooCommerce stablecoin payments: https://www.trondealer.com/en/guides/woocommerce-stablecoins-tutorial - Bitcoin payments: https://www.trondealer.com/en/guides/bitcoin-payments-trondealer - Stablecoin contract reference: https://www.trondealer.com/en/guides/stablecoin-contracts - Gateway comparison: https://www.trondealer.com/en/guides/coinbase-commerce-vs-bitpay-vs-trondealer - $2.5M stablecoin milestone (real pipeline statistics): https://www.trondealer.com/en/guides/milestone-2-5m-stablecoins ## Architecture (for technical context) TronDealer is a Next.js 16 (React 19) application backed by Supabase (Postgres), deployed on a single VPS managed by PM2. Two API generations coexist: - **V1** — per-chain single-tenant routes under `/api/{chain}/` (withdraw, transferbalance, check, etc.). It no longer issues deposit addresses: every deposit goes through V2. TRON adds energy/bandwidth delegation operations. Used for payouts and internal operations. - **V2** — the multi-client payment monitoring API above, split into seven isolated subsystems so non-EVM chains never share EVM table/route abstractions. Each subsystem owns `v2_{chain}_*` tables and `/api/v2/{chain}/*` routes; EVM uses `v2_*` tables keyed by `network`. **Deposit detection per subsystem:** - **EVM** — per-wallet log scanning on a 60-second cron, which is also the source of truth for confirmation counting. Native BNB/ETH/POL deposits are detected by a separate forward block walk. - **TRON** — JSON-RPC event logs, timestamp-cursored. Native TRX deposits are detected by a block walk. - **Solana** — per-ATA signature scan (legacy SPL transfers omit the mint, so detection is keyed by the destination ATA). Native SOL deposits are detected by a per-owner signature scan. USDG (Global Dollar) is a Token-2022 mint; its token accounts derive under the Token-2022 program, which the gateway handles transparently — integrators just send USDG to the assigned deposit address like any SPL token. Native detection limitation: on EVM chains and TRON, only direct native transfers are detected — value transferred inside a contract call (internal transactions, smart-wallet withdrawals) is not seen by the block walk. Webhook amounts for native assets are USD-denominated, with `amount_native` and `price_usd` provided for reconciliation. - **Bitcoin** — forward block walk against an in-memory address set (public Bitcoin Core RPC has no balance-by-address method). - **Litecoin** — same forward block-walk model as Bitcoin, against a Litecoin Core-compatible RPC (2.5-min blocks, 6 confirmations default). - **TON** — per-wallet transaction scan: USDT (Jetton) on the wallet's derived jetton wallet, native GRAM on the wallet address itself. Committed transactions are final, so deposits confirm immediately (1 confirmation). - **Stellar** — one shared deposit account; each wallet is a u64 memo. Deposits are read from the Stellar RPC `getEvents` stream (unified SAC `transfer` events for XLM and USDC, ledger-cursored) and matched by memo / muxed id. Closed ledgers are final (1 confirmation). **Scheduling:** scan/notify run every minute per subsystem; sweeps every 5–10 minutes; stale-wallet deactivation after 120 days. **Auth mechanisms:** `secret-key` header (V1 + internal registration), `x-api-key` (V2 client ops), `Authorization: Bearer CRON_SECRET` (cron), and an HMAC `td_session` cookie (client dashboard + admin). ## Security - All client wallet private keys are stored server-side; deposit wallets are swept promptly to minimize exposure. - Webhook HMAC-SHA256 signatures for payload verification; webhook URLs must be HTTPS and public. - Per-client API-key isolation; deactivated clients are rejected (403). - Automated deposit-to-sweep pipeline reduces idle balances on deposit wallets. ## Privacy - Registration is identity-free: no email, phone, personal name, ID documents, or card data are collected. An account is a UUID plus an API key. - Stored per client: account name, API key, per-network payout addresses, optional QvaPay/Zelle payout contact, webhook URL + secret, and the on-chain transaction history of assigned deposit wallets (already-public blockchain data). - Deposit wallet private keys are encrypted at rest (AES-256-GCM) and decrypted only at sweep time. - No analytics or tracking on the website or the mobile app. The dashboard uses one strictly-necessary session cookie (td_session, 30 days). - Processors: DigitalOcean (hosting), Supabase, Cloudflare (proxy + Turnstile), blockchain RPC providers, QvaPay/Zelle (only if chosen as payout), CoinGecko (no user data). - Sanctions screening (OFAC SDN) runs on destination addresses before payouts and on the sender of V2 deposits, in place of KYC. - Full policy: https://www.trondealer.com/en/privacy (ES: https://www.trondealer.com/es/privacy) ## About TronDealer is built by QvaPay, a fintech focused on digital payment infrastructure. - Website: https://www.trondealer.com/en - API Docs: https://www.trondealer.com/en/docs - OpenAPI Spec: https://www.trondealer.com/v2-openapi.json - LLM Index: https://www.trondealer.com/llms.txt