v1

latestOpenAPI 3.0.32026-07-1320201.0 MB
Tron Paymaster

Create Paymaster Request

This endpoint is used to create a new paymaster request.

post/api/v2/tron/paymaster

Headers

X-Network'testnet' | 'mainnet'

Specify "testnet" for test network or leave empty for main network. Defaults to "mainnet" if not provided.

Authorizationstring required

Bearer token for authorization. Required for authenticated endpoints.

Content-Type'application/json' | 'application/x-www-form-urlencoded' | 'multipart/form-data' required

The MIME type of the request body.

Request body

type'TRX' | 'TRC10' | 'TRC20' | 'TRC721' required

The type of transaction.

fromstring required

The address to send the transaction from.

tostring required

The address to send the transaction to.

contractaddressstring

The contract address of the token. This field is required when <code>type</code> is <code>TRC20</code> or <code>TRC721</code>.

tokenidnumber

The token id of the token. This field is required when <code>type</code> is <code>TRC721</code> or <code>TRC10</code>.

amountstring required

The amount to send.

passwordstring

The password for the address. This field is required when <code>privatekey</code> is not present.

privatekeystring

The private key of the sender.

callback_urlstring

The callback url to send the response to.

Example request

{
  "type": "TRC20",
  "from": "TLkkCeNdJKPNUwucdro84WjswkzM62LCTH",
  "to": "TUwmZghA7u2GxGxKaxM1mkCmsTF4wHs4vp",
  "contractaddress": "0x708c419d1b9ae123047f70787a503b6ba51e048a27966e0220cc5feXXXXXXXXX",
  "tokenid": 1,
  "amount": "1",
  "password": "your_password",
  "privatekey": "708c419d1b9ae123047f70787a503b6ba51e048a27966e0220cc5feXXXXXXXXX",
  "callback_url": "https://example.com/callback"
}

Response

Succesfully created paymaster requests

statusinteger
okboolean
messagestring

Example response

{
  "status": 200,
  "ok": true,
  "message": "Successfully created paymaster request",
  "data": {
    "id": "9c72d676-8180-4cd2-a406-f0f1cd097506"
  }
}