Skip to main content

Transaction APIs

Prepare Transaction​

Create a new transaction session.

POST /dapp/prepare-transaction

Headers​

HeaderValueDescription
client_idYOUR_CLIENT_IDYour unique client ID
client_secretYOUR_SECRET_KEYYour secret key
content-typeapplication/jsonContent type of the request

Body​

The request accepts a transaction session schema with transaction details. The schema includes necessary information to prepare the transaction for signing.

{
"walletAddress": "0x...", // Ethereum address of the wallet (required)
"contractAddress": "0x...", // Ethereum address of the contract (required)
"functionName": "transfer", // Name of the function to call (required)
"functionArgs": ["0x...", "1000000000000000000"], // Array of function arguments as strings (required)
"redirectUrl": "https://..." // Optional URL to redirect after transaction (optional)
}
FieldTypeRequiredDescription
walletAddressstringYesEthereum address of the wallet initiating the transaction
contractAddressstringYesEthereum address of the contract to interact with
functionNamestringYesName of the function to call on the contract
functionArgsarrayYesArray of function arguments as strings
redirectUrlstringNoURL to redirect after transaction completion

Response​

Returns the prepared transaction session details.

{
"sessionId": "clq...",
"transactionObject": {
"transaction": {
"chainId": 1,
"gasLimit": 21000,
"gasPrice": 20000000000,
"nonce": 5,
"to": "0x...",
"value": "0",
"data": "0x..."
},
"fee": {
"chainId": 1,
"gasLimit": 21000,
"gasPrice": 20000000000,
"nonce": 5,
"to": "0x...",
"value": "0",
"data": "0x..."
}
},
"signingUrl": "https://example.com/sign/transaction/clq..."
}

Get Transaction Session​

Retrieve details about a specific transaction session.

GET /dapp/transaction-session/{transactionId}

Headers​

HeaderValueDescription
client_idYOUR_CLIENT_IDYour unique client ID
client_secretYOUR_SECRET_KEYYour secret key

URL Parameters​

NameTypeRequiredDescription
transactionIdstringYesID of the transaction session to retrieve

Response Status Codes​

StatusDescription
200Returns the transaction session details
404Transaction session not found