Multimerchant Sale request
An overview of our Multimerchant Sale request message ('reseller mode payments' functionality) for Android.
- Multimerchant Sale request
- Multimerchant Sale response
- Key to card terminal product categories
- Get Support
👉 The Multimerchant Sale request (also known as ‘reseller mode payments’ functionality) is used to create a Sale request with a particular merchant specified. Allowing different merchants to be specified on a per-sale basis is particularly useful for resellers or for cases in which money should be paid out to more than one merchant.
In order to utilise this functionality, please first contact your Account or Technical Account Manager for setup and configuration
The client app must implement a mechanism to send messages using Android intents and URI calls and to receive the result in a custom URI callback.
This request allows for multimerchant functionality without the ISV schema. For multimerchant functionality with the ISV schema, please see Sale request
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'|
|merchantKey||The merchant's key. For successful validation, should not be empty.||'SG23323424EXS3'|
|appId||The client app ID. For successful validation, should not be empty.||'com.example.myapp'|
|action||For successful validation, should not be empty.||'mmSale'|
|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|
|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|
|show_receipt||A flag indicating if the receipt and transaction result will be shown.||'true'|
|show_transaction_result||A flag indicating whether transaction result will be shown.||'true'|
|show_rating||A flag indicating if the rating flow will be shown.||'true'|
|multi_merchant_id||The id of the merchant that will receive the transaction.||'c21ac4b3-b1e1-4e7c-a65e-aedee7412321'|
|multi_merchant_reseller_source_code||The source code of the reseller (ISV Partner).||[A payment source (physical store) that is associated with a terminal]
How to create a payment source for ISV
|multi_merchant_source_code||The source code of the merchant.||[A payment source (physical store) that is associated with a terminal]
How to create a payment source for stores
|currencyCode||The currency code.||'978'|
|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'|
|withInstallments||Enable card installments. Only in Greek Merchants||'true'|
|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'|
|customerTrns||The transaction description for customer.||'1234567890qwerty'|
|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.
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" + "¤cyCode=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 request, 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:
A sale response result for an approved transaction looks as follows:
mycallbackscheme://result?status=success&message=Transaction successful&action=mmSale&clientTransactionId=123456qwerty&amount=1510&tipAmount=10&verificationMethod=CONTACTLESS - NO CVM&rrn=115108125496&cardType=Debit Mastercard&referenceNumber=125496&accountNumber=537488******9666&authorisationCode=005389&tid=16023906&orderCode=1151113303023906&transactionDate=2021-05-31T11:57:41.468337+03:00&transactionId=299120c0-709e-43ad-8b13-110116600c1d&customerTrns=123yoyo123&shortOrderCode=1151113303
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.
Key to card terminal product categories
To understand the icons used on the above tables, see the below table.
|Product category||Terminal models||Icon|
|Android Card Terminals||Android Card Terminal Ethernet, Android Card Terminal 4G, Mobile Card Terminal Plus, Mobile Card Terminal.|
|Viva Wallet POS app for Android||Mini Card Reader, Pocket Card Terminal connected via Bluetooth or USB to the Viva Wallet POS app for Android.|
|Linux Card Terminals||Countertop, IM20, S900, S800, D200.|
If you would like to integrate with Viva Wallet, or if you have any queries about our products and solutions, please see our Contact & Support page to see how we can help!