Multimerchant Sale request
An overview of our Multimerchant Sale request message ('reseller mode payments' functionality) for Android.
- Overview
- Multimerchant Sale request
- Multimerchant Sale response
- Key to card terminal product categories
- Get Support
This request has been deprecated.
Overview
๐ 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 | Character limit | Type | |
---|---|---|---|---|---|---|
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 | 10 | integer (int32) | ||
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 | 10 | integer (int32) | ||
show_receipt | A flag indicating if the receipt and transaction result will be shown. | 'true' | Boolean | |||
show_transaction_result | A flag indicating whether transaction result will be shown. | 'true' | Boolean | |||
show_rating | A flag indicating if the rating flow will be shown. | 'true' | Boolean | |||
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 |
4 | integer (int32) | ||
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 |
4 | integer (int32) | ||
currencyCode | The currency code. | '978' | 3 | integer (int32) | ||
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' | 2048 | String | ||
withInstallments | Enable card installments. Only in Greek Merchants | 'true' | Boolean | |||
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' | 2 | integer (int32) | ||
customerTrns | The transaction description for customer. | '1234567890qwerty' | 2048 | String | ||
callback | The URI callback that will handle the result. For successful validation, should not be empty. | 'mycallbackscheme://result' | ||||
saleToAcquirerData | ๐ JSON converted to base64 string containing additional metadata information Please visit this link to view a sample of the JSON and generate the encoded data. |
ewogICAgImFwcGxpY2F0aW9uSW5mbyI6IHsKICAgICAgICAiZXh0ZXJuYWxQbGF0Zm9ybSI6IHsKICAgICAgICAgICAgIm5hbWUiOiAidml2YS5jb218VGVybWluYWwiLAogICAgICAgICAgICAidmVyc2lvbiI6ICJjb20udml2YXdhbGxldC5zcG9jLnBheWFwcCB2NS4xOS43ICgxMDgxNSkiLAogICAgICAgICAgICAiaW50ZWdyYXRvciI6ICJWaXZhIgogICAgICAgIH0KICAgIH0KfQ== | Alphanumeric | |||
aadeProviderId [*] | Unique Number to identify specific Provider (ฮฅฮ ฮฮฮฮฃ): |
'999' | 3 | Numeric | ||
aadeProviderSignatureData [*] | The unencrypted signature that includes the fields below with semicolon as a delimiter โ;โ: |
AD33729F4ED749928AAFA00B90EE4EA91551BAC1;;20231204080313;1051;10000;2400;12400;POS_1 | 200 | Alphanumeric | ||
aadeProviderSignature [*] | The fields of providerSignatureFields encrypted using a public key and the Elliptic Curve Digital Signature Algorithm (ECDSA): |
o0094r3Yk3KTqASLkW3evlDsnIg/ZAdUUf6UCXDtjqpI/dquzAT4WNX3yzS/GLciVNbT75H4pj8hLOV0EpHtzw==" |
[*] These parameters are only applicable in Greece
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"
+ "&aadeProviderId=999"
+ "&aadeProviderSignatureData=AD33729F4ED749928AAFA00B90EE4EA91551BAC1;;20231204080313;1051;10000;2400;12400;POS_1"
+ "&aadeProviderSignature=o0094r3Yk3KTqASLkW3evlDsnIg/ZAdUUf6UCXDtjqpI/dquzAT4WNX3yzS/GLciVNbT75H4pj8hLOV0EpHtzw=="
+ "&saleToAcquirerData=base64EncodedJsonData"
+ "&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 ‘Viva.com Terminal’ application 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
A sale response for a successful multimerchant sale transaction using AADE parameters looks as follows:
mycallbackscheme://result?status=success&message=Transaction successful&action=mmSale&clientTransactionId=1234567890&amount=146&tipAmount=23&rrn=121343565787&verificationMethod=CONTACTLESS - NO CVM&cardType=MASTERCARD&accountNumber=515876******4490&referenceNumber=174010&authorisationCode=174010&tid=16109900&orderCode=3050112220001919 &transactionDate=2024-02-13T11:22:33.1234567+03:00&transactionId=a12e1ba8-6153-7754-a6a8-e3d2654872c8 &paymentMethod=CARD_PRESENT&shortOrderCode=3050112220&aadeTransactionId=116407412859062859062
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:
mycallbackscheme://result?status=fail&message=(-998) UNSUPPORTED&action=mmSale&clientTransactionId=&amount=1500&tipAmount=10
It is expected that certain transactions will fail for various reasons. A reseller mode payments response for a failed transaction looks as follows:
mycallbackscheme://result?status=fail&message=(-4) USER_CANCEL&action=mmSale&clientTransactionId=&amount=1510&tipAmount=10
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.com Terminal' application for Android | Mini Card Reader, Pocket Card Terminal connected via Bluetooth or USB to the 'Viva.com Terminal' application for Android. | |
Linux Card Terminals | Countertop, IM20, S900, S800, D200. |
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!