Set Tip Settings
An overview of the Set Tip Settings request message for Android.
- Overview
- Set Tip Settings request
- Set Tip Settings response
- Key to card terminal product categories
- Get Support
Overview
π The Set Tip Settings request is used to configure and apply changes to the tipping settings of the ‘Viva.com Terminal’ application, i.e. to enable or disable the tipping feature and to choose which tip options are offered.
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.
- Set Tip Settings request originating from the client app to change the tip settings.
- Set Tip Settings response originating from the ‘Viva.com Terminal’ application to return the result of a Set Tip Settings request.
Set Tip Settings request
For a typical Set Tip Settings request, the client app must provide the following information:
-
enableTip has the highest hierarchy. If enableTip=false, the values of all the other tip parameters are skipped.- If
enableTip=true and enableRoundTip=true, then enableCustomTip and enablePercentageTip are forced to false, regardless of the values passed in the request.
The table below summarises the settings that are applied for each combination:
| enableTip | enableRoundTip | enableCustomTip | enablePercentageTip | enableRoundTip (applied) |
|---|---|---|---|---|
| false | any value | Ignored | Ignored | |
| true | true | false (forced) | false (forced) | true |
| true | false | As passed in the request | false | |
The above information elements must create a URI call, i.e.
String reqStr = "vivapayclient://pay/v1"
ββββ+ "?appId=com.example.myapp"
ββββ+ "&action=set_tip_settings"
ββββ+ "&enableTip=true"
ββββ+ "&enableCustomTip=true"
ββββ+ "&enablePercentageTip=false"
ββββ+ "&enableRoundTip=false"
ββββ+ "&callback=mycallbackscheme://result";
Intent payIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(reqStr));
payIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
payIntent.addFlags(Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);
startActivity(payIntent);Set Tip Settings response
After executing the Set Tip Settings request, the ‘Viva.com Terminal’ application responds with a response to indicate if the tip settings have been applied successfully 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 Set Tip Settings response result for an approved request looks as follows:
It is expected that certain requests will fail for various reasons. A Set Tip Settings response result for a failed request looks as follows:
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, or if you have any queries about our products and solutions, please see our Contact & Support page to see how we can help!

