# Daily Transactions Summary

For getting daily transactions summary on the merchant application, the **getTodayTransactionsSummary** method of the library should be called. This function is used to get daily transactions through the library. The function takes DailySummaryListener interfaces as parameters.

```kotlin
PayContactlessEmbed.getInstance().getTodayTransactionsSummary(DailySummaryListener listener)
```

## **Daily Summary Listener**

```java
public interface DailySummaryListener {
    void onSuccess(Map<String, DailySummaryResult> dailySummaryResult);
    void onFailure(Error error);
}
```

Key of the map is **currency** value and the result object contains the details of the payments made in that currency.

A sample response in json format

```json
{
    "₦": {
        "creditAmount": 300.00,
        "creditMerchantUserBreakdown": {
            "Embed Test": 300.00
        },
        "debitAmount": 0,
        "debitMerchantUserBreakdown": {}
    },
    "CFA": {
        "creditAmount": 100.00,
        "creditMerchantUserBreakdown": {
            "Embed Test": 100.00
        },
        "debitAmount": 0,
        "debitMerchantUserBreakdown": {}
    }
}
```

## **Daily Summary Result Data**

```kotlin
data class DailySummaryResult (
    var creditAmount: Double? = null
    var creditMerchantUserBreakdown: Map<String, Double>? = null
    var debitAmount: Double? = null
    var debitMerchantUserBreakdown: Map<String, Double>? = null
)
```

<table><thead><tr><th width="305.3333333333333">Field Names</th><th>Descriptions</th><th>Sample Values</th></tr></thead><tbody><tr><td>creditAmount</td><td>total amount of credit transaction today </td><td>13.00</td></tr><tr><td>creditMerchantUserBreakdown</td><td>detail of mercant user and credit amount of this user </td><td>"Fatih Shop" : 10.00<br>"Ergul Shop" : 3.00</td></tr><tr><td>debitAmount</td><td>total amount of debit transaction today</td><td>8.00</td></tr><tr><td>debitMerchantUserBreakdown</td><td>udetail of mercant user and debit amount of this user </td><td>"Fatih Shop" : 5.00<br>"Ergul Shop" : 3.00</td></tr></tbody></table>

## **Send Daily Summary Report**

This function is used to send the daily transaction report to the merchant's defined mail address.

```kotlin
PayContactlessEmbed.getInstance().sendTodayTransactionsSummaryReport(SendMailListener listener)
```

## **Send  Mail Listener**

```java
public interface SendMailListener {
    void onSuccess();
    void onFailure(Error error);
}
```


---

# 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/daily-transactions-summary.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.
