POS Activation request

An overview of the POS Activation request message for iOS.

Our ‘viva.com | Terminal’ application (tap-on-phone) supports Apple Tap to Pay in the UK, the Netherlands & France

Overview

👉 The POS Activation request is used to complete the activation process of the Viva POS App, 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.

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 the POS will be assigned to. Not required for successful validation [A payment source (physical store) that is associated with a terminal]

How to create a payment source for stores
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 ‘viva.com | Terminal’ application 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.

Please see a list of possible error codes.
'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:

Error codes

The following error codes may be displayed in the response to this request.

CodeMessage
6000wrongParameters
6099generic
800615tokenActivationPosFailed
800625posActivationFailed
800715verifyUserCodeFailed

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!