POS Activation request

An overview of the POS Activation request message for iOS.

Overview

👉 The POS Activation request is used to complete the activation process of the POS application, including sign-in and initial configuration.

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

This feature is only supported in Viva Wallet’s Production environment (VW POS app). The VW POS Demo environment cannot be used to carry out tests for this integration.

To use this feature, you will need to generate and use the required POS APIs credentials

POS Activation request

For a typical POS Activation request, 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 Activate POS action. For successful validation, should not be empty. 'activatePos'
callback The URI callback that will handle the result. For successful validation, should not be empty. 'mycallbackscheme://result'
apikey The API key ('Client ID') required for the POS activation. For successful validation, this should not be empty. You can find this credential here. “qwerty123456“
apiSecret The API Secret ('Client secret') required for the POS activation. For successful validation, this should not be empty. You can find this credential here. “qwerty123456“
sourceID The source that POS will be assigned to. Not required for succesfull validation. If not provided “Default” source will be used “qwerty123456“
pinCode Optional parameter for PIN code for settings lock (if provided, settings are automatically locked and PIN set to the supplied value). 123142
activateMoto Optional boolean parameter ( default value = false) for activating Moto payment method true
activateQRCodes Optional boolean parameter ( default value = false) for activating QR payment method true
disableManualAmountEntry Optional boolean parameter ( default value = false) for disabling manual amount entry true
forceCardPresentmentForRefund Optional boolean parameter ( default value = false) for forcing card presentment for refund true
lockRefund Optional boolean parameter ( default value = false) for locking refund with pin true
lockTransactionsList Optional boolean parameter ( default value = false) for locking transaction list with pin true
lockMoto Optional boolean parameter ( default value = false) for locking moto with pin true
lockPreauth ptional boolean parameter ( default value = false) for locking preauth with pin true

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=activatePos"
                                    + "&apikey=qwerty123456"
                                    + "&apiSecret=qwerty123456"
                                    + "&sourceID=qwerty123456"
                                    + "&pinCode=1234"
                                    + "&activateMoto=true"
                                    + "&activateQRCodes=true"
                                    + "&disableManualAmountEntry=true"
                                    + "&forceCardPresentmentForRefund=true"
                                    + "&lockRefund=true"
                                    + "&lockTransactionsList=true"
                                    + "&lockMoto=true"
                                    + "&lockPreauth=true"
                                    + "&callback=mycallbackscheme://result"

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

POS Activation response

After executing a POS activation, the Card Terminal App responds with a POS activation response result to indicate if the POS activation was successfull or not.

The result is received as a URI in the application(_:open:options:) method on the AppDelegate file:

The table below summarizes the contents of an approved response.

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. 'Transaction successful'
action Activate POS action. 'activatePos'
virtualId App FirebaseId '60DEC5165EBC41DEAAE693FD51B1F3FC'
sourceTerminalId Connected Terminal Id - optional '16027706'
merchantID Activated Merchant Id - optional ‘c21ac4b3-b1e1-4e7c-a65e-aedee7412321’

A POS activation response result for an approved request looks as follows:

It is expected that POS activation will fail for various reasons. A POS activation 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!