Transatron is a Tron RPC provider that delegates the energy and bandwidth required to process a transaction, so end users can transact on Tron without holding TRX. Apps integrate Transatron as a drop-in replacement for the Tron full node and select a fee-payment mode that fits their UX. This recipe combines Privy’s Tron wallet support with Transatron’s gas sponsorship to broadcast TRX-less transfers from a user’s embedded wallet.Documentation Index
Fetch the complete documentation index at: https://docs.privy.io/llms.txt
Use this file to discover all available pages before exploring further.
Resources
Transatron docs
Official Transatron integration documentation.
Tron raw signing
How Privy signs Tron transactions via
raw_sign.Prerequisites
- A funded Transatron account and a Spender API key issued from the dashboard. The Spender key authorizes fee deduction from the app’s prepaid TFN/TFU balance on every broadcast.
How fee payment works
Transatron supports four fee-payment modes:| Mode | When to use | User holds TRX? |
|---|---|---|
| Internal account | Default, simplest integration. Broadcasting through the Transatron RPC with a Spender key auto-deducts fees from the app’s prepaid TFN/TFU balance. No per-transaction setup required. | No |
| Instant payment | The user wallet holds a small TRX or USDT balance to cover Transatron’s per-tx fee. Primarily for non-custodial wallet integrations. | Yes (small) |
| Coupon | Per-transaction spend cap. The backend issues a coupon backed by its Transatron balance. Typically used for promos and individual discounts. | No |
| Bypass | Fallback mode. The sender’s wallet burns TRX directly for fees as on a vanilla Tron node. | Yes |
1. Create a Tron wallet for the user
Privy supports Tron at the Tier 2 level. Create a wallet withchain_type: 'tron'. The wallet
address can receive TRX, USDT, and other TRC-20 assets.
Newly created Tron addresses may require on-chain activation before some sending flows work
reliably. Fund the address with a small TRX amount first if activation related errors appear.
2. Configure TronWeb to use the Transatron RPC
Point TronWeb athttps://api.transatron.io and attach the Spender API key as a header. All subsequent operations — fee estimation, simulation, and broadcasts — flow through Transatron. The Spender key on the connection authorizes automatic fee deduction from the app’s prepaid balance on every broadcast.
3. Sign Tron transactions with Privy
Privy’sraw_sign returns a 64-byte ECDSA signature, but Tron expects 65 bytes — the trailing recovery byte is either 0x1b or 0x1c. Signing is the only step in the flow that can run on the client; building and broadcasting still happen on the server, since both require the Transatron API key.
4. Broadcast a sponsored transaction
With the internal-account mode, broadcasting through the Transatron RPC is all that’s needed to sponsor fees. The Spender key on the connection authorizes the charge — no coupon creation or additional per-transaction setup is required. The code below runs entirely on the server. If signing happens in a React client (per step 3), replace the inlinesignTronTransaction(...) call with a roundtrip — return the unsigned transaction’s txID to the client, receive the 64-byte signature back, and finalize via attachTronSignature(...) before broadcasting.
Compute the Tron fee limit
Tron rejects transactions whose
fee_limit is lower than the energy required to execute them. Use triggerConstantContract to estimate energy_used and multiply by the live energy_fee from chain parameters. This is the Tron-side fee limit that gets baked into the signed transaction.
This example uses USDT on Tron mainnet.Build, sign, and broadcast the transfer
Build the TRC-20 transfer locally, sign the The broadcast response includes a nested
txID with Privy, and broadcast through the Transatron RPC. The Spender key on the connection handles fee payment automatically.transatron object. Fields can vary by mode and API
version (for example tx_fee_rtrx_account, code, or zero-fee counters), but the key signal
is a sponsored/free-fee outcome instead of a Tron burn from the sender wallet.Operating the business account
Use the following Transatron API endpoints to check account balance, review spending history, and fetch current pricing.Check account balance
Check account balance
Query the current TFN/TFU balance available for sponsoring transactions:
View spending history
View spending history
Retrieve recent fee charges against the account to audit per-transaction costs:
Check current prices
Check current prices
Read pricing from the same
GET /api/v1/config response:These account-management endpoints require the ADMIN (spender) API key. For full endpoint details,
see the Transatron account management
docs.

