question

hillsprospectit avatar image
hillsprospectit asked hillsprospectit answered

Clover API. Cannot find a refund.

Hi,


Every night I retrieve the previous days payments via the following API Call,


v3/merchants/mId/payments?offset=0&limit=1000&access_token=<token>&expand=serviceCharge&expand=refunds&filter=createdTime%3E%3D1576627200000&filter=createdTime%3C%3D1576713599999


Normally this would pick up refunds nicely, but for 2019-12-18 it seems to have missed one that I can see when logged into the dashboard running reports for the day in question.


The refund was placed on 18-Dec-2019 5:48 pm so I would expect it to be retrieved in the above request.

Refund
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

hillsprospectit avatar image
hillsprospectit answered

Seems the refund is somehow backdated to the 7th of November.

I'm getting the refund data from v3/merchants/mId/refunds? instead and filtering on the clientCreatedTime which is displaying the data correctly for me. Thanks for your help.



10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

David Marginian avatar image
David Marginian Deactivated answered David Marginian Deactivated edited

Is it pulling in other refunds? Per our API docs:

https://docs.clover.com/clover-platform/docs/expanding-fields

To expand multiple fields in a request, separate the fields with a percent-encoded comma (%2C). In the following example, the response expands both the tags and categories fields.

You are using a different format which I am not certain works.

If your format does work, query for the refund individually, what is the createdTime (rawMillis)?

10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community