π¨βπ» Get Ethereum transaction receipt by hash
Code samples
GET /api/v1/eth/transactions/{hash}/receipt
curl 'https://settla.net/api/v1/eth/transactions/0x086740aabf9d0749ce8fb7257b334631457e33c85b547b347c7cf3e6cabe1c65/receipt' \
-H 'X-API-Key: $SETTLA_API_KEY' \
-H 'Accept: application/json'
Returns eth_getTransactionReceipt β the outcome of a mined transaction. This is the endpoint that answers "did it work?".
status is the only field that says success or failure. 0x1 succeeded, 0x0 reverted. A reverted transaction is still mined, still charged the gas in gasUsed, and still returns 200 here with an empty logs array. Treating "receipt exists" as "payment received" is the classic way to credit a customer for a transfer that never happened.
A 404 means the transaction is not mined yet (or is unknown). After a broadcast, poll here until you get a 200, then check status.
For an ERC-20 payment the amount is not in the transaction's value, it is in logs. Look for an entry whose address is the token contract and whose topics[0] is the Transfer signature 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef; then topics[1] is the sender, topics[2] the recipient (both left-padded to 32 bytes) and data the raw amount in the token's own units. Always confirm address matches the contract you expect β anyone can emit a Transfer log from a worthless contract.
contractAddress is non-null only when the transaction deployed a contract.
π οΈ Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| hash | path | string | true | Transaction hash, 0x-prefixed, 32 bytes. |
Example responses
200 Response β Mined and successful β status 0x1, with two ERC-20 Transfer logs
{
"blockHash": "0x64b665414720230df4845b01ff7b9a5c7a5c5ad89ef398eb82ecb8e8138a82a8",
"blockNumber": "0x18ae5c0",
"contractAddress": null,
"cumulativeGasUsed": "0x1987f",
"effectiveGasPrice": "0x15baa5e45e",
"from": "0x315d2ee4fccda0def532ef4108ff57204f8d9eba",
"gasUsed": "0x1987f",
"logs": [
{
"address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x000000000000000000000000447a03c131c0a97a8b8d548e3cd81aec4ce05d73",
"0x0000000000000000000000003dd49f67e9d5bc4c5e6634b3f70bfd9dc1b6bd74"
],
"data": "0x00000000000000000000000000000000000000000000000003a4f852ee3e26a0",
"blockNumber": "0x18ae5c0",
"transactionHash": "0x086740aabf9d0749ce8fb7257b334631457e33c85b547b347c7cf3e6cabe1c65",
"transactionIndex": "0x0",
"blockHash": "0x64b665414720230df4845b01ff7b9a5c7a5c5ad89ef398eb82ecb8e8138a82a8",
"logIndex": "0x0",
"removed": false,
"blockTimestamp": "0x6a96526f"
},
{
"address": "0x3845badade8e6dff049820680d1f14bd3903a5d0",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x0000000000000000000000003dd49f67e9d5bc4c5e6634b3f70bfd9dc1b6bd74",
"0x0000000000000000000000009f4846679287e7c8da0e8e61f08eb378b6d5f3cf"
],
"data": "0x00000000000000000000000000000000000000000000037a209f750b95954351",
"blockNumber": "0x18ae5c0",
"transactionHash": "0x086740aabf9d0749ce8fb7257b334631457e33c85b547b347c7cf3e6cabe1c65",
"transactionIndex": "0x0",
"blockHash": "0x64b665414720230df4845b01ff7b9a5c7a5c5ad89ef398eb82ecb8e8138a82a8",
"logIndex": "0x1",
"removed": false,
"blockTimestamp": "0x6a96526f"
}
],
"logsBloom": "0x00200000000000000000000080000004000000000000000000000000000000000000000000000000000000000000000002000000080020000000000000000000β¦",
"status": "0x1",
"to": "0x447a03c131c0a97a8b8d548e3cd81aec4ce05d73",
"transactionHash": "0x086740aabf9d0749ce8fb7257b334631457e33c85b547b347c7cf3e6cabe1c65",
"transactionIndex": "0x0",
"type": "0x2"
}
200 Response β Mined but reverted β status 0x0, gas still charged, logs empty. Constructed for illustration; the hash is the one above, which in reality succeeded.
{
"blockHash": "0x64b665414720230df4845b01ff7b9a5c7a5c5ad89ef398eb82ecb8e8138a82a8",
"blockNumber": "0x18ae5c0",
"contractAddress": null,
"cumulativeGasUsed": "0x3296e",
"effectiveGasPrice": "0x15baa5e45e",
"from": "0x315d2ee4fccda0def532ef4108ff57204f8d9eba",
"gasUsed": "0x3296e",
"logs": [],
"logsBloom": "0x0000000000000000000000000000000000000000000000000000000000000000β¦",
"status": "0x0",
"to": "0x447a03c131c0a97a8b8d548e3cd81aec4ce05d73",
"transactionHash": "0x086740aabf9d0749ce8fb7257b334631457e33c85b547b347c7cf3e6cabe1c65",
"transactionIndex": "0x0",
"type": "0x2"
}
404 Response
{
"error": "Transaction receipt not found"
}
500 Response
{
"error": "Could not connect to ETH node."
}
π Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Ethereum transaction receipt | Inline |
| 404 | Not Found | No receipt. Normal for a transaction that is still pending β keep polling. Also returned for a hash the node has never seen. | Inline |
| 500 | Internal Server Error | Node unreachable, or the hash is not valid hex. | Inline |
π Response Schema
Status Code 200
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| Β» transactionHash | string | false | none | none |
| Β» transactionIndex | string | false | none | none |
| Β» blockHash | string | false | none | none |
| Β» blockNumber | string | false | none | none |
| Β» from | string | false | none | none |
| » to | string¦null | false | none | none |
| Β» cumulativeGasUsed | string | false | none | none |
| Β» effectiveGasPrice | string | false | none | none |
| Β» gasUsed | string | false | none | none |
| » contractAddress | string¦null | false | none | none |
| Β» logs | [object] | false | none | none |
| »» address | string | false | none | none |
| »» topics | [string] | false | none | none |
| »» data | string | false | none | none |
| »» blockNumber | string | false | none | none |
| »» transactionHash | string | false | none | none |
| »» transactionIndex | string | false | none | none |
| »» blockHash | string | false | none | none |
| »» logIndex | string | false | none | none |
| »» removed | boolean | false | none | none |
| Β» logsBloom | string | false | none | none |
| Β» status | string | false | none | 0x1 for success, 0x0 for failure. |
| Β» type | 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 |