Get printing settings request

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

Get printing settings request

Using set printing options action user can apply changes to printing settings of the VW POS application from a third-party app. For a typical set printing options 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. 'com.example.myapp'
action Get printing settings. 'getPrintingSettings'
callback The URI callback that will handle the result. 'interapp-callback'
// USE LIKE THIS
func getPrintingSettingsButtonTapped(_ sender: Any) {
   let schemeURL = "vivapayclient://pay/v1"
   let callback = "?callback=interapp-callback"
   let clientAppID = "&appId=com.vivawallet.InterAppDemo"
   let getPrintingSettingsAction =  "&action=getPrintingSettings"

   let getPrintingSettingsUrlString = schemeURL + callback + clientAppID + getPrintingSettingsAction
   (UIApplication.shared.delegate as? AppDelegate)?.performInterAppRequest(request: getPrintingSettingsUrlString)
}

Example

vivapayclient://pay/v1?callback=interapp-callback&appId=com.vivawallet.InterAppDemo&action=getPrintingSettings

Get printing settings response

The response will return the status request along with all the printing settings values of the VW POS app.

The table below summarizes the contents of an approved response.

Field Description Example
callback The URI callback that will handle the result. 'interapp-callback://result'
status The status of the request. 'success'
message A string containing information about the transaction status. ‘Fetched printing settings'
action Get printing settings. 'getPrintingSettings'
businessDescriptionEnabled A flag indicating whether the business description identifier will be printed on the receipt. 'true'
businessDescriptionType The business description identifier that will be printed on the receipt if it is enabled. For successful validation, should be one of the following values: 'businessName', 'tradeName', 'storeName' 'businessName'
printLogoOnMerchantReceipt A flag indicating whether the logo will be printed on the receipt of the merchant. 'true'
printVATOnMerchantReceipt A flag indicating whether the vat number will be printed on the receipt of the merchant. 'true'
isBarcodeEnabled A flag indicating whether the barcode will be printed on the receipt. 'true'
printAddressOnReceipt A flag indicating whether the address will be printed on the receipt. 'true'
isMerchantReceiptEnabled A flag indicating whether the receipt of the merchant will be printed. 'true'
isCustomerReceiptEnabled A flag indicating whether the receipt of the customer will be printed. 'true'
isPrintingReceiptEnabled A flag indicating whether printing receipts will take place or not. 'true'

Example

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!