π¨βπ» Get Ethereum transaction by hash
Code samples
GET /api/v1/eth/transactions/{hash}
curl 'https://settla.net/api/v1/eth/transactions/0x086740aabf9d0749ce8fb7257b334631457e33c85b547b347c7cf3e6cabe1c65' \
-H 'X-API-Key: $SETTLA_API_KEY' \
-H 'Accept: application/json'
Returns the transaction as eth_getTransactionByHash gives it β every numeric field is a hex QUANTITY string, not a number.
This tells you what was submitted, not what happened. A transaction that reverted still appears here, complete and normal-looking. Only the receipt carries status. To decide whether a payment went through you need both calls: this one to see the transaction exists, and GET /api/v1/eth/transactions/{hash}/receipt to see status is 0x1.
While the transaction is still in the mempool, blockHash, blockNumber and transactionIndex are null and the receipt endpoint answers 404. That is the state to poll on after a broadcast.
value is in wei and routinely exceeds 2^53, so parse it as a big integer. input is 0x for a plain ETH transfer; for an ERC-20 transfer value is 0x0 and the real amount is encoded in input β see the Ethereum notes on decoding it.
π οΈ Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| hash | path | string | true | Transaction hash, 0x-prefixed, 32 bytes. Anything that is not valid hex is passed to the node and comes back as 500, not 400. |
Example responses
200 Response β Confirmed EIP-1559 (type 0x2) contract call with an access list
{
"blockHash": "0x64b665414720230df4845b01ff7b9a5c7a5c5ad89ef398eb82ecb8e8138a82a8",
"blockNumber": "0x18ae5c0",
"blockTimestamp": "0x6a96526f",
"from": "0x315d2ee4fccda0def532ef4108ff57204f8d9eba",
"gas": "0x3296e",
"gasPrice": "0x15baa5e45e",
"maxPriorityFeePerGas": "0x15b8785372",
"maxFeePerGas": "0x15baa5e45e",
"hash": "0x086740aabf9d0749ce8fb7257b334631457e33c85b547b347c7cf3e6cabe1c65",
"input": "0x742a778301019f4846679287e7c8da0e8e61f08eb378b6d5f3cf00000000000000000003a4f852ee3e26a0000000000000037a209f750b95954351013dd49f67e9d5bc4c5e6634b3f70bfd9dc1b6bd740004000000000000037a209f750b959543510000",
"nonce": "0xc2b87",
"to": "0x447a03c131c0a97a8b8d548e3cd81aec4ce05d73",
"transactionIndex": "0x0",
"value": "0x0",
"type": "0x2",
"accessList": [
{
"address": "0x3845badade8e6dff049820680d1f14bd3903a5d0",
"storageKeys": [
"0x9f5ea555fe5cf6f91d0bff038518386d7916c8daa1f52b1a3695e82d064c5f88",
"0xf5ba6c7c5c3768fb8315f89db4fe4fb8a679268a11cc4c10704f94fc25234d48"
]
},
{
"address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"storageKeys": [
"0x062d535bce2b3dcc6826b4e346b04cd5ac84141277927389cdd6c0faf668c97b",
"0xa2952a1ed275dcc0d33f8c403a68a9224340ad945dae5a9294335c9b6d18b305"
]
}
],
"chainId": "0x1",
"v": "0x0",
"yParity": "0x0",
"r": "0x37a38d9d24c38d1c22895cf075c74526213547ed543ca8d0bcea9ef941ed2e0f",
"s": "0x13a09d7ff41464b9e1925e340d28c5849a7467a711388104b4a2a60f9e82926f"
}
200 Response β Still in the mempool β blockHash, blockNumber and transactionIndex are null. Constructed for illustration: a pending transaction cannot be captured after the fact.
{
"blockHash": null,
"blockNumber": null,
"transactionIndex": null,
"from": "0x315d2ee4fccda0def532ef4108ff57204f8d9eba",
"to": "0x447a03c131c0a97a8b8d548e3cd81aec4ce05d73",
"hash": "0x086740aabf9d0749ce8fb7257b334631457e33c85b547b347c7cf3e6cabe1c65",
"nonce": "0xc2b87",
"value": "0x0",
"gas": "0x3296e",
"maxFeePerGas": "0x15baa5e45e",
"maxPriorityFeePerGas": "0x15b8785372",
"input": "0x",
"type": "0x2",
"chainId": "0x1"
}
404 Response
{
"error": "Transaction not found"
}
500 Response
{
"error": "Could not connect to ETH node."
}
π Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Ethereum transaction | Inline |
| 404 | Not Found | The node does not know this hash. Either it never existed, or it was dropped from the mempool before being mined β a broadcast transaction that disappears here has not been included and will need re-sending. | Inline |
| 500 | Internal Server Error | Node unreachable, or the hash is not valid hex. A malformed hash is not validated locally β it is forwarded to the node, whose rejection is reported as Could not connect to ETH node.. | Inline |
π Response Schema
Status Code 200
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| Β» hash | string | false | none | Transaction hash. |
| Β» nonce | string | false | none | Nonce as hex QUANTITY. |
| » blockHash | string¦null | false | none | none |
| » blockNumber | string¦null | false | none | none |
| » transactionIndex | string¦null | false | none | none |
| Β» from | string | false | none | Sender address. |
| » to | string¦null | false | none | Recipient address, or null for contract creation. |
| Β» value | string | false | none | Amount of wei sent, as hex QUANTITY. |
| Β» gas | string | false | none | none |
| » gasPrice | string¦null | false | none | none |
| » maxFeePerGas | string¦null | false | none | none |
| » maxPriorityFeePerGas | string¦null | false | none | none |
| Β» input | string | false | none | Input data (call data) as hex string. |
| Β» type | string | false | none | Transaction type (0x0 legacy, 0x1, 0x2, 0x3...) |
| » chainId | string¦null | false | none | none |
| Β» v | string | false | none | none |
| Β» r | string | false | none | none |
| Β» s | string | false | none | none |
Status Code 404
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| Β» error | string | false | none | none |
Status Code 500
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| Β» error | string | false | none | none |