Reset request
An overview of the Reset request message for iOS.
Overview
👉 The Reset request is used to perform either a soft or full reset of the ‘Viva.com Terminal’ application.
- A ‘soft’ reset (or ‘settings’ reset) will reset the app settings to their defaults without erasing your previously entered account information
- A ‘full’ reset will reset the app settings to their defaults, erasing your previously entered account information
The client app must implement a mechanism to send messages using URL schemes and to receive the result in a custom URI callback.
- Reset request originating from the client app to reset the ‘Viva.com Terminal’ application.
- Reset response originating from the ‘Viva.com Terminal’ application to return the result of the Reset request.
Reset request
For a typical Reset 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' |
| merchantKey | The merchant's key. Deprecated: you may pass any value. |
'SG23323424EXS3' |
| appId | The client app ID. For successful validation, should not be empty. | 'com.example.myapp' |
| action | Reset action. For successful validation, should not be empty. | 'reset' |
| softReset | A flag indicating whether the application will make a soft or a full reset.false, a full reset will be madetrue, a soft reset will be made |
'false' |
| 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 reset() {
let url = "vivapayclient://pay/v1"
+ "?merchantKey=MY_MERCHANT_KEY"
+ "&appId=com.example.myapp"
+ "&action=reset"
+ "&softReset=true"
+ "&callback=mycallbackscheme://result"
(UIApplication.shared.delegate as? AppDelegate)?.performInterAppRequest(
request: url)
}Reset response
After executing a Reset request, the ‘Viva.com Terminal’ application responds with a Reset response result to indicate if the Reset request was successful 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 request. | 'success' |
| message | A string containing information about the request status. | 'Full reset successfully completed!' |
| action | Reset action. | 'reset' |
A Reset response result looks as follows:
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!