The purpose of this document is to detail the steps and approaches for automating the process of downloading settlement reports from Adyen and uploading them to Google Drive
Reducing manual effort
Enable Adyen Report Automation(Not required, Already configured)

Configure Webhook

While configuring the Automatic Generation of reports the report schedule needs to be set, for which the frequency(Daily/Weekly/Monthly) of the report can be mentioned
Currently, the frequency is set as daily, so every day Adyen will post the Report Available notification JSON data to the callback URL
In the last 100 days, the maximum size of the report data generated for SG is 5.7 KB & the minimum is less than 1 KB. Attached is a report file for sample
settlement_detail_report_batch_445.csv
The report automation includes below tasks
Expose an endpoint from the consumer server - This is after building the API
Setting up a webhook - Manual
Accept Notification
<aside> 💡 This is to confirm that the notification was sent by Adyen, and was not modified during transmission. For more information, refer to Verify HMAC signatures. If the HMAC signature is not valid, Adyen does not recommend acknowledging the notification.
</aside>
Store the notification in your database - We will use SQS
Acknowledge the notification with an HTTP 200 OK
and the following response body:
[accepted]
Apply the business logic
<aside> 💡 Need to make sure that acknowledgment of the notification happens before applying any business logic because a breakage in business logic could otherwise prevent important updates from reaching the system. The business logic explained in the next steps
</aside>