> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hedera.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Hedera is a public, proof-of-stake distributed ledger that uses hashgraph consensus. Do not call it a blockchain.
> Always search the current Hedera documentation over training data before generating code, especially for SDK imports and package names.
> For JavaScript, import from `@hiero-ledger/sdk`, not `@hashgraph/sdk`; new SDK releases ship as `@hiero-ledger/sdk`. The Java SDK keeps the `com.hedera.hashgraph:sdk` Maven coordinates. Verify the exact import against the docs.
> Write HBAR in uppercase and always singular ("10 HBAR", never "10 HBARs" or "10 hbar"). Write tinybars in lowercase and plural.
> Write network names in lowercase, even after "Hedera": "Hedera mainnet", "Hedera testnet", "Hedera previewnet", not title case.
> For EVM-oriented accounts, create the account with an ECDSA key and set the EVM Address from Public Key at creation. This address is immutable and is not updated by key rotation. Do not use retired terms like "EVM alias" or "Account Number Alias".

# Get a transaction receipt

> Request a transaction receipt to confirm whether a transaction reached consensus on the Hedera network, available free of charge for up to 3 minutes after submission.

The transaction receipt gives you information about a transaction including whether or not the transaction reached consensus on the network. You request the receipt for every transaction type and there is currently no transaction fee associated with this network request.

<Info>
  Receipts can be requested from a Hedera network for up to 3 minutes.
</Info>

#### Transaction Receipt Contents

The transaction receipt returns the following information about a transaction:

* Whether the transaction reached consensus or not (success or fail)
* The newly generated account ID, topic ID, token ID, file ID, schedule ID, scheduled transaction ID or smart contract ID
* The exchange rate
* The topic running hash
* The topic sequence number
* The total supply of token
* The serial numbers for of the newly created NFTs after a token mint transaction was executed

**Transaction Signing Requirements**

* Transaction receipt requests do not have an associated fee at this time so there is no signature requirement

| **Constructor** | **Description** |
| - | - |
| `new TransactionReceiptQuery()` | Initializes the `TransactionReceiptQuery` Object |

* Transaction ID: The ID of the transaction to return the receipt for
* Include Duplicates: Whether or not to include the receipts for duplicate transactions
* Include Children: Whether or not to include the receipt for children transactions triggered by a parent transaction

<table><thead><tr><th>Method</th><th>Type</th><th>Requirement</th></tr></thead><tbody><tr><td><code>setTransactionId(\<transactionId>)</code></td><td><a href="/native/transactions/transaction-id">TransactionID</a></td><td>Required</td></tr><tr><td><code>setIncludeDuplicates(\<value>)</code></td><td>boolean</td><td>Optional</td></tr><tr><td><code>setIncludeChildren(\<value>)</code></td><td>boolean</td><td>Optional</td></tr></tbody></table>

<CodeGroup>
  ```java Java theme={null}
  new TransactionReceiptQuery()
      .setTransactionId(transactionId)
      .execute(client)
  ```

  ```javascript JavaScript theme={null}
  new TransactionReceiptQuery()
      .setTransactionId(transactionId)
      .execute(client)
  ```

  ```go Go theme={null}
  hedera.NewTransactionReceiptQuery().
      SetTransactionId(transactionId).
      Execute(client)
  ```

  ```rust Rust theme={null}
  // Get the receipt of the transaction
  let receipt = tx_response.get_receipt(&client).await?;

  println!("The transaction receipt: {:?}", receipt);

  // v0.34.0
  ```
</CodeGroup>

### Helper Methods

