Get Activation Code request

An overview of the Get Activation Code message.

Overview

The client app must implement a mechanism to send messages using intents and URI calls and to receive the result in a custom URI callback.

Get Activation Code request

For getting an activation code, the client app must provide the following information:

Field Description Example
scheme The Viva's custom URL scheme, the host and the version. 'vivapayclient://pay/v1'
appId The client app ID. For successful validation, should not be empty. 'com.example.myapp'
action Get activation code action. For successful validation, should not be empty. 'getActivationCode'
callback The URI callback that will handle the result. For successful validation, should not be empty. 'mycallbackscheme://result'

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

// USE LIKE THIS
    func activatePos() {
                let url =  "vivapayclient://pay/v1"
                                       + "?appId=com.example.myapp"
                                       + "&action=ActivationCode"
                                       + "&callback=mycallbackscheme://result"

         (UIApplication.shared.delegate as? AppDelegate)?.performInterAppRequest(
            request: url)
    }

Get Activation Code response

If the request is successful, the response will have the status request along with the activation code.

Field Description Example
callback The URI callback that will handle the result. 'mycallbackscheme://result'
status The status of the transaction. 'success'
message A string containing information about the transaction status. 'Fetched activation code'
action Get Activation Code action. 'getActivationCode'
virtualId App FirebaseId '60DEC5165EBC41DEAAE693FD51B1F3FC'
activationCode Activation Code to use for POS Activation '913398365'
merchantID Activated Merchant Id - optional ‘c21ac4b3-b1e1-4e7c-a65e-aedee7412321’

A Get Activation Code response for an approved transaction looks as follows:

It is expected that Get Activation Code will fail for various reasons. A Get Activation Code failure response looks as follows:

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 Get Support page to see how we can help!