question

georgi avatar image
georgi asked georgi commented

How to hook up when a merchant does manual refund?

Hey guys,

is there a way for me to hook up a broadcast receiver in my android app and receive an event when the merchant refunds a purchase?

I have done this:

    <receiver android:name="org.getti.clover.ui.receivers.OrderRefundReceiver">
        <intent-filter>
            <action android:name="clover.intent.action.MANUAL_REFUND" />
        </intent-filter>
    </receiver>

but I don't receive anything.

Thanks!

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.

1 Answer

Duane Moore avatar image
Duane Moore answered georgi commented

You should be able to listen for a broadcast of com.clover.intent.action.REFUND_PROCESSED (for a refund of an existing payment) or com.clover.intent.action.CREDIT_PROCESSED (for a manual refund, aka naked refund or "credit") with extras of com.clover.intent.extra.ORDER_ID, com.clover.intent.extra.CREDIT_ID or com.clover.intent.extra.PAYMENT_ID and com.clover.intent.extra.AMOUNT. These broadcasts will be fully documented in clover-android-sdk in a future release.

Note that clover.intent.action.MANUAL_REFUND is the intent used to launch a manual refund (refund to a credit card that is not tied to any existing payment.

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.

tg avatar image tg commented ·

Hey Duane is there a similar broadcast for exchanges?

0 Likes 0 ·
georgi avatar image georgi commented ·

Thanks a lot! It is working!

0 Likes 0 ·

Welcome to the
Clover Developer Community