Multimerchant Sale Request

An overview of our Multimerchant Sale Request message ('reseller mode payments' functionality).

Overview

Viva Wallet’s Android POS App supports Multimerchant sale requests (also known as ‘reseller mode payments’ functionality). This allows different merchants to be specified per-API call.

Multimerchant Sale Request

For a typical multimerchant sale request, the client app must provide the following information:

Field Description Example Card terminal support
scheme The Viva's custom URL scheme, the host and the version. 'vivapayclient://pay/v1' Viva Wallet POS app for Android
merchantKey The merchant's key. For successful validation, should not be empty. 'SG23323424EXS3' Viva Wallet POS app for Android
appId The client app ID. For successful validation, should not be empty. 'com.example.myapp' Viva Wallet POS app for Android
action For successful validation, should not be empty. 'mmSale' Viva Wallet POS app for Android
amount Amount in cents without any decimal digits. This value must not be empty and must be an integer larger than zero. '1200' = 12 euro Viva Wallet POS app for Android
tipAmount The tip that will be added on top of the amount. This must be less than or equal to the amount. '200' = 2 euro Viva Wallet POS app for Android
show_receipt A flag indicating if the receipt and transaction result will be shown. 'true' Viva Wallet POS app for Android
show_transaction_result A flag indicating whether transaction result will be shown. 'true' Viva Wallet POS app for Android
show_rating A flag indicating if the rating flow will be shown. 'true' Viva Wallet POS app for Android
multi_merchant_id The id of the merchant that will receive the transaction. 'c21ac4b3-b1e1-4e7c-a65e-aedee7412321' Viva Wallet POS app for Android
multi_merchant_reseller_source_code The source code of the reseller. 'Default' Viva Wallet POS app for Android
multi_merchant_source_code The merchant source code. 'Default' Viva Wallet POS app for Android
currencyCode The currency code. '978' Viva Wallet POS app for Android
clientTransactionId A unique transaction ID transmitted to the host for storage with the transaction. Note that this value will be provided in the Merchant Reference field provided in the sales export response. '12345678901234567890123456789012' Viva Wallet POS app for Android
withInstallments Enable card installments. Only in Greek Merchants 'true' Viva Wallet POS app for Android
preferredInstallments Number of preferred card installments. Only in Greek Merchants. If the number is between the allowed range and the card supports installments then the flow complete without any prompt for installments. If the number is 0 or > max allowed number of installments then the user will be prompt to enter the number in the app. If the card does not support installments then the app will request from the user how to proceed with the flow. If withInstallments is true preferredInstallments must be integer and not empty. '10' Viva Wallet POS app for Android
customerTrns The transaction description for customer. '1234567890qwerty' Viva Wallet POS app for Android
callback The URI callback that will handle the result. For successful validation, should not be empty. 'mycallbackscheme://result' Viva Wallet POS app for Android

The above information elements must create a URI call, i.e.

Intent payIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(
                        "vivapayclient://pay/v1"
                                + "?merchantKey=MY_MERCHANT_KEY"
                                + "&appId=com.example.myapp"
                                + "&action=mmSale"
                                + "&clientTransactionId=1234567801234"
                                + "&amount=1200"
                                + "&tipAmount=200"
                                + "&show_receipt="+true
                                + "&show_transaction_result="+true
                                + "&show_rating="+true
                                + "&multi_merchant_id=MY_MULTI_MERCHANT_ID"
                                + "&multi_merchant_source_code=MY_MULTI_MERCHANT_SOURCE_CODE"
                                + "&multi_merchant_reseller_source_code=MY_MULTI_MERCHANT_RESELLER_SOURCE_CODE"
                                + "&currencyCode=978"
                                + "&clientTransactionId=12345678901234567890123456789012"
                                + "&withInstallments="+10
                                + "&preferredInstallments="+10
                                + "&customerTrns=1234567890qwerty"
                                + "&callback=mycallbackscheme://result"));

payIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
payIntent.addFlags(Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);
startActivity(payIntent);

Multimerchant Sale Response

After executing a multimerchant sale (payment), the Card Terminal App responds with a multimerchant sale response (result) to indicate if the payment has been approved or not.

The result is received as a URI in the callback activity intent:

Uri result = getIntent().getData();

The table below summarizes the contents of an approved response:

Field Description Example Card terminal support
callback The URI callback that will handle the result. 'mycallbackscheme://result' Viva Wallet POS app for Android
status The status of the transaction. 'success' Viva Wallet POS app for Android
message A string containing information about the transaction status. 'Transaction successful' Viva Wallet POS app for Android
action Sale transaction. 'sale' Viva Wallet POS app for Android
clientTransactionId The client transaction ID. '12345678901234567890123456789012' Viva Wallet POS app for Android
amount The amount in cents without any decimal digits. If action is cancel and amount is not empty must be integer and bigger than zero.
(Used in successful and declined receipts)
'1200' = 12 euro Viva Wallet POS app for Android
tipAmount How much of the amount in cents is considered as tip without any decimal digits.
(Used in successful and declined receipts)
'200' = 2 euro Viva Wallet POS app for Android
verificationMethod The verification method used. 'CHIP-PIN' Viva Wallet POS app for Android
rrn The Retrieval Reference Number of the transaction RRN.
(Used in successful and declined receipts)
'123456833121' Viva Wallet POS app for Android
cardType The card type. 'VISA' Viva Wallet POS app for Android
referenceNumber A 6-digit number indicating the transaction's STAN number. '833121' Viva Wallet POS app for Android
accountNumber The card number masked. Note that only the 6 first and the 4 last digits are provided. All other digits are masked with stars.
(Used in successful and declined receipts)
'479275\*\*\*\*\*\*9999' Viva Wallet POS app for Android
customerTrns The transaction description for the customer. '1234567890qwerty' Viva Wallet POS app for Android
transactionDate The transaction date in ISO 8601 format.
(Used in successful and declined receipts)
'2019-09-13T12:14:19.8703452+03:00' Viva Wallet POS app for Android
transactionId A unique identifier for the transaction. 'a78e045c-49c3-4743-9071-f1e0ed71810c' Viva Wallet POS app for Android
installments Number of card installments. ' 10' Viva Wallet POS app for Android

A sale response result for an approved transaction looks as follows:

It is expected that reseller mode payments will fail if merchant does not support it. A reseller mode payments response for an unsupported bill payment looks as follows:

It is expected that certain transactions will fail for various reasons. A reseller mode payments response for a failed transaction looks as follows:

The structure of the message is the same as in the case of an approved transaction. Fields such as referenceNumber and authorisationCode may not have values since there is no STAN code available, nor an authorisation code.

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!