Tap on Any Device on iOS
Information on our iOS Softpos app integration solution.
Our ‘Viva.com Terminal’ application (tap-on-phone) supports Apple Tap to Pay in the UK, the Netherlands, France, Austria, Czech Republic, Ireland, Romania, and Sweden, Italy & Germany, with the following important note:
Due to Apple’s commercial policy, for inter-app integrations if the PIN entry screen on the Viva Terminal app is presented to the end user, the third-party client application (in the background) will be ‘reset’ to its idle screen, losing its current state.
If the PIN entry screen is not displayed (i.e. for failed payments or for successful payments below these limits), the third-party application will be re-opened successfully, without losing its state.
Overview
Please see below for information on integrating with Viva’s iOS POS App.
The Viva Viva POS App for iOS can receive requests for initiating transactions from third-party apps installed on the same iOS mobile device. Communication with the Viva POS App is done through the use of URL schemes and by implementing UIApplicationDelegate’s instance method application(_:open:options:) on the AppDelegate file of the client’s app project. The client app should create an URL scheme using specific parameters that will initiate the Viva POS App’s pay activity. When the Viva POS App’s pay activity finishes it returns the transaction result to the caller app.
ToP (Tap-on-Phone) is for for Apple iPhone devices iOS 13 or above
Messages
The client app must implement a mechanism to send messages using URL schemes and to receive the result in a custom URI callback.
Sales-related requests
- Sale request originating from the client app to initiate a request for a new Sale transaction
- Pre-auth request originating from the client app to initiate a request for a new Pre-auth transaction.
- Capture Pre-auth request originating from the client app to initiate a request for a Capture Pre-auth transaction.
- Cancel/Refund request originating from the client app to initiate a request for a Cancel/Refund transaction
- Abort request originating from the client app to abort (if possible) the last request
- Batch request originating from the client app to open/close (if possible) a batch
- Reprint request originating from the client app to reprint a transaction receipt
Configuration-related requests
- Set Printing Settings request originating from the client app to set the Viva.com Terminal App printing settings
- Get Printing Settings request originating from the client app to get the Viva.com Terminal App’s printing settings
- Send Logs request originating from the client app to open/close (if possible) a batch
- POS Activation request originating from the client app to trigger the POS activation
- Get Activation Code request originating from the client app to trigger the Get Activation Code request
Callback activity
The ‘Viva.com Terminal’ application will deliver the URL to your app by calling your app delegate’s application(_:open:options:) method. The following code should be added to the method in order to parse the contents of the URL and take the appropriate actions. To ensure the URL is parsed correctly, use NSURLComponents APIs to extract the components.
func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
guard let components = NSURLComponents(url: url, resolvingAgainstBaseURL: true),
let path = components.path,
let params = components.queryItems else {
print("Invalid URL or path missing")
return false
}
print("Path: \(path)\nComponents: \(params)")
//MARK: - Do any additional actions after parsing the data
return true
}
func performInterAppRequest(request: String){
guard let url = URL(string: request) else { return } // url with constructed parameters
UIApplication.shared.open(url) { (result) in
print("InterApp Request URL:\n", url)
if result {
// The URL was delivered successfully!
}
}
}
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!