Fast Refund request
An overview of the Fast Refund message for Android.
- Overview
- Fast Refund request
- Fast Refund response
- Key to card terminal product categories
- Get Support
Overview
👉 The Fast Refund request is used to perform a ‘fast refund’ for a payment made with a Visa, Mastercard, or Maestro card.
The client app must implement a mechanism to send messages using Android intents and URI calls and to receive the result in a custom URI callback.
- Fast Refund request originating from the client app to initiate a request for a Fast Refund transaction.
- Fast Refund response originating from the ‘viva.com | Terminal’ application to return the result of a Fast Refund transaction.
Fast Refund request
For a typical Fast Refund request, or refund, the client app must provide the following information:
The above information elements must create a URI call, i.e.
Intent payIntent = new Intent(Intent.ACTION_VIEW, Uri.parse( "vivapayclient://pay/v1"
+ "?merchantKey="MY_MERCHANT_KEY"
+ "&appId=com.example.myapp"
+ "&action=send_money_fast_refund"
+ "&callback=mycallbackscheme://result"
+ "&amount=100"
+ "&show_receipt="+true
+ "&show_transaction_result="+true
+ "&show_rating="+true ));
payIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
payIntent.addFlags(Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);
// Those two flags should be added for paydroid implementations
// payIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);
// payIntent.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);
startActivity(payIntent);
Fast Refund response
After executing a Fast Refund transaction, or refund, the ‘viva.com | Terminal’ application responds with a Fast Refund response result to indicate if the refund has been approved or not.
The result is received as a URI in the callback activity intent:
Uri result = getIntent().getData()
The table below summarises the contents of an approved response.
A Fast Refund response result for an approved refund looks as follows:
mycallbackscheme://result?status=success&message=Transaction successful&action=send_money_fast_refund&clientTransactionId=1234567801234&amount=1200&tipAmount=0&verificationMethod=CONTACTLESS - NO CVM&rrn=107715996464&cardType=Mastercard&referenceNumber=996471&accountNumber=************9666&tid=16000223&orderCode=1077172694000223&shortOrderCode=1077172694&transactionDate=2021-03-18T17:09:50.8747721+02:00&transactionId=5f3ecbbe-d2da-4e59-9d38-610fddd79c73
It is expected that certain transactions will fail for various reasons. A Fast Refund response result for a failed refund looks as follows:
mycallbackscheme://result?status=fail&message=(-24) REFUND_INVALID_AMOUNT&action=send_money_fast_refund&amount=10000&tipAmount=0&verificationMethod=CONTACTLESS - NO CVM&cardType=Mastercard&referenceNumber=0&accountNumber=537488******9666&tid=16000223&orderCode=0&shortOrderCode=0
The structure of the message is the same as in the case of an approved Fast Refund.
Key to card terminal product categories
To understand the icons used on the above tables, see the below table.
Product category | Terminal models | Icon |
---|---|---|
Android Card Terminals | Android Card Terminal Ethernet, Android Card Terminal 4G, Mobile Card Terminal Plus, Mobile Card Terminal. | ![]() |
'viva.com | Terminal' application for Android | Mini Card Reader, Pocket Card Terminal connected via Bluetooth or USB to the 'viva.com | Terminal' application for Android. | ![]() |
Linux Card Terminals | Countertop, IM20, S900, S800, D200. | ![]() |
Get Support
If you would like to integrate with Viva Wallet, or if you have any queries about our products and solutions, please see our Contact & Support page to see how we can help!