Hedera
Search…
Get a transaction receipt
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.

Transaction Receipt Fields

    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
Receipts can be requested from the Hedera network for up to 3 minutes.
Transaction Signing Requirements
    Transaction receipt requests do not have an associated fee at this time

Methods

V2
Method
Type
Description
<TransactionResponse>.getReceipt(<client>)
TransactionReceipt
Returns the receipt of a transaction
<TransactionResponse>.getReceipt(<client, timeout>)
Client, Duration
Request the receipt from the network for this duration
<TransactionResponse>.getReceiptAsync(<client, timeout>)
Client, Duration
Request receipt asynchronously for the provided duration
<TransactionReceipt>.status
Status
Whether the transaction reached consensus or not
<TransactionReceipt>.accountId
AccountId
The newly generated account ID
<TransactionReceipt>.topicId
TopicId
The newly generated topic ID
<TransactionReceipt>).fileId
FileId
The newly generated file ID
<TransactionReceipt>).contractId
ContractId
The newly generated contract ID
<TransactionReceipt>).tokenId
TokenId
The newly generated token ID
<TransactionReceipt>).scheduleId
ScheduleId
The newly generated schedule ID
<TransactionReceipt>).scheduledTransactionId
TransactionId
The generated scheduled transaction ID
<TransactionReceipt>).exchangeRate
ExchangeRate
The exchange rate in hbar, cents, and expiration time
<TransactionReceipt>.topicRunningHash
ByteString
The topic running hash
<TransactionReceipt>.topicSequenceNumber
long
The topic sequence number
<TransactionReceipt>.totalSupply
long
The total supply of a token
<TransactionReceipt>.serials
List<long>
The list of newly created serial numbers upon execution of a token mint transaction.
Java
1
//Get the receipt of the transaction
2
TransactionReceipt receipt = txResponse.getReceipt(client);
3
4
System.out.println("The transaction receipt: " +receipt);
5
6
//v2.0.0
Copied!
JavaScript
1
//Get the receipt of the transaction
2
const receipt = await txResponse.getReceipt(client);
3
4
console.log("The transaction receipt: " +receipt);
5
6
//v2.0.0
Copied!
Go
1
//Request the receipt of the transaction
2
receipt, err := txResponse.GetReceipt(client)
3
4
if err != nil {
5
panic(err)
6
}
7
8
fmt.Printf("The transaction receipt %v\n", receipt)
9
10
//v2.0.0
Copied!

Sample Output:

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=[] }
Last modified 6d ago
Copy link
Contents
Methods