get Transaction
Fetches the details of a submitted transaction.
Returns transaction status, result, and metadata. Use this to check if a submitted transaction has been included in a ledger.
Status Values
SUCCESS: Transaction succeeded and is in a ledger
FAILED: Transaction failed and is in a ledger
NOT_FOUND: Transaction not found (pending or too old)
Example
val response = server.getTransaction(hash)
when (response.status) {
GetTransactionStatus.SUCCESS -> println("Success!")
GetTransactionStatus.FAILED -> println("Failed: ${response.resultXdr}")
GetTransactionStatus.NOT_FOUND -> println("Not yet in ledger")
}Content copied to clipboard
Return
Transaction details including status and results
Parameters
hash
Transaction hash as hex string
See also
Throws
If the RPC request fails