AkashicPay
English
English
  • Introduction
    • Overview
    • Fee Structure
    • Transaction Times
    • Terminology
  • Guides
    • Quick Guide
    • Recommended integration flow
    • KeyPairs Guide
    • Payment Flow
    • Supported Currencies
  • Dashboard
    • Dashboard
    • Account
    • Transfer
    • Settings
    • Developers
  • SDK
    • Getting Started with SDK
    • SDKs & Toolkits
    • Functions
      • getDepositAddress
      • getDepositUrl
      • Identifier & ReferenceId
      • Requested amount & currency
      • payout
      • getTransfers
      • getBalance
      • getTransactionDetails
  • References
  • Errors
  • SecureAPI
    • Getting Started with SecureAPI
    • Functions
      • Get Deposit Address
      • Deposit URL
      • Balance
      • Transactions
      • Payout
      • Exchange Rate
    • References
    • Error Handling
    • Changelog
  • Callbacks
    • Deposit Callbacks
    • Payout Callbacks
    • Secure Callback Endpoint
Powered by GitBook
On this page

Was this helpful?

  1. SDK
  2. Functions

getTransactionDetails

Query details about a single transaction

Using the L2 txHash (AkashicChain hash), e.g. from the response of payout, get details about the transaction. If you have callbacks enabled on payout, you likely will not need this.

Note: l2Txnhash (the "L2-hash") should always be used as the unique identifier of a transaction. This is a unique transaction-hash for any transaction on AkashicChain. It is present for Confirmed deposits and Pending/Confirmed payouts. This is particularly important for the case of Layer 2 transactions, which will not have a Layer 1 hash (txHash)

Note: internalFee refers to the L2 fees associated with transactions on AkashicChain.

const transaction = await akashicPay.getTransactionDetails('ASe5659e1700b9004ef06a622e49b6d367d3a76d3fed5e7872aaf684b51b824a89')
$transaction = akashicPay->getTransactionDetails('ASe5659e1700b9004ef06a622e49b6d367d3a76d3fed5e7872aaf684b51b824a89')
Optional<APTransactionDetailResult> transaction = akashicPay.getTransactionDetails('ASe5659e1700b9004ef06a622e49b6d367d3a76d3fed5e7872aaf684b51b824a89');
var transactionDetail = await akashicPay.GetTransactionDetailAsync(l2TxHash);

Return Example

{
  "fromAddress": "TTVkK6hGoAFhALG9NTkUDHjcFFXKmWcScU",
  "toAddress": "TQH8ygbS8BAnzSQ9uxR9vXHJYMQVRvbgPg",
  "layer": TransactionLayer.L1,
  "date": "2024-08-19T10:03:58.649Z",
  "amount": "1.000000",
  "coinSymbol": NetworkSymbol.TRX_SHASTA,
  "status": TransactionStatus.CONFIRMED,
  "txHash": "28a9880ad2ef3b7be1c40763128ec9630ab74e4749a3c81037c3501e4209bfcc",
  "internalFee": {
    "deposit": "0.020000"
  },
  "l2TxnHash": "ASe5659e1700b9004ef06a622e49b6d367d3a76d3fed5e7872aaf684b51b824a89",
 }
{
  "fromAddress": "TTVkK6hGoAFhALG9NTkUDHjcFFXKmWcScU",
  "toAddress": "TQH8ygbS8BAnzSQ9uxR9vXHJYMQVRvbgPg",
  "layer": "L1Transaction",
  "date": "2024-08-19T10:03:58.649Z",
  "amount": "1.000000",
  "coinSymbol": NetworkSymbol::TRON_SHASTA,
  "status": "Confirmed",
  "txHash": "28a9880ad2ef3b7be1c40763128ec9630ab74e4749a3c81037c3501e4209bfcc",
  "internalFee": {
    "deposit": "0.020000"
  },
  "l2TxnHash": "ASe5659e1700b9004ef06a622e49b6d367d3a76d3fed5e7872aaf684b51b824a89",
 }
{
  "fromAddress": "TTVkK6hGoAFhALG9NTkUDHjcFFXKmWcScU",
  "toAddress": "TQH8ygbS8BAnzSQ9uxR9vXHJYMQVRvbgPg",
  "layer": APTransactionLayer.L1Transaction,
  "date": "2024-08-19T10:03:58.649Z",
  "amount": "1.000000",
  "coinSymbol": APNetworkSymbol.Tron,
  "status": APTransactionStatus.Confirmed,
  "txHash": "28a9880ad2ef3b7be1c40763128ec9630ab74e4749a3c81037c3501e4209bfcc",
  "internalFee": {
    "deposit": "0.020000"
  },
  "l2TxnHash": "ASe5659e1700b9004ef06a622e49b6d367d3a76d3fed5e7872aaf684b51b824a89",
 }
{
  "fromAddress": "TTVkK6hGoAFhALG9NTkUDHjcFFXKmWcScU",
  "toAddress": "TQH8ygbS8BAnzSQ9uxR9vXHJYMQVRvbgPg",
  "layer": APTransactionLayer.L1Transaction,
  "date": "2024-08-19T10:03:58.649Z",
  "amount": "1.000000",
  "coinSymbol": APNetworkSymbol.Tron,
  "status": APTransactionStatus.Confirmed,
  "txHash": "28a9880ad2ef3b7be1c40763128ec9630ab74e4749a3c81037c3501e4209bfcc",
  "internalFee": {
    "deposit": "0.020000"
  },
  "l2TxnHash": "ASe5659e1700b9004ef06a622e49b6d367d3a76d3fed5e7872aaf684b51b824a89",
 }
PreviousgetBalanceNextReferences

Last updated 1 month ago

Was this helpful?