question

sanjanaraj avatar image
sanjanaraj asked mitenko commented

Is there an API to determine if voids or refunds have been made on a payment?

We are using the PaymentConnector class from the Android SDK and we would like to be able to check if a payment has a void or refund(s) applied to it. I have tried to call retrievePayment(externalId) after processing a partial refund and I don't see anything in the response indicating that a refund was made.

Clover Android SDKClover MiniPaymentConnector
10 |2000

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

1 Answer

·
mitenko avatar image
mitenko answered mitenko commented

Hi sanjanaraj,

I am looking into the same thing. As far as I can tell, this is similar to pulling historical transactions--that is, the Android SDK doesn't support it. What I've been able to find so far is the refunds REST API call (https://docs.clover.com/reference/paygetrefunds). This query will return all refunds, and there's an expand field to add the originating payment. So I think the best way forward (for me at least) is to query this refunds endpoint, and then collate the data with the payments Endpoint to determine which payments have been refunded.

2 comments
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 ♦♦ commented ·

You should be able to use the OrderContract to query orders (and get their payments), https://community.clover.com/questions/19881/how-to-get-open-order-from-clover-sdk.html. Generally, you should avoid using the REST API from the device. If you don't find another way your would want to use the payments endpoint (https://docs.clover.com/reference/paygetpayments) and expand on refunds and voids.

0 Likes 0 ·
mitenko avatar image mitenko David Marginian ♦♦ commented ·

Thanks so much David!


Sooo... is there a way to pull Historical Transactions using the SDK?

https://community.clover.com/questions/37085/transaction-history-using-clover-sdk-for-android.html


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