---
title: "eth_getTransactionReceipt"
description: "Returns the receipt of a transaction by hash (Ethereum)"
url: "https://blockreq.com/docs/build/api-reference/ethereum/eth_getTransactionReceipt/"
---

# eth_getTransactionReceipt

**Network:** Ethereum · Mainnet · Chain ID `1` (`0x1`)

**Counts as 1 request.** See [Request Counting](https://blockreq.com/docs/pricing/request-counting/index.md).

Returns the receipt of a transaction by transaction hash. Receipts are not available for pending transactions.

## Parameters

1. `DATA` (32 bytes) — Hash of a transaction.

## Returns

`Object|null` — A transaction receipt object, or `null` when no receipt was found.

| Field             | Type     | Description                               |
| ----------------- | -------- | ----------------------------------------- |
| transactionHash   | DATA     | Transaction hash                          |
| blockHash         | DATA     | Block hash                                |
| blockNumber       | QUANTITY | Block number                              |
| from              | DATA     | Sender address                            |
| to                | DATA     | Recipient (null for contract creation)    |
| contractAddress   | DATA     | Created contract address (null otherwise) |
| gasUsed           | QUANTITY | Gas used by this tx                       |
| cumulativeGasUsed | QUANTITY | Total gas in block up to this tx          |
| status            | QUANTITY | `0x1` (success) or `0x0` (failure)        |
| logs              | Array    | Log objects generated by this tx          |

## Request

```json
{
  "jsonrpc": "2.0",
  "method": "eth_getTransactionReceipt",
  "params": ["0x88df016429689c079f3b2f6ad39fa052532c56795b733da78a91ebe6a713944b"],
  "id": 1
}
```

## Code Examples

**cURL**

```bash
curl -X POST https://ethereum-rpc.blockreq.com/v1/rpc/public \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"eth_getTransactionReceipt","params":["0x88df016429689c079f3b2f6ad39fa052532c56795b733da78a91ebe6a713944b"],"id":1}'
```

**TypeScript**

```typescript
const response = await fetch("https://ethereum-rpc.blockreq.com/v1/rpc/public", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
  "jsonrpc": "2.0",
  "method": "eth_getTransactionReceipt",
  "params": [
    "0x88df016429689c079f3b2f6ad39fa052532c56795b733da78a91ebe6a713944b"
  ],
  "id": 1
}),
});
const data = await response.json();
console.log(data.result);
```

**Python**

```python
import requests

response = requests.post(
    "https://ethereum-rpc.blockreq.com/v1/rpc/public",
    json={
  "jsonrpc": "2.0",
  "method": "eth_getTransactionReceipt",
  "params": [
    "0x88df016429689c079f3b2f6ad39fa052532c56795b733da78a91ebe6a713944b"
  ],
  "id": 1
}
)
print(response.json()["result"])
```

**Go**

```go
package main

import (
	"bytes"
	"encoding/json"
	"fmt"
	"io"
	"net/http"
)

func main() {
	payload := []byte(`{"jsonrpc":"2.0","method":"eth_getTransactionReceipt","params":["0x88df016429689c079f3b2f6ad39fa052532c56795b733da78a91ebe6a713944b"],"id":1}`)
	resp, err := http.Post(
		"https://ethereum-rpc.blockreq.com/v1/rpc/public",
		"application/json",
		bytes.NewBuffer(payload),
	)
	if err != nil {
		panic(err)
	}
	defer resp.Body.Close()

	body, _ := io.ReadAll(resp.Body)
	var result map[string]interface{}
	json.Unmarshal(body, &result)
	fmt.Println(result["result"])
}
```

**viem**

```typescript
import { createPublicClient, http } from "viem";

const client = createPublicClient({
  transport: http("https://ethereum-rpc.blockreq.com/v1/rpc/public"),
});

const result = await client.request({
  method: "eth_getTransactionReceipt",
  params: ["0x88df016429689c079f3b2f6ad39fa052532c56795b733da78a91ebe6a713944b"],
});
console.log(result);
```

**Foundry**

```bash
cast rpc --rpc-url https://ethereum-rpc.blockreq.com/v1/rpc/public eth_getTransactionReceipt 0x88df016429689c079f3b2f6ad39fa052532c56795b733da78a91ebe6a713944b
```

**Hardhat**

```javascript
const { ethers } = require("hardhat");

async function main() {
  const provider = new ethers.JsonRpcProvider("https://ethereum-rpc.blockreq.com/v1/rpc/public");
  const result = await provider.send("eth_getTransactionReceipt", ["0x88df016429689c079f3b2f6ad39fa052532c56795b733da78a91ebe6a713944b"]);
  console.log(result);
}

main();
```
