Foreground request

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.

Foreground request

Using the foreground action, the user can bring to foreground Android POS App from a third-party app. For a typical foreground request, the client app must provide the following information:

Field Description Example Card terminal support
scheme The Viva's custom URL scheme, the host and the version. 'vivapayclient://pay/v1' Viva Wallet POS app for Android
merchantKey The merchant's key. For successful validation, should not be empty.
Deprecated: you may pass any value.
'SG23323424EXS3' Viva Wallet POS app for Android
appId The client app ID. For successful validation, should not be empty. 'com.example.myapp' Viva Wallet POS app for Android
action Set printing settings. For successful validation, should not be empty. 'set_printing_settings' Viva Wallet POS app for Android
callback The URI callback that will handle the result. For successful validation, should not be empty. 'mycallbackscheme://result' Viva Wallet POS app for Android

This action does not send back a response.

The above information elements must create a URI call, i.e.

String reqStr = "vivapayclient://pay/v1"
		+ "?merchantKey="MY_MERCHANT_KEY"
		+ "&appId=com.example.myapp"
		+ "&action=foreground"
		+ "&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);

Get Support

If you have any questions about our solutions, or questions about how to integrate with our solutions, please refer to our Get Support page.