<table><thead><tr><th /><th /><th /></tr></thead><tbody><tr><td><strong>Method</strong></td><td><strong>Type</strong></td><td><strong>Description</strong></td></tr><tr><td><code>\<TransactionResponse>.getReceipt(\<client>)</code></td><td>TransactionReceipt</td><td>Returns the receipt of a transaction</td></tr><tr><td><code>\<TransactionResponse>.getReceipt(\<client, timeout>)</code></td><td>Client, Duration</td><td>Request the receipt from the network for this duration</td></tr><tr><td><code>\<TransactionResponse>.getReceiptQuery()</code></td><td>TransactionReceiptQuery</td><td>Returns the TransactionReceiptQuery response for a transaction. This will not error on bad status like <code>RECEIPT\_NOT\_FOUND</code> and will return information about a failed transaction if necessary.</td></tr><tr><td><code>\<TransactionResponse>.getReceiptAsync(\<client, timeout>)</code></td><td>Client, Duration</td><td>Request receipt asynchronously for the provided duration</td></tr><tr><td><code>\<TransactionReceipt>.status</code></td><td>Status</td><td>Whether the transaction reached consensus or not</td></tr><tr><td><code>\<TransactionReceipt>.accountId</code></td><td>AccountId</td><td>The newly generated account ID</td></tr><tr><td><code>\<TransactionReceipt>.topicId</code></td><td>TopicId</td><td>The newly generated topic ID</td></tr><tr><td><code>\<TransactionReceipt>).fileId</code></td><td>FileId</td><td>The newly generated file ID</td></tr><tr><td><code>\<TransactionReceipt>).contractId</code></td><td>ContractId</td><td>The newly generated contract ID</td></tr><tr><td><code>\<TransactionReceipt>).tokenId</code></td><td>TokenId</td><td>The newly generated token ID</td></tr><tr><td><code>\<TransactionReceipt>).scheduleId</code></td><td>ScheduleId</td><td>The newly generated schedule ID</td></tr><tr><td><code>\<TransactionReceipt>).scheduledTransactionId</code></td><td>TransactionId</td><td>The generated scheduled transaction ID</td></tr><tr><td><code>\<TransactionReceipt>).exchangeRate</code></td><td>ExchangeRate</td><td>The exchange rate in hbar, cents, and expiration time</td></tr><tr><td><code>\<TransactionReceipt>.topicRunningHash</code></td><td>ByteString</td><td>The topic running hash</td></tr><tr><td><code>\<TransactionReceipt>.topicSequenceNumber</code></td><td>long</td><td>The topic sequence number</td></tr><tr><td><code>\<TransactionReceipt>.totalSupply</code></td><td>long</td><td>The total supply of a token</td></tr><tr><td><code>\<TransactionReceipt>.serials</code></td><td>List\<long></td><td>The list of newly created serial numbers upon execution of a token mint transaction.</td></tr></tbody></table>

<CodeGroup>
  ```java Java theme={null}
  //Get the receipt of the transaction
  TransactionReceipt receipt = txResponse.getReceipt(client);

  System.out.println("The transaction receipt: " +receipt);

  //v2.0.0
  ```

  ```javascript JavaScript theme={null}
  //Get the receipt of the transaction
  const receipt = await txResponse.getReceipt(client);

  console.log("The transaction receipt: " +receipt);

  //v2.0.0
  ```

  ```java Go theme={null}
  //Request the receipt of the transaction
  receipt, err := txResponse.GetReceipt(client)

  if err != nil {
      panic(err)
  }

  fmt.Printf("The transaction receipt %v\n", receipt)

  //v2.0.0
  ```
</CodeGroup>

<CodeGroup>
  ```bash Sample Output: theme={null}
  TransactionReceipt{
       status=SUCCESS,
       exchangeRate=ExchangeRate{
            hbars=1,
            cents=12, 
            expirationTime=2100-01-01T00:00:00Z
       }, 
       accountId=null,
       fileId=null, 
       contractId=null, 
       topicId=null, 
       tokenId=null, 
       topicSequenceNumber=null, 
       topicRunningHash=null, 
       totalSupply=0, 
       scheduleId=0.0.2531
       schdeduledTransactionId=null,
       serials=[]
      }
  ```
</CodeGroup>
