Use our notifications webhooks to automatically download the reports generated in your Customer Area.
Step 1: Automate generating reports
Configure reports to generate automatically
You need the Merchant Report user role.
- In your Customer Area, go to Reports in the left navigation.
- 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.
- From the list of reports, select the report you want to configure under the Name column.
- Select Automatic generation. Configure additional report settings, like frequency, if available.
- Select a report format. For example, .CSV.
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 affects how your reports are generated.
Select Add report schedule and do the following:
-
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.
-
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.
-
Select Schedule to create a new schedule for automatic report generation.
Step 2: Get notifications when reports are available
Follow the instructions on our Notification webhooks page to expose an endpoint, set up notifications in your Customer Area, and accept notifications.
When a new report has been generated, you will receive a REPORT_AVAILABLE notification. 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.
{
"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"
}
}
]
}
<?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:
- Merchant admin
- Manage API credentials
To create a new credential:
-
Log in to your Customer Area, and go to Developers > API credentials.
This opens a list with all API credentials linked to your company account. -
Select Create new credential.
-
Under User type, select Report user.
-
Go to the end of the page and select Save.
-
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.
-
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.
-
Under Roles and Associated Accounts,
-
Select Roles, and make sure the toggle for Merchant Report Download role is assigned.
-
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.
-
-
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:
- If you haven't already done so, generate a PGP key.
- Register your PGP public 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 the report with an HTTP GET request. Include:
- The name of your report API credential.
- The basic authentication password for your report API credential.
- The URL from the
reason
field in the REPORT_AVAILABLE notification.
Here is how you would download the report for the API credential report@Company.YOUR_COMPANY_ACCOUNT
:
Merchant Account Reports:
$ wget --http-user='report@Company.YOUR_COMPANY_ACCOUNT' \
--http-password='YOUR_BASIC_AUTH_PASSWORD' \
https://ca-test.adyen.com/reports/download/MerchantAccount/YOUR_MERCHANT_ACCOUNT/REPORT_FILE_NAME
Company Account Reports:
$ wget --http-user='report@Company.YOUR_COMPANY_ACCOUNT' \
--http-password='YOUR_BASIC_AUTH_PASSWORD' \
https://ca-test.adyen.com/reports/download/Company/YOUR_COMPANY_ACCOUNT/REPORT_FILE_NAME
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 | settlement\_detail\_report\_batch\_[Batch Number].csv Parameters:
|
Aggregate settlement details report | settlement\_report\_aggregate\_[yourAccountName]\_[countrycode]\_[additionalData]\_[fromdate]\_[untildate].csv Parameters:
|
Payment accounting report | payments\_accounting\_report\_[date].csv Parameters:
|
Account Updater results report | account\_updater\_results\_\_[additionalData]\_[dateformat]_[fromdate]-[untildate].csv Parameters:
|
Dispute transaction details report | dispute\_report\_[date].csv Parameters:
|