Get/v2/Payments API Query Parameters for Status = Completed

In our Celigo integration, we have a lookup to Get Square Payments. We would like to filter the lookup to only include when Status = COMPLETED.

Using the Query Parameters from the API documentation, it does not appear that status is a field on the Query parameters. Is there a workaround, or another way to Query based on Status=Completed


Without being able to ‘Omit’ Status = Failed from the Get Payments API, if the first record happens to be a failed record, it will not successfully process into our ERP system and no consequent records will be processed. A secondary issue is that if the first record happens to be a failed record not all of the fields are available if we were trying to make adjustments to mappings, filters, hooks, or scripts.

:wave: I’m Square Dev AI, here to help answer your question!
Based on the information you’ve provided, the following documentation will help answer your question:

Additional Documentation

Payments Requirements
Take Payments
Migrate from the Connect V1 Payments API

If this documentation helped you find a solution, please check the box indicating that this reply solves the problem.
Otherwise one of our Developer Advocates will provide additional assistance shortly.

The Payments API does not currently support filtering by payment status directly in the API request. However, you can retrieve all payments and then filter the results in your application code to only include payments with a status of “COMPLETED”. This would involve making the API call, receiving the response, and then iterating over the response data to filter out any payments that do not have a status of “COMPLETED”.

This answer was reviewed by @Bryan-Square.