API Logs

Learn about the Square API Logs feature, which lets you view the request and response of API calls.

Link to section

Overview

Square APIs write transaction information to a central log that you can use for diagnostics, troubleshooting, and auditing. The logs consist of an overview page showing all entries and a detailed page for each log entry that shows the transaction request and response, as well as a summary of the API call. Sensitive data, such as access codes and merchant IDs, are redacted from the logs. Logs are retained for 28 days.

Link to section

View API logs

After each request in API Explorer, a View Logs button appears in the response pane. Choose the button to view the log files.

An animated graphic showing how to use the API Logs feature.

Note

The maximum size of an individual log entry is 50k. Any bytes beyond that limit are truncated.

The API Logs page gives you the ability to search and filter log entries. The following screenshot shows the features of API Logs:

A screenshot showing the API Logs page.

  1. Filter log entries by date and time.
  2. Filter log entries by API, endpoint, HTTP status code, or error code.
  3. Search log entries by keyword, API name, or other values.
  4. The overview table includes:
    • The status code returned by the API request.
    • The Square API called.
    • The endpoint and HTTP method.
    • The date of the request.

Each log entry has a summary, request, and response page.

The Summary tab shows application and seller information along with the API name and endpoint.

A screenshot of the Summary tab, which shows application and seller information along with the API name and endpoint.

The Request tab shows the API request and provides links to the API Reference and to API Explorer. Use the Copy button to copy the request.

A screenshot of the API Logs Request tab, which shows the API request and provides links to the API Reference and to API Explorer

The Response tab shows the API response and provides links to the API Reference and to API Explorer. Use the Copy button to copy the response.

A screenshot of the API logs Response tab, which shows the API response and provides links to the API Reference and to API Explorer.

Link to section

See also