Adyen for Java developers
All developers know it, the quality of error messages are just as important as good documentation when integrating with a third party API.
With Adyen's APIs, most error messages should be pretty descriptive. For example, here is what happens when trying to create a payment with a card information that is incorrect:
We even have a dedicated page in our documentation to list all potential Error Codes that you might see.
However, even if those messages are expressive enough and very useful to implement your integration in the right way, they may sometimes come short to really understand what's going on under the hood. To get all the details of what happened, it can be helpful to have an overview of the API request, response and headers in one place. Not only for troubleshooting, but in general to gain a better understanding of what technically goes on for e.g. a transaction.
Thanks to the new API Logs page of the Developers section in your customer area, this is now possible. Let's dive together into the details!
The goal of API Logs is to facilitate your integration investigations by letting you oversee the interaction between your integration application and Adyen APIs , but it can also help you track down errors during migrations, upgrades or even on your production systems. API Logs are available on both TEST and LIVE environments.
On that page, you will be able to see a table with a list of all the API calls made to Adyen's endpoints in the 7 days for the currently selected account. You will also be able to see the number of log lines incoming in the next refresh next to the refresh button, letting you easily know when to refresh the results.
Tip : If you select a company account, you'll see all of the calls for this company account and all associated merchant accounts as well
For each call, crucial information is displayed, such as the HTTP response code of course and the PSP reference, but the originating web service user as well (with a helpful link) so you know who initiated the API request.
By default, all API Logs will be visible and sorted in reverse chronological order. When investigating an issue from the past, that might be a bit challenging to go through!
To make it easier, many filters have been made available. For example, we might want to look for a successful POST call (2xx) to the Checkout API today. With the filter, this is quickly done.
Once you have found the API call you were searching for, you can click it to get access to a detailed view of the selected request.
In this view, you will be able to access all of the headers from the request and the response, as well as their payload, all in one place. For example, we can see in the user-agent that this API call was made using the Java library (Indeed, from our java sample).
We are also able to access the PSP reference, which can be used further down the line to search for additional payments information in the customer area.
Finally, using the copy button at the bottom right corner of the payloads, we can quickly copy the information. This can be useful for example in order to replay the call, to add in a test or document your problem further in your GitHub issue.
Additionally - note in the payment example - where cardholder and personally identifiable shopper data is redacted in compliance with PCI DSS masking requirements. You can make the most of our customer-facing API logging tool without being concerned about exposing sensitive information.
We hope you like the first iteration of this new view which is designed to help engineers and other technical users manage your integration and sort through issues better and faster.
We are very keen on hearing your feedback on this new feature so please let us know how we can further improve API Logs. And if you want to dive deeper into API Logs, have a look at the exhaustive documentation page.
By submitting this form, you acknowledge that you have reviewed the terms of our Privacy Statement and consent to the use of data in accordance therewith.