> For the complete documentation index, see [llms.txt](https://docs.akashicpay.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.akashicpay.com/sdk/functions/gettransactiondetails.md).

# getTransactionDetails

Using the L2 txHash (AkashicChain hash), e.g. from the response of [payout](/sdk/functions/payout.md), 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](/introduction/terminology.md#akashicchain). It is present for Confirmed deposits and Pending/Confirmed payouts. This is particularly important for the case of [Layer 2](/introduction/terminology.md#layer-2) transactions, which will not have a Layer 1 hash (`txHash`)

Note: `internalFee` refers to the[ L2 fees](https://docs.akashicscan.com/#layer-2-l2-fees) associated with transactions on AkashicChain.

{% tabs %}
{% tab title="TypeScript" %}
{% code overflow="wrap" %}

```javascript
const transaction = await akashicPay.getTransactionDetails('ASe5659e1700b9004ef06a622e49b6d367d3a76d3fed5e7872aaf684b51b824a89')
```

{% endcode %}
{% endtab %}

{% tab title="PHP" %}
{% code overflow="wrap" %}

```php
$transaction = akashicPay->getTransactionDetails('ASe5659e1700b9004ef06a622e49b6d367d3a76d3fed5e7872aaf684b51b824a89')
```

{% endcode %}
{% endtab %}

{% tab title="Java" %}
{% code overflow="wrap" %}

```java
Optional<APTransactionDetailResult> transaction = akashicPay.getTransactionDetails('ASe5659e1700b9004ef06a622e49b6d367d3a76d3fed5e7872aaf684b51b824a89');
```

{% endcode %}
{% endtab %}

{% tab title="C#" %}

```csharp
var transactionDetail = await akashicPay.GetTransactionDetailAsync(l2TxHash);
```

{% endtab %}

{% tab title="Go" %}
{% code overflow="wrap" %}

```go
transaction, err := ap.GetTransactionDetails("ASe5659e1700b9004ef06a622e49b6d367d3a76d3fed5e7872aaf684b51b824a89")
```

{% endcode %}
{% endtab %}
{% endtabs %}

## <mark style="color:blue;">Return Example</mark>

{% tabs %}
{% tab title="TypeScript" %}
{% code overflow="wrap" %}

```javascript
{
  "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",
 }
```

{% endcode %}
{% endtab %}

{% tab title="PHP" %}

```php
{
  "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",
 }
```

{% endtab %}

{% tab title="Java" %}

```java
{
  "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",
 }
```

{% endtab %}

{% tab title="C#" %}

```csharp
{
  "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",
 }
```

{% endtab %}

{% tab title="Go" %}

```go
{
  FromAddress: "TTVkK6hGoAFhALG9NTkUDHjcFFXKmWcScU",
  ToAdress: "TQH8ygbS8BAnzSQ9uxR9vXHJYMQVRvbgPg",
  Layer: akashicpay.L1,
  InitiatedAt: "2024-08-19T10:03:58.649Z",
  ConfirmedAt: "2024-08-19T10:04:56.873Z",
  Amount: "1.000000",
  CoinSymbol: akashicpay.TRX_SHASTA,
  TokenSymbol: akashicpay.USDT,
  Status: akashicpay.CONFIRMED,
  FeesPaid: "2.789234"
  TxHash: "28a9880ad2ef3b7be1c40763128ec9630ab74e4749a3c81037c3501e4209bfcc",
  InternalFee: {
    Withdraw: "0.020000"
  },
  Identifier: "user123",
  DepositRequest: akashicPay.DepositRequest{}, // Populated if deposit requested with referenceId
  SenderInfo: akashicPay.UserInfo{Identity: "AS4850e9d8519ebe1f1979096f89b90b6efd0aa62535354965c5fbce94f54422c8"},
  ReceiverInfo: akashicPay.UserInfo{}, // Populated if a deposit
  FeeisDelegated: true,
  L2TxnHash: "ASe5659e1700b9004ef06a622e49b6d367d3a76d3fed5e7872aaf684b51b824a89",
 }
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.akashicpay.com/sdk/functions/gettransactiondetails.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
