# Transactions

## <mark style="color:blue;">Transaction Object</mark>

The following endpoints (`POST Transfers` and `POST Transaction Details`) use a shared **Transaction Object** for their responses. Below is the structure of the **Transaction Object**:

**Fields:**

| Field                | Type                                                            | Description                                                |
| -------------------- | --------------------------------------------------------------- | ---------------------------------------------------------- |
| fromAddress          | string                                                          | Sending address                                            |
| toAddress            | string                                                          | Receiving address                                          |
| layer                | [TransactionLayer](/secureapi/references.md#transactionlayer)   | Transaction layer (`L1Transaction` or `L2Transaction`)     |
| initiatedAt          | string                                                          | Date in ISO8601 format                                     |
| confirmededAt        | string                                                          | Confirmed date in ISO8601 format                           |
| amount               | string                                                          | Transaction amount (as a string to avoid precision issues) |
| coinSymbol           | [NetworkSymbol](/secureapi/references.md#networksymbol)         | Network (L1) of the transaction (e.g., `ETH`)              |
| status               | [TransactionStatus](/secureapi/references.md#transactionstatus) | Transaction status (`Pending`, `Confirmed`, or `Failed`)   |
| txHash               | string                                                          | Network's hash for L1 transactions (optional for L2)       |
| feesPaid             | string                                                          | Gas fee paid on network (optional for L2)                  |
| l2TxnHash            | string                                                          | Akashic transaction hash (for both L1 and L2)              |
| tokenSymbol          | [TokenSymbol](/secureapi/references.md#tokensymbol)             | Token symbol for token transactions (optional)             |
| reason               | string                                                          | Reason for failure (if status is `Failed`)                 |
| internalFee          | object                                                          | Akashic fee details (optional)                             |
| internalFee.deposit  | string                                                          | Deposit fee (optional)                                     |
| internalFee.withdraw | string                                                          | Withdraw fee (optional)                                    |
| identifier           | string                                                          | User identifier for deposits (optional)                    |

Example:

```json
{
  "fromAddress": "string",
  "toAddress": "string",
  "layer": "string",
  "initiatedAt": "string",
  "confirmededAt": "string",
  "amount": "string",
  "coinSymbol": "string",
  "status": "string",
  "txHash": "string",
  "feesPaid": "string",
  "l2TxnHash": "string",
  "tokenSymbol": "string",
  "reason": "string",
  "internalFee": {
    "deposit": "string",
    "withdraw": "string"
  },
  "identifier": "string"
}

```

## <mark style="color:blue;">Get Transaction Details</mark>

**Endpoint:** `POST /getTransactionDetails`

**Description:** Retrieves details of an individual transaction. Returns `null` if no transaction is found for the queried hash.

**Request Parameters:**

| Parameter | Type   | Required | Description                             |
| --------- | ------ | -------- | --------------------------------------- |
| l2TxHash  | string | Yes      | L2 AkashicChain hash of the transaction |

Response: Returns a single Transaction Object or `null`.

## <mark style="color:blue;">Get Transfers</mark>

**Endpoint:** `POST /getTransfers`

**Description:** Retrieves all or a subset of transactions, optionally filtered by `layer`, `status`, `startDate`, `endDate`, or `hideSmallTransactions`. Supports pagination with `page` and `limit`. The `hideSmallTransactions` parameter excludes transactions with values below 1 USD.

**Request Parameters:**

| Parameter             | Type                                                            | Required | Description                                                        |
| --------------------- | --------------------------------------------------------------- | -------- | ------------------------------------------------------------------ |
| page                  | number                                                          | No       | Page number for pagination                                         |
| limit                 | number                                                          | No       | Number of transactions per page                                    |
| layer                 | [TransactionLayer](/secureapi/references.md#transactionlayer)   | No       | Filter by transaction layer (`L1Transaction` or `L2Transaction`)   |
| status                | [TransactionStatus](/secureapi/references.md#transactionstatus) | No       | Filter by transaction status (`Pending`, `Confirmed`, or `Failed`) |
| startDate             | string                                                          | No       | Start date in ISO8601 format                                       |
| endDate               | string                                                          | No       | End date in ISO8601 format                                         |
| hideSmallTransactions | boolean                                                         | No       | Excludes transactions with values below 1 USD                      |
| identifier            | string                                                          | No       | Filter by identifier                                               |
| referenceId           | string                                                          | No       | Filter by identifier                                               |

> Note: Minimum `limit` is 10 and the default behaviour of `hideSmallTransactions` .

Response: Returns an array of Transaction Objects.

```json
[
  {
    "fromAddress": "string",
    "toAddress": "string",
    "layer": "string",
    "initiatedAt": "string",
    "confirmededAt": "string",
    "amount": "string",
    "coinSymbol": "string",
    "status": "string",
    "txHash": "string",
    "feesPaid": "string",
    "l2TxnHash": "string",
    "tokenSymbol": "string",
    "reason": "string",
    "internalFee": {
      "deposit": "string",
      "withdraw": "string"
    },
    "identifier": "string"
  }
]

```


---

# Agent Instructions: 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:

```
GET https://docs.akashicpay.com/secureapi/functions/transactions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
