question

cloveruser808 avatar image
cloveruser808 asked cloveruser808 commented

When does the modifiedTime in the Payments endpoint get updated?

Using the payments end point, I see there's a modifiedTime, just like in the orders API. When I do a refund, however, the modifiedTime from the payments API doesn't seem to get updated.

How can I filter payments that have been modified after a certain time, if the modifiedTime doesn't get updated when a refund occurs?

PaymentsREST API
5 comments
10 |2000 characters needed characters left characters exceeded

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

I am working on getting some information for you regarding this.

0 Likes 0 ·

The payment doesn't get modified when a refund occurs, but the order does. Will using the order work for your situtation?

0 Likes 0 ·
cloveruser808 avatar image cloveruser808 David Marginian ♦♦ ·

Thank you for your answer.

As to will it work? It depends. Are there any situations in which a payment is modified via refund, status change (FAILED), or any other modification, for which the order that the payment was attached to isn't modified?

I guess I'm confused as to why the modifiedTime field isn't updated when the payment object is clearly updated with a refund.

I used to use the "orders" endpoint to update payment info. But after noticing some mathematical differences in my numbers vs Clover dashboard, I started using the Payments endpoint to calculate totals. For orders, my code does this:


  1. Get the last modified order time from my local table
  2. GET all orders with a modified time greater than my last modified order


This has worked well for orders. But I can't do this for payments. In order to check if any payment objects have been modified, I have to get all payments for the given day. And even then, I'm risking not getting modified payments from previous days.

If I could pull all payments modified after my local table's last modified payment, I can be sure that I'm seeing all updates.

For example, I don't know the sequence of how this occurred, but at some point, there was an offline order. When the system came back online, the payment for the order was declined and failed. The payment itself was no longer attached to the orderID, when using the GET orders endpoint. So if I had searched for modified orders, this one may not have shown up.

While that scenario is obscure, I've been finding lots of rare and obscure events that happen depending on how a cashier bumbles an order.

0 Likes 0 ·

Thanks for the excellent description. I am not disagreeing with you. It does seem that the modified time should be updated if a refund is added to the payment. I am still researching this and have some outstanding questions to the payments team. If they agree that it is an oversight I will create an internal issue and we will address it at some point.

0 Likes 0 ·
Show more comments

1 Answer

· Write an Answer
David Marginian avatar image
David Marginian answered cloveruser808 commented

Thanks. The payments team agreed that the payment's modified time should be updated upon refund. I will create an internal issue to track this. They also suggested as a workaround using the payments endpoint and passing a filter on order.modifiedTime. They said that this approach should work for your use case because the order's modified time is kept up to date.

3 comments
10 |2000 characters needed characters left characters exceeded

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

Oh, clever solution. I'll give that a try.

Is there a way to be notified on certain tickets/updates? I'd love to know when this change is made, now that the payment team is looking into it.

I understand it can take some time; so it would be good to know.

0 Likes 0 ·

No, our issue tracking is internal. However, I will watch the issue and update you. It may take quite a bit of time because I don't expect it to be a high priority.

0 Likes 0 ·
cloveruser808 avatar image cloveruser808 David Marginian ♦♦ ·

Thank you.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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