Resources
Transatron docs
Official Transatron integration documentation.
Tron transaction signing
How Privy signs Tron transactions.
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:
All modes except bypass rely on broadcasting through the Transatron RPC. Submitting the same signed transaction to a vanilla Tron node bypasses Transatron’s resource delegation logic, and Tron charges fees as usual.
This recipe focuses on the internal account mode — the simplest integration path. Broadcasting through the RPC with a Spender key is all that’s needed to sponsor fees. For other modes, see the Transatron integration guide.
1. Create a Tron wallet for the user
Privy supports Tron at the Tier 3 level. Create a wallet withchain_type: 'tron'. The wallet
address can receive TRX, USDT, and other TRC-20 assets.
Use
useCreateWallet from the extended-chains entrypoint to provision a Tron wallet for a logged-in user.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
For server-side signing, use Privy’s structuredtron_signTransaction method. It returns a complete signed transaction with the required 65-byte signature that you can submit directly to Transatron. For client-side signing, use useSignRawHash; the server must attach the recovery byte before broadcasting. Building and broadcasting stay on the server because both require the Transatron API key.
Call The corresponding server helper attaches the recovery byte after receiving the signature from the client:
useSignRawHash with chainType: 'tron' to have the user’s embedded wallet sign the transaction’s txID. Send the returned 64-byte signature back to your server, which will attach the recovery byte and broadcast.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 usingtron_signTransaction. If signing happens in a React client (per step 3), build the transaction with TronWeb, return its txID to the client, receive the 64-byte signature, finalize it with attachTronSignature(...), and broadcast via /wallet/broadcasttransaction instead.
1
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.2
Build, sign, and broadcast the transfer
Encode the TRC-20 transfer, sign it with Privy’s structured Tron method, and broadcast the signed transaction through the Transatron RPC. The Spender key on the connection handles fee payment automatically.The broadcast response includes a nested
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.3
Orchestrate the full flow
Chain the helpers from the previous steps to send a sponsored TRC-20 transfer. With
internal-account sponsorship, transaction fees can be covered by Transatron instead of burning
TRX 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.

