# Transaction Summary Report

## Overview

Transaction Summary Reports that are provided by Alipay+ to the Mobile Payment Providers (MPPs) include the summary information for clearing data, for example, the total number of transactions in a clearing cycle, the amount for the settlement, and so on. If there is only one clearing cycle in the settlement cycle, the total settlement amount in the Settlement Report and the one in the Transaction Summary Report are the same.

For every clearing cycle, a Transaction Summary Report is created with other reports in the same clearing cycle, such as the Transaction Detail Report and the Fee Report. The reports are uploaded to a specific directory on the SFTP server. The MPP can download and use them for reconciliation.

### File location and naming convention

The Transaction Summary Report is a UTF-8 encoded text file.

In the production environment, the file is saved by default in the directory `/v1/settlements/clearing/<participantId>/<date>`. And in the sandbox environment, the file is saved in the directory `/sandbox/settlements/clearing/<participantId>/<date>`.

The default file name is `summary_<participantId>_<settlementCurrency>_<clearingBatchId>_<participantAgreementId>_<seq>.csv`. For the detailed information of each field in the file name, refer to the following table:

| **Field Name** | **Details** |
| --- | --- |
| participantId | The unique ID that Alipay+ assigns to the MPP, also known as the "Partner ID". This field identifies the receiver of the file. |
| date | The date when the report is generated, not the date of the transactions. For example, a report with a date of 20220319 is generated on 20220319. |
| settlementCurrency | The currency that is used in the settlement, as agreed in the contract. This is the same currency as the one that is stated in the Settlement Report. |
| clearingBatchId | Clearing cycle index, used to indicate a unique clearing cycle. A clearing cycle is from 00:00 to 23:59:59, UTC+8. |
| participantAgreementId | The unique ID that is assigned by Alipay+ to identify a settlement agreement between Alipay+ and the MPP. The value of the _participantAgreementId_ parameter is determined by the value of the _participantId_ parameter and the settlement currency used by the MPP. The ID represents the fund flow when MPP performs settlement to Alipay+. |
| seq | The sequence number used as a file index. The field is used when multiple files exist in the clearing cycle. The file index is ordered in the range of `000-999`. |

### Report structure

The Transaction Summary Report consists of one part:

-   Detail section, which displays the summary information for the clearing data in the clearing cycle.

If no transaction exists in a clearing cycle, the transaction summary report is still generated with 0 total count, 0 total amount, and a default direction of `DEBIT`.

## Structure

### Summary section

N/A

### Detail section

