Get Activation Code request
An overview of the Get Activation Code message for Android.
- Overview
- Get Activation Code request
- Get Activation Code response
- Key to card terminal product categories
- Get Support
Overview
👉 The Get Activation Code request is used to obtain an activation code without needing to interact with the ‘Viva.com Terminal’ application manually. An activation code is required for manual card terminal activation through the Viva account.
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.
- Get Activation Code request originating from the client app to trigger the activation code request.
- Get Activation Code response originating from the ‘Viva.com Terminal’ application to return the result of the activation code request.
Get Activation Code request
For a typical Get Activation Code request, 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"
+ "&appId=com.example.myapp"
+ "&action=getActivationCode"
+ "&callback=mycallbackscheme://result"));
payIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
payIntent.addFlags(Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);
startActivity(payIntent);
Get Activation Code response
After executing a Get Activation Code request, the ‘Viva.com Terminal’ application responds with a response result to indicate if the request was successful or not, along with the activation code (if the request was successful).
The result is received as a URI in the callback activity intent:
Uri result = getIntent().getData();
The table below summarizes the contents of an approved response.
A Get Activation Code response result for an approved transaction looks as follows:
mycallbackscheme://result?status=success&message=Activation code retrieved.&action=getActivationCode&virtualId=88932C88A4C04051B42594AF99B5FA4D&activationCode=734888368
It is expected that a Get Activation Code request will fail for various reasons. A failed Get Activation Code response looks as follows:
mycallbackscheme://result?status=fail&message=(-2990)POS_IS_ALREADY_ACTIVATED&action=getActivationCode
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!