Ethereum
eth_getTransactionReceipt
eth_getTransactionReceipt returns the execution receipt for a transaction that has already been included in an Ethereum block. Where eth_getTransactionByHash shows you what was submitted, the receipt tells you what actually happened once a validator ran it on the EVM: whether it succeeded or reverted, how much gas it burned, the effectiveGasPrice the sender paid in ETH, and every log event the transaction emitted. Point your client at https://ethereum.therpc.io/YOUR_API_KEY (chain ID 1) and pass the 32-byte transaction hash. The response is a single receipt object, or null if the transaction is still sitting in the mempool and has not been mined yet.
Use cases
- Read the
statusfield to confirm whether a transaction succeeded (0x1) or reverted (0x0) after a validator included it. - Pull the
logsarray to decode emitted events, such as an ERC-20Transferor a UniswapSwap, and update your application state from them. - Grab
contractAddressafter a deployment: it is non-null only when the transaction created a contract, giving you the new address without computing it yourself. - Work out the exact ETH spent on execution as
gasUsed * effectiveGasPrice, which already accounts for the burned EIP-1559 base fee plus the validator tip.
Parameters
| # | Name | Type | Required | Description |
|---|---|---|---|---|
| 1 | transactionHash | string (hex) | Yes | The hash of the mined transaction. |
Response
| Type | Description |
|---|---|
| object | null | Receipt object containing: transactionHash, transactionIndex, blockHash, blockNumber, from, to, contractAddress (non-null only for contract deployments), gasUsed, cumulativeGasUsed, effectiveGasPrice, status ("0x1" success / "0x0" revert), logs (array of log objects), logsBloom, type. Returns null f |
Example request
Try it live in the Ethereum playground.
Errors & troubleshooting
| Code | Message | Cause |
|---|---|---|
-32602 | Invalid params | Transaction hash is malformed. |
Common pitfalls
- A pending transaction has no receipt yet, so the call returns
null. Poll on a short interval (Ethereum produces one block roughly every 12 seconds) instead of assuming the receipt is there the moment you broadcast. - A
statusof0x0does not mean nothing happened. The transaction was included on-chain and reverted; the sender still paid for the gas it consumed before the revert. - Pulling receipts one hash at a time is slow when you are ingesting a whole block.
eth_getBlockReceiptsreturns every receipt for a block in a single round trip and is far cheaper for indexing workloads.
Supported networks
- Mainnet — Chain ID: 1
- Sepolia — Chain ID: 11155111
See also
Parameters
0x-prefixed 32-byte transaction hash