---
title: "API logs"
description: "Learn how to use API logs to analyze or debug API requests."
url: "https://docs.adyen.com/development-resources/logs-resources/api-logs"
source_url: "https://docs.adyen.com/development-resources/logs-resources/api-logs.md"
canonical: "https://docs.adyen.com/development-resources/logs-resources/api-logs"
last_modified: "2023-04-13T13:37:00+02:00"
language: "en"
---

# API logs

Learn how to use API logs to analyze or debug API requests.

[View source](/development-resources/logs-resources/api-logs.md)

When you are integrating with Adyen, you may want to analyze or debug API requests, for example for test payments.

Using API logs, you can see information about your API requests in the Customer Area. You can troubleshoot the requests and responses, and see the metadata of your API requests.

The logs show all API requests made in your test or live environment in the past thirty days. Requests older than thirty days are removed from the API logs.

## Using API logs

API logs only support API requests that use JSON.

To view API logs, you must have one of these [user roles](/account/user-roles):

* Merchant admin
* Technical integrator

To view and search API logs:

1. Log in to your [Customer Area](https://ca-test.adyen.com/). Stay on the company account or select a merchant account. API logs for APIs used in a balance platform integration are available on the company account.
2. Select **Developers > API logs**. This will show a list of every API request made in the past thirty days.
3. Select an item to see the details of that API request. You will see the timestamp, which API was called, the PSP reference or resource ID, and full details of the request and response. Type a PSP reference or request ID into the search bar, or use the various filter options to search by date, API, endpoint, or HTTP method.

## Example

You can use API logs in end-to-end testing, to see details of the requests you have made to our APIs.

If you are testing the checkout flow for your online payments setup and a payment fails, you can check the API logs to see details of what you sent to the API and why the payment failed. You can compare failed API requests with successful ones.

Go to the API logs page. In the **PSP reference** column, select the payment reference to see details of the API request.

* Under **Response status** at the top right of the page you will see the [error code](/development-resources/error-codes).

* In the **Request body** section, you see the details of the request, including which endpoint the request was sent to.

* In the **Response body** section, you can see details of the response.

For example, when you see error code 422, the API request contained input that was not valid. The response body shows which field had the invalid input.

You can then check on your side what input was sent and make changes.

## See also

* [Test authorisation result codes](/development-resources/testing/result-codes)
* [Error codes and messages](/development-resources/error-codes)
* [Response handling](/development-resources/response-handling)
