> For the complete documentation index, see [llms.txt](https://docs.tajirchain.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tajirchain.com/etherscan-compatible-explorer-api/transaction.md).

# Transaction

The Transaction module retrieves indexed transaction details, execution status and error information.

### Endpoint

```
https://explorer.tajirchain.com/api?module=transaction
```

### Available Actions

| Action               | Purpose                              |
| -------------------- | ------------------------------------ |
| `gettxinfo`          | Get complete transaction information |
| `gettxreceiptstatus` | Get transaction receipt status       |
| `getstatus`          | Get execution error status           |

### Get Transaction Information

#### Action

```
gettxinfo
```

| Parameter | Required | Description                       |
| --------- | -------- | --------------------------------- |
| `txhash`  | Yes      | Transaction hash                  |
| `index`   | No       | Log index used for log pagination |

```bash
curl "https://explorer.tajirchain.com/api?module=transaction&action=gettxinfo&txhash=0xTRANSACTION_HASH"
```

The result can contain:

* Block number
* Confirmation count
* Sender
* Recipient
* Gas limit
* Gas price
* Gas used
* Transaction hash
* Input data
* Event logs
* Revert reason
* Execution success
* Timestamp
* Transferred value

Example response structure:

```json
{
  "message": "OK",
  "result": {
    "blockNumber": "653227",
    "confirmations": "100",
    "from": "0x...",
    "gasLimit": "1000000",
    "gasPrice": "0",
    "gasUsed": "46254",
    "hash": "0x...",
    "input": "0x...",
    "logs": [],
    "revertReason": "",
    "success": true,
    "timeStamp": "1787841434",
    "to": "0x...",
    "value": "0"
  },
  "status": "1"
}
```

### Get Transaction Receipt Status

#### Action

```
gettxreceiptstatus
```

| Parameter | Required | Description      |
| --------- | -------- | ---------------- |
| `txhash`  | Yes      | Transaction hash |

```bash
curl "https://explorer.tajirchain.com/api?module=transaction&action=gettxreceiptstatus&txhash=0xTRANSACTION_HASH"
```

Example successful response:

```json
{
  "message": "OK",
  "result": {
    "status": "1"
  },
  "status": "1"
}
```

Receipt status:

| Value | Meaning                         |
| ----- | ------------------------------- |
| `0`   | Transaction execution failed    |
| `1`   | Transaction execution succeeded |

### Get Transaction Error Status

#### Action

```
getstatus
```

| Parameter | Required | Description      |
| --------- | -------- | ---------------- |
| `txhash`  | Yes      | Transaction hash |

```bash
curl "https://explorer.tajirchain.com/api?module=transaction&action=getstatus&txhash=0xTRANSACTION_HASH"
```

Successful transaction:

```json
{
  "message": "OK",
  "result": {
    "errDescription": "",
    "isError": "0"
  },
  "status": "1"
}
```

Failed transaction:

```json
{
  "message": "OK",
  "result": {
    "errDescription": "Execution reverted",
    "isError": "1"
  },
  "status": "1"
}
```

Error values:

| Value | Meaning            |
| ----- | ------------------ |
| `0`   | No execution error |
| `1`   | Transaction failed |

A transaction may temporarily return no result if it has not yet been indexed.
