---
title: "Get reports automatically"
description: "Learn how to generate and download Adyen reports automatically."
url: "https://docs.adyen.com/reporting/automatically-get-reports"
source_url: "https://docs.adyen.com/reporting/automatically-get-reports.md"
canonical: "https://docs.adyen.com/reporting/automatically-get-reports"
last_modified: "2023-04-20T09:28:00+02:00"
language: "en"
---

# Get reports automatically

Learn how to generate and download Adyen reports automatically.

[View source](/reporting/automatically-get-reports.md)

Use our [webhooks](/development-resources/webhooks) to automatically download the reports generated in your [Customer Area](https://ca-test.adyen.com/).

## Important changes

We have [migrated to a new technology platform](https://help.adyen.com/updates/upcoming-changes-to-payment-oriented-reports-as-of-august-2023) to make report generation faster.

This migration has an effect on the Received payment details, Interactive payment accounting, and Settlement details reports. You may have to update your report data ingestion logic if you automatically generate, download, and ingest reports or ingest manually downloaded reports into your system. To determine if you have to take action, check the [migration overview](https://help.adyen.com/updates/upcoming-changes-to-payment-oriented-reports-as-of-august-2023).

## Step 1: Automate generating reports

### Configure reports to generate automatically

You need the **Merchant Report** [user role](/account/user-roles).

1. In your [Customer Area](https://ca-test.adyen.com/), go to **Reports** in the left navigation.
2. Under **Report overview**, you can select a report category from the drop-down menu or enter the name of a specific report in the **Search** bar. By default, **All reports** is selected.
3. From the list of reports, select the report you want to configure under the **Name** column.
4. Select **Manage report**. This gives you the option to generate the report automatically or manually. Select **Automatic (generate on a schedule)**.
5. Select **On**. You will see a pop-up message that says **Automatic report generation has been enabled** at the top of your screen.\
   For some reports, you need to configure additional report settings such as the [frequency](#report-frequency).
6. Select a report format, for example, **.CSV**. If you change the file format, select **Change format** to confirm.

### Schedule when you receive reports

For some reports, like the Aggregate settlement details report, you need to choose how often to generate them. Your [time zone setting](/reporting/time-zone-setting) affects how your reports are generated.

Select **Add report schedule** and do the following:

1. Select the **Frequency** of report generation:

   * **Daily**: each day between 02:00 and 10:00 CET and contains the previous 24 hours of data.
   * **Weekly**: each week on the selected day and contains the previous 7 days of data. For example, if scheduled on Wednesday, the report will contain data for the previous Wednesday to Tuesday.
   * **Monthly**: on the selected day of the month and contains data for the previous calendar month.
   * **Quarterly**: on the selected day of the month and contains data for the previous quarter.

2. Optionally configure:

   * **The merchant country code(s)**: enter your country code.
   * **Also display the store**: select **Yes** to display and **No** to not display the store.
   * **Also display the terminal Id**: select **Yes** to display and **No** to not display the terminal identifier.

3. Select **Schedule** to create a new schedule for automatic report generation.

## Step 2: Get webhooks when reports are available

Follow the instructions on our [Webhooks page](/development-resources/webhooks) to expose an endpoint, set up webhooks in your [Customer Area](https://ca-test.adyen.com/), and accept webhooks.

When a new report has been generated, you will receive a **REPORT\_AVAILABLE** webhook. It contains the following fields that you need to download the report:

* `pspReference`: the file name of the report.
* `reason`: the URL used to download the report.

**Example REPORT\_AVAILABLE webhook**

#### JSON

```json
{
   "live":"false",
   "notificationItems":[
      {
         "NotificationRequestItem":{
            "amount":{
               "currency":"EUR",
               "value":0
            },
            "eventCode":"REPORT_AVAILABLE",
            "eventDate":"2018-04-18T10:03:08+02:00",
            "merchantAccountCode":"[merchantAccountCode]",
            "merchantReference":"",
            "pspReference":"settlement_detail_report_batch_12.csv",
            "reason":"https:\/\/ca-test.adyen.com\/reports\/download\/MerchantAccount\/[merchantAccountCode]\/settlement_detail_report_batch_12.csv",
            "success":"true"
         }
      }
   ]
}
```

#### Soap

```xml
<?xml version="1.0" encoding="UTF-16"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <soap:Body>
        <sendNotification xmlns="http://notification.services.adyen.com">
            <notification>
                <live>true</live>
                <notificationItems>
                    <NotificationRequestItem>
                        <amount>
                            <currency xmlns="http://common.services.adyen.com">EUR</currency>
                            <value xmlns="http://common.services.adyen.com">0</value>
                        </amount>
                        <eventCode>REPORT_AVAILABLE</eventCode>
                        <eventDate>2018-04-18T10:03:08+02:00</eventDate>
                        <merchantAccountCode>[merchantAccountCode]</merchantAccountCode>
                        <merchantReference/>
                        <pspReference>settlement_detail_report_batch_12.csv</pspReference>
                        <reason>https://ca-test.adyen.com/reports/download/MerchantAccount/[merchantAccountCode]/settlement_detail_report_batch_12.csv</reason>
                        <success>true</success>
                    </NotificationRequestItem>
                </notificationItems>
            </notification>
        </sendNotification>
    </soap:Body>
</soap:Envelope>
```

## Step 3: Create a Report service user API credential

You need a Report Service user API credential to download reports using HTTP GET requests. To be able to create new API credentials, you need to have one of the following [user roles](/account/user-roles):

* Merchant admin
* Manage API credentials

To create a new credential:

1. Log in to your [Customer Area](https://ca-test.adyen.com/), and go to **Developers** > **API credentials**.\
   This opens a list with all API credentials linked to your company account.

2. Select **Create new credential**.

3. Under **User type**, select **Report user**.

4. Go to the end of the page and select **Save**.

5. Under **Authentication**, create a password in **Basic Auth** section.

   * If creating a new credential, copy the suggested password.
   * If changing the password of an existing credential, select Generate password, and copy the generated password.
   * Copy and securely store the API key in your system — you won't be able to restore it later.

6. Under **Authentication**, select **Generate New API Key**. This will generate an API key for the new API credential.

   * Copy and securely store the API key in your system — you won't be able to restore it later.

7. Under **Roles and Associated Accounts**,

   1. Select **Roles**, and make sure the toggle for **Merchant Report Download role** is assigned.

   2. If you only want to use this API credential for specific merchant accounts, select **Account**, and use the toggles to limit access to specific merchant accounts. When you toggle the company account, you toggle all merchant accounts under that company account.

8. Select **Save** at the bottom of the page.

## Step 4 (Optional): Encrypt report files

For additional security, you can optionally encrypt your report files with a PGP Key:

1. If you haven't already done so, [generate a PGP key](/development-resources/pgp-encryption#step-1-generate-new-pgp-key).
2. [Register your PGP public key with Adyen](/development-resources/pgp-encryption#step-2-register-pgp-key-with-adyen), specifying **Reports** as the **Purpose** of the key.

All future generated reports will be encrypted with this PGP key.

## Step 5: Download reports

Download a report with an HTTP GET request. To authenticate the request, use an API key or Basic auth.

Enable compression to reduce the file size of the report. Our servers look for the `Accept-Encoding: gzip` header in your request. Use the `--compressed` flag in `curl` or an equivalent option in your client to enable compression.

### Tab: API key

To authenticate an HTTP GET request, replace the following in the example **Download report** below:

* `$REPORT_SERVICE_USER_API_KEY` with the API key for your [Report service user API credential](#create-api-credential).
* `$REPORT_FILE_URL` with the URL from the `reason` field in the [**REPORT\_AVAILABLE** webhook](#get-notifications).

**Example: Download reports**

```shell
curl -O $REPORT_FILE_URL \
  --header 'X-API-KEY: $REPORT_SERVICE_USER_API_KEY' \
  --compressed
```

### Tab: Basic auth

To authenticate a report download with an HTTP GET request, replace the following in the code examples below:

* `$REPORT_SERVICE_USER` with the name of your [Report service user](#create-api-credential).
* `$REPORT_SERVICE_USER_PASSWORD` with the basic authentication password for your report [Report service user](#create-api-credential).
* `$REPORT_FILE_URL` with the URL from the `reason` field in the [**REPORT\_AVAILABLE** webhook](#get-notifications).

**Example: Download merchant account reports**

```shell
curl -O $REPORT_FILE_URL \
  --user '$REPORT_SERVICE_USER:$REPORT_SERVICE_USER_PASSWORD' \
  --compressed
```

### Parsing file names

Parse the file names of reports to choose which ones you want to download. Here are the file names of some commonly downloaded reports:

| Report type                                                                                                                 | File name format                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| --------------------------------------------------------------------------------------------------------------------------- |   |
| [Settlement details report](/reporting/settlement-reconciliation/transaction-level/settlement-details-report)               | settlement\_detail\_report\_batch\_\[Batch Number].\[file format] Parameters batch closing report:- \[Batch Number] – sequential number of the settlement batch
- \[file format] – the file format of the report, `csv` by defaultsettlement\_detail\_report\_\[report end date].\[file format] Parameters single day report:- \[report end date] – the date of the report. Format: `yyyy-mm-dd`
- \[file format] – the file format of the report, `csv` by defaultsettlement\_detail\_report\_\[report start date]\_\[report end date].\[file format] Parameters multiple day report (scheduled reports only):- \[report start date] – the start date of the report. Format: `yyyy_mm_dd`
- \[report end date] – the end date of the report. Format: `yyyy_mm_dd`
- \[file format] – the file format of the report, `csv` by defaultWhen you generate a report for multiple accounts, a unique identifier in the form of an eight-character alphanumeric string is added to the file name. |
| [Aggregate settlement details report](/reporting/settlement-reconciliation/batch-level/aggregate-settlement-details-report) | settlement\_report\_aggregate\_\[yourAccountName]\_\[countrycode]\_\[additionalData]\_\[fromdate]\_\[untildate].csv Parameters:- \[yourAccountname] – Adyen company or merchant account name
- \[countryCode] – First country code in case the report is limited to one or more merchant countries
- \[additionalData] – Indicates whether aggregation by Store, Terminal, or both is enabled. Possible values: empty, "S", "T", or "ST".
- \[fromdate] – The start date of report. Format: `yyyy-mm-dd`
- \[untildate] – The end date of report. Format: `yyyy-mm-dd`                                                                                                                                                                                                                                                                                                                                                                                                                      |
| [Payment accounting report](/reporting/invoice-reconciliation/payment-accounting-report)                                    | payments\_accounting\_report\_\[date].csv Parameters:- \[date] – the date for which the report is generated. Format: `yyyy_mm_dd`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| [Account Updater results report](/reporting/account-updater-results-report)                                                 | account\_updater\_results\_\_\[additionalData]\_\[dateformat]\_\[fromdate]-\[untildate].csv Parameters:- \[additionalData] - Indicates whether aggregation by Merchant, Acquirer, or Card scheme, or a combination of them, is enabled. Possible values: empty, M=Merchant, A=Acquirer, P=Card scheme.
- \[dateformat] - Indicates the format of the selected date. M=month, W=Week number, D=Calendar day.
- \[fromdate] – Start date of the report. Format: `yyyy-mm-dd`
- \[untildate] – End date of the report. Format: `yyyy-mm-dd`                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| [Dispute transaction details report](/reporting/disputed-transactions)                                                      | dispute\_report\_\[date].csv Parameters:- \[date] – the date for which the report is generated. Format: `yyyy_mm_dd`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |

## See also

* [Manually get reports](/reporting/manually-get-reports)
* [Time zone setting](/reporting/time-zone-setting)
* [Get reports using SFTP](/reporting/automatically-get-reports/get-reports-using-sftp)
