Skip to main content

Integration: Instant Payments

Prerequisites

  1. Obtain an API key.
    Contact info@transatron.io or Telegram Support.

    • The API key is used only to differentiate traffic and allocate cashback to wallets.
    • It is not used for authentication or transaction signing.
  2. Use the Transatron node for all TRON operations.
    Not just /broadcasttransaction, but also resource estimation and monitoring.


Flow: Sending Transactions with Instant Payments

  1. Estimate resources
    Call /triggersmartcontract to estimate resources required for the user’s transaction.

  2. Parse Transatron response
    In the JSON response, Transatron adds a transatron object with fee data:

    • tx_fee_rtrx_instant → TRX fee required
    • tx_fee_rusdt_instant → USDT fee required
  3. Create payment transaction

    • Prepare a TRX or USDT payment transaction to the Transatron payment address.
    • The amount must equal the required fee (tx_fee_rtrx_instant or tx_fee_rusdt_instant).
    • Sign it with the wallet’s private key.
  4. Prepare the user transaction

    • Construct and sign the transaction the user actually wants to broadcast.
  5. Broadcast transactions sequentially

    • First send the payment transaction.
    • Wait until Transatron acknowledges it.
    • Then send the user transaction.
  6. Monitor

    • Receive the transaction hash.
    • Track confirmations as usual.
tip

Instant payments work with both TRX and USDT, but TRX is cheaper and recommended by default.


Handling Errors

  1. Underpriced payment

    • If the payment transaction does not cover the required fee, Transatron returns INSTANT_PAYMENT_UNDERPRICED.
    • The user transaction is not broadcasted.
    • Fix: re-estimate with /triggersmartcontract, re-create the payment transaction, and try again.
  2. Payment transaction failure

    • If the payment transaction itself fails, Transatron does not broadcast the user transaction.
    • Error returned: NOT_ENOUGH_FUNDS (with message).

What if the User Doesn’t Want to Use Instant Payment?

You can simply prepare, sign, and broadcast the transaction via Transatron without an instant payment.

  • Transatron will bypass fee coverage.
  • The transaction is forwarded to TRON as-is.
  • Fees will be charged directly by TRON (either by burning TRX or using staked resources).

How to Get TRX If a User Only Has USDT?

Transatron provides an instant USDT → TRX swap service:

  • Send a USDT transfer from the user’s address to: TTTgXpHNbw8UcNa8N2weZtqCuhxJFuqSD5
  • TRX is returned to the same address.

Constraints:

  • Minimum amount: 3 USDT
  • Fees:
  • 2 USDT fixed (to cover the USDT transfer itself)
  • +1% service fee
  • Exchange rate: taken from the SunSwap V2 pool.

Additional Information

  1. Example flows: Transatron TronWeb Examples (GitHub)
  2. Guide: Preparing and Broadcasting Transactions
  3. API reference: Extended RPC Calls