# GetTransactionInfoById

Query the transaction fee, block height by transaction id. (Confirmed state).

This method will use `30` [Compute Units](/v1/about/billing.md).

***

## **Parameters**

* `value` - String - <mark style="color:red;">Required</mark> - transaction ID

## **Returns**

This interface returns a TransactionInfo object, which contains the following fields:

| Filed                      | Type                   | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| -------------------------- | ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| id                         | string                 | Transaction ID                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| fee                        | int64                  | The total number of TRX burned in this transaction, including TRX burned for bandwidth/energy, memo fee, account activation fee, multi-signature fee and other fees                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| blockNumber                | int64                  | The block number                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| blockTimeStamp             | int64                  | The block timestamp, the unit is millisecond                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| contractResult             | string\[]              | Transaction Execution Results                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| contract\_address          | string                 | Contract address                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| receipt                    | ResourceReceipt        | <p>Transaction receipt, including transaction execution result and transaction fee details, which contains the following fields:<br><br>1. <code>energy\_usage</code>: the amount of energy consumed in the caller's account<br>2. <code>energy\_fee</code>: the amount of TRX burned to pay for energy<br>3. <code>origin\_energy\_usage</code>: the amount of energy consumed in the contract deployer's account<br>4. <code>energy\_usage\_total</code>: The total amount of energy consumed by the transaction<br>5. <code>net\_usage</code>: The amount of bandwidth consumed<br>6. <code>net\_fee</code>: The amount of TRX burned to pay for the bandwidth<br>7. <code>result</code>: transaction execution result<br>8. <code>energy\_penalty\_total</code>: The amount of extra energy that needs to be paid for calling a few popular contracts</p> |
| log                        | Log\[]                 | <p>The log of events triggered during the smart contract call, each log includes the following information:<br><br>1. <code>address</code>: Contract address. In order to be compatible with EVM, the address in TVM is a hex format address without the prefix 0x41, so if you want to parse the address in the log, you need to add 41 to the beginning of the log address , and then convert it to Base58 format.<br>2. <code>topics</code>: The topic of the event, including the event itself and parameters marked as indexed.<br>3. <code>data</code>: Non-indexed parameters of events.</p>                                                                                                                                                                                                                                                           |
| result                     | int                    | Execution results. If the execution is successful, the field will not be displayed in the returned value, if the execution fails, the field will be "FAILED"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| resMessage                 | string                 | When the transaction execution fails, the details of the failure will be returned through this field. Hex format, you can convert it to a string to get plaintext information.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| withdraw\_amount           | int64                  | For the withdrawal reward transaction、unfreeze transaction, they will withdraw the vote reward to account. The number of rewards withdrawn to the account is returned through this field, and the unit is sun                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| unfreeze\_amount           | int64                  | In the Stake1.0 stage, for unstaking transactions, this field returns the amount of unstaked TRX, the unit is sun                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| internal\_transactions     | InternalTransaction\[] | [Internal transaction](https://developers.tron.network/docs/tron-protocol-transaction#internal-transactions)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| withdraw\_expire\_amount   | int64                  | In the Stake2.0 stage, for unstaking transaction and withdrawing unfrozen balance transaction, and cancelling all unstakes transaction, this field returns the amount of unfrozen TRX withdrawn to the account in this transaction, the unit is sun                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| cancel\_unfreezeV2\_amount | map\<string, int64>    | The amount of TRX re-staked to obtain various types of resources, in sun, that is, the amount of unstaked principal that has been canceled, the key is: "BANDWIDTH" or "ENERGY" or "TRON\_POWER"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |

```json
// Result
{
	"id": "82ef30148057b4df12d601da3b4956dc22544f5f9cdaeb03b23371becbf669e9",
	"blockNumber": 75957003,
	"blockTimeStamp": 1758531090000,
	"contractResult": [
		""
	],
	"receipt": {
		"net_usage": 268
	}
}
```

{% tabs %}
{% tab title="mainnet" %}

```bash
curl https://mainnet.tron.validationcloud.io/v1/<YOUR_API_KEY_HERE>/walletsolidity/gettransactioninfobyid \
    -X POST \
    -H "Content-Type: application/json" \
    -d '
{
  "value": "82ef30148057b4df12d601da3b4956dc22544f5f9cdaeb03b23371becbf669e9"
}
'
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.validationcloud.io/v1/tron/tron-solidity-api/transactions/gettransactioninfobyid.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
