# Transactions History

For get transactions history list, the **getTransactionList** method of the library should be called. This function is used to get all transaction through the library.&#x20;

This function supports pagenation. The page value must be 0 for the first request and it must be incremented for each page until reacing the total pages.

* startDate and endDate must be in 'dd-MM-YYYY' format
* direction can be "DESC" or "ASC". The default value is "DESC".

```kotlin
PayContactlessEmbed.getInstance().getTransactionList(int page, TransactionListListener listener)
```

```kotlin
PayContactlessEmbed.getInstance().getTransactionList(int page, int size, String direction, String transactionCode, String startDate, String endDate, Integer startAmount, Integer endAmount, TransactionListListener listener)
```

## **Transaction List Listener**

```java
public interface TransactionListListener {
    void onSuccess(TransactionList transactionList);
    void onFailure(Error error);
}
```

## **Transaction List Data**

```kotlin
data class TransactionList (
    var transactions: List<TransactionInfo>? = null
    var empty: Boolean? = null
    var first: Boolean? = null
    var last: Boolean? = null
    var number: Integer? = null
    var numberOfElements: Integer? = null
    var size: Integer? = null
    var totalElements: Integer? = null
    var totalPages: Integer? = null
)
```

<table><thead><tr><th width="359.3333333333333">Field Names</th><th>Descriptions</th><th>Sample Values</th></tr></thead><tbody><tr><td>transactions</td><td>list of transactions</td><td>Check <strong>Transaction Info Data</strong> section belo.</td></tr><tr><td>empty</td><td>is transaction list empty</td><td>false</td></tr><tr><td>first</td><td>is the first page of the transaction list</td><td>true</td></tr><tr><td>last</td><td>is the first page of the transaction list</td><td>false</td></tr><tr><td>number</td><td>current page number of the transcation list</td><td>0</td></tr><tr><td>numberOfElements</td><td>number of the element on the current page</td><td>10</td></tr><tr><td>totalElements</td><td>total number of the elements in the history</td><td>476</td></tr><tr><td>totalPages</td><td>total pages of the history</td><td>48</td></tr></tbody></table>

## **Transaction Info Data**

```kotlin
data class TransactionList (
    var id: Long? = null
    var transactionCode: String? = null
    var cardNumber: String? = null
    var amount: Double? = null
    var currency: String? = null
    var dateTime: String? = null
    var status: String? = null
    var modeOfTransaction: String? = null
)
```

<table><thead><tr><th width="305.3333333333333">Field Names</th><th>Descriptions</th><th>Sample Values</th></tr></thead><tbody><tr><td>id</td><td>a unique id of the transcation </td><td>'29481'</td></tr><tr><td>transactionCode</td><td>a unique code of the transaction. It is used for finding the transaction.</td><td>'3FFBA7849A383BEB'</td></tr><tr><td>cardNumber</td><td>masked pan of the card using in the transaction</td><td>'471688******6375'</td></tr><tr><td>amount</td><td>using amount value in the transaction</td><td>'8.00'</td></tr><tr><td>currency</td><td>using currency value in the transaction</td><td>'₦'</td></tr><tr><td>dateTime</td><td>transaction date time</td><td>'14-09-2023 11:18:28'</td></tr><tr><td>status</td><td>status info of the transaction</td><td>'SUCCESS' or 'FAILED'</td></tr><tr><td>modeOfTransaction</td><td>paymet method using in the transaction</td><td>'CARD', 'PAY_WITH_LINK',<br>'PAY_WITH_ACCOUNT'</td></tr></tbody></table>


---

# 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://developer.prophius.com/developer-console/merchant-embed-sdk/android/sdk-api-reference/transactions-history.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.
