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.

Receipts can be requested from a Hedera network for up to 3 minutes.

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

  • 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

new TransactionReceiptQuery()
    .setTransactionId(transactionId)
    .execute(client)

Helper Methods

//Get the receipt of the transaction
TransactionReceipt receipt = txResponse.getReceipt(client);

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

//v2.0.0
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 updated