Multimerchant Sale request

An overview of our Multimerchant Sale request message ('reseller mode payments' functionality) for Android.

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' 'viva.com | Terminal' application for Android
merchantKey The merchant's key. For successful validation, should not be empty. 'SG23323424EXS3' 'viva.com | Terminal' application for Android
appId The client app ID. For successful validation, should not be empty. 'com.example.myapp' 'viva.com | Terminal' application for Android
action For successful validation, should not be empty. 'mmSale' 'viva.com | Terminal' application 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.com | Terminal' application for Android 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 'viva.com | Terminal' application for Android 10 integer (int32)
show_receipt A flag indicating if the receipt and transaction result will be shown. 'true' 'viva.com | Terminal' application for Android Boolean
show_transaction_result A flag indicating whether transaction result will be shown. 'true' 'viva.com | Terminal' application for Android Boolean
show_rating A flag indicating if the rating flow will be shown. 'true' 'viva.com | Terminal' application for Android Boolean
multi_merchant_id The id of the merchant that will receive the transaction. 'c21ac4b3-b1e1-4e7c-a65e-aedee7412321' 'viva.com | Terminal' application for Android
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
'viva.com | Terminal' application for Android 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
'viva.com | Terminal' application for Android 4 integer (int32)
currencyCode The currency code. '978' 'viva.com | Terminal' application for Android 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' 'viva.com | Terminal' application for Android 2048 String
withInstallments Enable card installments. Only in Greek Merchants 'true' 'viva.com | Terminal' application for Android 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' 'viva.com | Terminal' application for Android 2 integer (int32)
customerTrns The transaction description for customer. '1234567890qwerty' 'viva.com | Terminal' application for Android 2048 String
callback The URI callback that will handle the result. For successful validation, should not be empty. 'mycallbackscheme://result' 'viva.com | Terminal' application for Android
aadeProviderId [*] Unique Number to identify specific Provider (ฮฅฮ ฮ‘ฮ—ฮ•ฮฃ):

  • VivaDemo - โ€˜999โ€™
  • SoftOne - โ€˜101โ€™
  • EnterSoft - โ€˜102โ€™
  • Impact - โ€˜103โ€™
  • Epsilon Net - โ€˜104โ€™
  • Novus Conceptus - โ€˜105โ€™
  • Cloud Services IKE - โ€˜106โ€™
  • Primer Software - โ€˜107โ€™
  • ILYDA = โ€˜108โ€™
  • Prosvasis = โ€˜109โ€™
  • MAT = โ€˜110โ€™
  • Simply = โ€˜111โ€™
  • Kappa = โ€˜112โ€™
  • SBZ = โ€˜113โ€™
  • OneSys = โ€˜114โ€™
  • ORIAN = โ€˜115โ€™
  • TESAE = โ€˜116โ€™
  • Karpodinis = โ€˜117โ€™
  • Cloud T = โ€˜118โ€™
  • ฮ ฮฌฯฮฟฯ‡ฮฟฯ‚ ฮ›ฯฯƒฮตฯ‰ฮฝ ฮ ฮปฮทฯฮฟฯ†ฮฟฯฮนฮบฮฎฯ‚ ฮ‘.ฮ•. = โ€˜119โ€™
  • '999' Android Card Terminals'viva.com | Terminal' application for Android 3 Numeric
    aadeProviderSignatureData [*] The unencrypted signature that includes the fields below with semicolon as a delimiter โ€œ;โ€:

  • Receipt UID
  • MARK (Unique ID provided by AADE - commonly null as this provider after the end of the transaction)
  • Date and time of the Signature
  • Amount to be paid
  • Sum Amount without TAX
  • VAT percentage
  • Sum Amount with TAX
  • TID
  • AD33729F4ED749928AAFA00B90EE4EA91551BAC1;;20231204080313;1051;10000;2400;12400;POS_1 Android Card Terminals'viva.com | Terminal' application for Android 200 Alphanumeric
    aadeProviderSignature [*] The fields of providerSignatureFields encrypted using a public key and the Elliptic Curve Digital Signature Algorithm (ECDSA):

  • Algorithm: ECDSA
  • Curve: NISTP256
  • HASH: SHA256
  • The signature is sent to POS in base64 format
  • o0094r3Yk3KTqASLkW3evlDsnIg/ZAdUUf6UCXDtjqpI/dquzAT4WNX3yzS/GLciVNbT75H4pj8hLOV0EpHtzw==" Android Card Terminals'viva.com | Terminal' application for Android

    [*] 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"
                                    + "&currencyCode=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=="
                                    + "&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:

    Field Description Example Card terminal support
    callback The URI callback that will handle the result. 'mycallbackscheme://result' 'viva.com | Terminal' application for Android
    status The status of the transaction. 'success' 'viva.com | Terminal' application for Android
    message A string containing information about the transaction status. 'Transaction successful' 'viva.com | Terminal' application for Android
    action Sale transaction. 'sale' 'viva.com | Terminal' application for Android
    clientTransactionId The client transaction ID. '12345678901234567890123456789012' 'viva.com | Terminal' application 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.com | Terminal' application 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.com | Terminal' application for Android
    verificationMethod The verification method used. 'CHIP-PIN' 'viva.com | Terminal' application for Android
    rrn The Retrieval Reference Number of the transaction RRN.
    (Used in successful and declined receipts)
    '123456833121' 'viva.com | Terminal' application for Android
    cardType The card type. 'VISA' 'viva.com | Terminal' application for Android
    referenceNumber A 6-digit number indicating the transaction's STAN number. '833121' 'viva.com | Terminal' application 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.com | Terminal' application for Android
    customerTrns The transaction description for the customer. '1234567890qwerty' 'viva.com | Terminal' application 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.com | Terminal' application for Android
    transactionId A unique identifier for the transaction. 'a78e045c-49c3-4743-9071-f1e0ed71810c' 'viva.com | Terminal' application for Android
    installments Number of card installments. ' 10' 'viva.com | Terminal' application for Android
    aadeTransactionId An AADE-specific transaction ID.

    Format: Acquirer Unique code + RRN + Authorization code.

    Example: โ€˜116โ€™ + โ€˜123456833121โ€™ + โ€˜690882โ€™ = '116123456833121690882'
    '116123456833121690882' Android Card Terminals'viva.com | Terminal' application for Android

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

    A sale response for a successful multimerchant sale transaction using AADE parameters 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.

    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. Android Card Terminals
    '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. Android Card Terminals
    Linux Card Terminals Countertop, IM20, S900, S800, D200. Linux Card Terminals

    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!