question

Bryanne Vega avatar image
Bryanne Vega asked Jacob Abrams commented

Intents for Refunds?

I'm looking forward to have a listener for refunds and it's amounts with it's payment/refund ID.

Is this possible using the Intents?

10 |2000

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

Jacob Abrams avatar image
Jacob Abrams answered Jacob Abrams commented

I don't see an Intent publicly exposed in the SDK that you can operate from a refund is performed. We have our own internal intent com.clover.intent.action.REFUND_PROCESSED, but we could refactor that away at any time so I wouldn't rely on that. You might instead consider using a Service that listens using an IOnOrderUpdateListener2 which you can find in the clover-android-sdk. Remember that there are Refunds, Voids (cancels a payment) and Credits (returns money without an associated payment). I'm not sure which you might be interested in. If I were developing an app I would ideally like to tap into the TransactionsProvider that is maintained by the Clover Transactions app, that gives all the information about transactions through a ContentProvider and changes to transactions via ContentObserver notifications. Unfortunately the contract for the TransactionsProvider is not exposed. The IOnOrderUpdateListener2 seems like the next best thing.

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.

Bryanne Vega avatar image Bryanne Vega commented ·

Great answer, the issue with this is that my app reports sales to the goverment. I need to know if voids/refunds have been made and report them. It can't use any modules that the 2000 software doesn't have. Are these listeners available without the modules?

0 Likes 0 ·
Jacob Abrams avatar image Jacob Abrams ♦♦ commented ·

For Merchants using Clover purely as a payment terminal where there are no orders you are out of luck as far as I can tell. I have a ticket open to expose the Transactions ContentProvider with our developer platform team. Hopefully they will see that and/or this discussion and move on it.

0 Likes 0 ·
michael avatar image
michael answered Jacob Abrams commented

In addition to what Jacob said, I'm pretty sure you can just add a broadcast listener for com.clover.intent.action.REFUND_PROCESSED as this is how some apps are listening for refunds at the moment.

But I would suggest that the best long term option is to have a server that can receive payment webhook events. That way you will be notified about payments and refunds in a uniform manor across all device and plan types. (https://docs.clover.com/build/web-app...)

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.

Jacob Abrams avatar image Jacob Abrams ♦♦ commented ·

I think that `com.clover.intent.action.REFUND_PROCESSED` and `com.clover.intent.action.CREDIT_PROCESSED` will only work on merchants that are using Clover Orders, on so called 2000 merchants that are using Clover solely to take payments in a semi-integrated setup with a non-Clover POS this intent won't be invoked.

0 Likes 0 ·
Bryanne Vega avatar image Bryanne Vega commented ·

Will web hooks have any part in this?

0 Likes 0 ·

Welcome to the
Clover Developer Community