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.
You can view the logs on the API Logs page for your application in the Developer Console and in API Explorer. After each request in API Explorer, a View Logs button appears in the response pane. Choose the button to view the log files.
The API Logs overview page gives you the ability to search and filter log entries. The following screenshot shows the features of API Logs.
- Filter log entries by date and time.
- Filter log entries by API, endpoint, HTTP status code, or error code.
- Search log entries by keyword, API name, or other values.
- 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 page shows application and seller information along with the API name and endpoint.
The request page shows the API request and provides links to the API Reference and to API Explorer. Use the Copy button to copy the request.
The response page shows the API response and provides links to the API Reference and to API Explorer. Use the Copy button to copy the response.