currently if I want to use the APIs to determine if a refund was applied to a payment, I’d have to call several functions from the payments and the refunds api and match up the data, which would result in me receiving errors for making too many requests if I had a giant customer base.
My idea to alleviate this if I was working for square would be to allow the following additional inputs when trying to list payments or get a payment:
Input: Show payments that have refunds?
Response options:
- show only payments with refunds
- show only payments with no refunds attached
- I dont care (default option)
Input: Show payments between low value and high value. (no answer = don’t put a value limit)
Then in the returned response, also show the refund values if requested from input.
If this is implemented, then one would only need to call the payment API to determine if refunds are applied, cutting the load on your server of up to 50%.
Can such updates be applied to the API?