Ethereum

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 status field to confirm whether a transaction succeeded (0x1) or reverted (0x0) after a validator included it.
  • Pull the logs array to decode emitted events, such as an ERC-20 Transfer or a Uniswap Swap, and update your application state from them.
  • Grab contractAddress after 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

#NameTypeRequiredDescription
1transactionHashstring (hex)YesThe hash of the mined transaction.

Response

TypeDescription
object | nullReceipt 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

curl https://ethereum.therpc.io/YOUR_API_KEY \
-X POST \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_getTransactionReceipt",
"params": ["0x0000000000000000000000000000000000000000000000000000000000000000"],
"id": 1
}'

Try it live in the Ethereum playground.

Errors & troubleshooting

CodeMessageCause
-32602Invalid paramsTransaction 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 status of 0x0 does 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_getBlockReceipts returns 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

curl https://ethereum.therpc.io/YOUR_API_KEY \
-X POST \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"eth_getTransactionReceipt","params":[""]}'

Ready to call this in production?

Free tier covers personal projects. Pay-as-you-go scales without a card.