eth_getTransactionReceipt — Ethereum JSON-RPC

Status: Available

Returns the receipt of a transaction by its hash — including execution status, gas used, emitted logs, and (for contract deployments) the new contract address.

POSThttps://triport.io/eth
Network
Ethereum
Scope
eth_read_rpc
Auth
x-token: $TRIPORT_API_KEY (or Authorization: Bearer)
Rate limit
free — 10 RPS sustained · up to 20 burst (basic 20, pro 100, business 250); Burst capacity

Endpoint and plans: Ethereum RPC endpoint.

eth_getTransactionReceipt retrieves the receipt produced when a transaction was mined into a block. The receipt is the authoritative record of what actually happened on-chain: whether the transaction succeeded, how much gas it consumed, the logs (events) it emitted, and — when the transaction created a contract — the address of the deployed contract.

Use this method to confirm a transaction's outcome after you have submitted it with eth_sendRawTransaction. A common pattern is to poll this method with the transaction hash until a non-null receipt is returned, then read status to determine success or failure.

The method returns null when the transaction is still pending (not yet mined) or unknown (never seen by the node, or dropped from the mempool). A null result is not an error — it simply means there is no receipt yet. Note that a non-null receipt does not by itself guarantee finality; for high-value flows, wait for a sufficient number of block confirmations after the receipt appears.

Parameters

eth_getTransactionReceipt takes a single positional parameter.

transactionHashstring (32-byte hex, 0x-prefixed)required
Hash of the transaction whose receipt you want to fetch.

Response

For a pending or unknown transaction:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": null
}
statusstring (hex)
0x1 if the transaction succeeded, 0x0 if it was reverted.
transactionHashstring
Hash of the transaction.
transactionIndexstring (hex)
Index of the transaction within its block.
blockHashstring
Hash of the block containing the transaction.
blockNumberstring (hex)
Number of the block containing the transaction.
fromstring
Sender address.
tostring | null
Recipient address; null for contract-creation transactions.
gasUsedstring (hex)
Gas used by this transaction alone.
cumulativeGasUsedstring (hex)
Total gas used in the block up to and including this transaction.
effectiveGasPricestring (hex)
Actual gas price paid per unit of gas, in wei.
contractAddressstring | null
Address of the contract created, if this was a deployment; otherwise null.
logsarray
List of log (event) objects emitted by the transaction.
logsBloomstring
Bloom filter over the logs, for fast log lookups.
typestring (hex)
Transaction type (0x0 legacy, 0x1 access-list, 0x2 EIP-1559).

Errors

Errors are returned in the standard JSON-RPC envelope (error.code + error.message). See errors.md for the full envelope and shared codes.

CodeMeaningWhen it happens
401trial_expiredThe API key's trial period has ended; upgrade to a paid tier to continue.
429rate_limitedYou exceeded the requests-per-second limit for your tier. Back off and retry.

A non-existent or still-pending transaction is not an error — the call succeeds with "result": null.

Examples

JavaScript (fetch)

const res = await fetch("https://triport.io/eth", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.TRIPORT_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    jsonrpc: "2.0",
    id: 1,
    method: "eth_getTransactionReceipt",
    params: ["0x1f2a90d6c0a8b4d7c9e3f1a2b3c4d5e6f70819203a4b5c6d7e8f90112233e9c4"],
  }),
});


const { result } = await res.json();
if (result === null) {
  console.log("Transaction is pending or unknown");
} else {
  console.log("Succeeded?", result.status === "0x1");
  console.log("Gas used:", parseInt(result.gasUsed, 16));
}

Notes

  • Polling for confirmation. After submitting a transaction, poll this method with the returned hash until you get a non-null receipt, then inspect status. Add a short backoff between polls to stay within your tier's RPS limit.
  • Reverted transactions still get a receipt. A status of 0x0 means the transaction was mined but reverted — gas was still consumed. Always check status rather than assuming a non-null receipt implies success.
  • Contract deployments. When a transaction creates a contract, to is null and contractAddress holds the new contract's address.
  • All numeric fields are hex strings. Convert with parseInt(value, 16) (JS) or int(value, 16) (Python) before doing arithmetic.
  • Rate limits are enforced per second per tier (no daily cap). On HTTP 429, honor exponential backoff rather than retrying immediately.
  • Related methods: eth_getTransactionByHash (the transaction itself, available before it is mined), eth_sendRawTransaction (submit a transaction), and eth_getLogs (query events across many blocks).
  • Null result? A null receipt is not an error — see why eth_getTransactionReceipt returns null for pending, replaced and out-of-index transactions.