| **No.** | **Parameter** | **Description** |
| --- | --- | --- |
| 1 | clearingBatchId | **Required** String (32) The unique ID that is assigned by Alipay+ to identify a clearing cycle. A clearing cycle is from 00:00 to 23:59:59, UTC+8. |
| 2 | clearingDate | **Required** String The date when the transaction occurs. The value is in the UTC+8 time zone. |
| 3 | totalCount | **Required** String The total count of transactions and fees in a clearing cycle. The value here is the sum of the value of the _totalCount_ parameter in the Transaction Detail Report and the value of the _totalCount_ parameter in the Fee Report. |
| 4 | fundDirection | **Required** String The fund direction. Valid values are: - `CREDIT`: specifies the fund direction that is from Alipay+ to MPP. - `DEBIT`: specifies the fund direction that is from MPP to Alipay+. |
| 5 | settlementCurrency | **Required** String (3) The currency of the net settlement amount. The value is specified by using the 3-character [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code. |
| 6 | netSettlementAmountValue | **Required** Integer The net settlement amount, which is the summary amount of all the records in the clearing cycle. The value is provided in the smallest unit of the corresponding currency. For example, if the currency is USD and the amount is $1.00, the value of this parameter is 100; if the currency is JPY and the amount is ￥1, the value of this parameter is 1. Value range: 0 - unlimited. |
| 7 | transactionCurrency | **Optional** String (3) The currency of the net transaction amount. The value is specified by using the 3-character [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code. The currency here is the same as the currency of the transactions in the clearing cycle, which is the value of the _payToAmount.currency_ parameter in the **pay** API. > **Note**: This field is empty when no transaction occurs in the clearing cycle or multiple transaction currencies are involved in the clearing cycle. |
| 8 | netTransactionAmountValue | **Optional** Integer The net transaction amount, which is the summary amount of all the records in the clearing cycle. The value is provided in the smallest unit of the corresponding currency. For example, if the currency is USD and the amount is $1.00, the value of this parameter is 100; if the currency is JPY and the amount is ￥1, the value of this parameter is 1. > **Note**: This field is empty when no transaction occurs in the clearing cycle or multiple transaction currencies are involved in the clearing cycle. Value range: 0 - unlimited. |
| 9 | extendInfo | **Optional** String (2048) The extended information. |

## Samples

This section contains sample reports for different scenarios.

### Case 1 (Payment only)

The following sample is the summary report based on the sample [Payment only](trans_detail#ubRy9) Transaction Detail Report. A settlement fund of **19.6 EUR** is to be paid to Alipay+ by MPP due to payments that net **19.6 EUR** in total on 2022-04-19. The transactions are made by MPP and settled in **EUR**.

You can view the sample in the following window or download the sample file: 

[📎summary\_A1234567890\_EUR\_202204190000200000\_20210001\_000.csv](https://idocs-assets.marmot-cloud.com/storage/idocs87c36dc8dac653c1/yuque/attachments/yuque/0/2022/csv/12884741/1664185703310-b2adde54-5eb0-4f42-a7d4-e9e54bfa4a3f.csv)

[summary\_A1234567890\_EUR\_202204190000200000\_20210001\_000.csv](https://idocs.alipay.com/file-preview?param=storage%2Fidocs87c36dc8dac653c1%2Fyuque%2Fattachments%2Fyuque%2F0%2F2022%2Fcsv%2F12884741%2F1664185719152-9d12ed74-d5d8-4d42-a9f7-1afbab60f5c7.csv)

### Case 2 (Payment & refund)

The following sample is the summary report based on the sample [Payment & refund](trans_detail#AukhT) Transaction Detail Report. A settlement fund of **81.15** **EUR** is to be paid to Alipay+ by MPP due to transactions that net **81.15** **EUR** in total on 2022-04-28. The transactions are made and settled by MPP in **EUR**.

You can view the sample in the following window or download the sample file: 

[📎summary\_A1234567890\_EUR\_202204280000200000\_20210000\_000.csv](https://idocs-assets.marmot-cloud.com/storage/idocs87c36dc8dac653c1/yuque/attachments/yuque/0/2023/csv/12884741/1687336569749-939c4ab4-15ad-4970-a4ca-3f4b0a219e78.csv)

[summary\_A1234567890\_EUR\_202204280000200000\_20210000\_000.csv](https://idocs.alipay.com/file-preview?param=storage%2Fidocs87c36dc8dac653c1%2Fyuque%2Fattachments%2Fyuque%2F0%2F2023%2Fcsv%2F12884741%2F1687336547682-0c91fa21-c9d0-4ba1-a0a7-479161981721.csv)

### Case 3 (Payment & refund in multiple currencies)

The following sample is the summary report based on the sample [Payment & refund in multiple currencies](trans_detail#qsjBf) Transaction Detail Report. A settlement fund of **0.5 EUR** is to be paid to Alipay+ by MPP due to transactions on 2022-01-10.

You can view the sample in the following window or download the sample file: 

[📎summary\_A1234567890\_EUR\_202201101107957472\_202109171107900901003800022697\_000.csv](https://idocs-assets.marmot-cloud.com/storage/idocs87c36dc8dac653c1/yuque/attachments/yuque/0/2022/csv/12884741/1664185810205-8e195c21-5793-4a1b-911d-ac6789143772.csv)

[summary\_A1234567890\_EUR\_202201101107957472\_202109171107900901003800022697\_000.csv](https://idocs.alipay.com/file-preview?param=storage%2Fidocs87c36dc8dac653c1%2Fyuque%2Fattachments%2Fyuque%2F0%2F2022%2Fcsv%2F12884741%2F1664185785942-4e849112-c5aa-4c06-8ec7-4e6fd050fe1b.csv)