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.
Receipts can be requested from a Hedera network for up to 3 minutes.
// Get the receipt of the transactionlet receipt = tx_response.get_receipt(&client).await?;println!("The transaction receipt: {:?}", receipt);// v0.34.0
Request the receipt from the network for this duration
<TransactionResponse>.getReceiptQuery()
TransactionReceiptQuery
Returns the TransactionReceiptQuery response for a transaction. This will not error on bad status like RECEIPT_NOT_FOUND and will return information about a failed transaction if necessary.
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.
//Get the receipt of the transactionTransactionReceipt receipt = txResponse.getReceipt(client);System.out.println("The transaction receipt: " +receipt);//v2.0.0
//Get the receipt of the transactionconst receipt = await txResponse.getReceipt(client);console.log("The transaction receipt: " +receipt);//v2.0.0
//Request the receipt of the transactionreceipt, err := txResponse.GetReceipt(client)if err != nil { panic(err)}fmt.Printf("The transaction receipt %v\n", receipt)//v2.0.0