Unreferenced Refund

An overview of the Unreferenced Refund request message for Android.

Overview

👉 The Unreferenced Refund request allows you to process a refund without a need of prior transaction or an existing order.

The Unreferenced Refund feature is not enabled by default. To activate it, please reach out to your sales representative or contact our support team.

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.

The Unreferenced Refund functionality is currently not available in standalone mode.

Unreferenced Refund request

For a typical Unreferenced Refund request, the client app must provide the following information:

Field Description Example Required 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
appId The client app ID. For successful validation, should not be empty. 'com.example.myapp' 'Viva.com Terminal' application for Android
action This parameter is used to define the action for the Unreferenced Refund transaction. For successful validation, should not be empty. 'unreferenced_refund' 'Viva.com Terminal' application for Android
amount The amount to be refunded in cents '100' 'Viva.com Terminal' application for Android 10 integer (int32)
show_receipt A flag indicating if the receipt and transaction result will be shown. If true both transaction result and receipt will be shown. If false receipt will not be shown and result will be shown if show_transaction_result is true. 'true' 'Viva.com Terminal' application for Android Boolean
show_transaction_result A flag indicating if transaction result will be shown. 'true' 'Viva.com Terminal' application for Android Boolean
aadeProviderId [*] 👉 Integration with Provider (ΥΠΑΗΕΣ)

Set the Unique Number to identify your Provider. To learn more about all licensed AADE providers, please visit this page.

  • VivaDemo - 999(provider id for testing purposes)
  • 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
  • BRATNET E.E = 120
  • INVOICESOFT = 121
  • BUSINESS CLOUD EE = 122
  • EDICOM = 123
  • MEGASOFT = 124


  • 👉 Integration with ΦΗΜΑΣ (Φορολογικός Ηλεκτρονικός Μηχανισμός Ασφαλείας)

    For integration through ΦΗΜΑΣ, please specify as `aadeProviderId' the value 800
    Integration with Provider (ΥΠΑΗΕΣ)

    999

    Integration with ΦΗΜΑΣ (Φορολογικός Ηλεκτρονικός Μηχανισμός Ασφαλείας)

    800
    Please note that this parameter apply only for Greek merchants.
    Android Card Terminals'Viva.com Terminal' application for Android 3 Numeric
    aadeProviderSignatureData [*] 👉 Integration with Provider (ΥΠΑΗΕΣ)

    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


  • 👉 Integration with ΦΗΜΑΣ (Φορολογικός Ηλεκτρονικός Μηχανισμός Ασφαλείας)

    Use ECR TOKEN as in A.1098/2023

    Request
    A/S< session number>/F< amount>:978:2
    /D< datetime>/R< ecr-id>/H< operator-number>/T0
    /M/Q< mac>}

    Result
    R/S< session number>/R< ecr-id>/T< receipt-number>
    /Μ/C00/D< trans-data>{/P< prn-data>}}
    Integration with Provider (ΥΠΑΗΕΣ)

    AD33729F4ED749928AAFA00B90EE4EA91551BAC1;;20231204080313;1051;10000;2400;12400;POS_1
    Please note that this parameter apply only for Greek merchants.
    Android Card Terminals'Viva.com Terminal' application for Android 200 Alphanumeric
    aadeProviderSignature [*] 👉 Integration with Provider (ΥΠΑΗΕΣ)

    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


  • 👉 Integration with ΦΗΜΑΣ (Φορολογικός Ηλεκτρονικός Μηχανισμός Ασφαλείας)

    Use SessionKey as in A.1098/2023
    Integration with Provider (ΥΠΑΗΕΣ)

    o0094r3Yk3KTqASLkW3evlDsnIg/ZAdUUf6UCXDtjqpI/dquzAT4WNX3yzS/GLciVNbT75H4pj8hLOV0EpHtzw=="
    Please note that this parameter apply only for Greek merchants.
    Android Card Terminals'Viva.com Terminal' application for Android Alphanumeric
    callback The URI callback that will handle the result. For successful validation, should not be empty. 'mycallbackscheme://result' '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=unreferenced_refund"
            + "&callback=mycallbackscheme://result"
            + "&amount=100"
            + "&show_receipt="+true
            + "&aadeProviderId=999"
            + "&aadeProviderSignatureData=AD33729F4ED749928AAFA00B90EE4EA91551BAC1;;20231204080313;1051;10000;2400;12400;POS_1"
            + "&aadeProviderSignature=o0094r3Yk3KTqASLkW3evlDsnIg/ZAdUUf6UCXDtjqpI/dquzAT4WNX3yzS/GLciVNbT75H4pj8hLOV0EpHtzw=="
            + "&show_transaction_result="+true));
    
    
    payIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
    payIntent.addFlags(Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);
    //        Those two flags should be added for paydroid implementations
    //        payIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);
    //        payIntent.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);
                    startActivity(payIntent);

    Unreferenced Refund response

    After executing an Unreferenced Refund transaction, the ‘Viva.com Terminal’ application responds with an Unreferenced Refund response result to indicate if the refund has been approved or not.

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

    Uri result = getIntent().getData()

    The table below summarises 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 Unreferenced Refund transaction. 'unreferenced_refund' 'Viva.com Terminal' application for Android
    amount The amount in cents without any decimal digits. '1200' = 12 euro 'Viva.com Terminal' application for Android
    cardType The card type. 'Mastercard' 'Viva.com Terminal' application for Android
    accountNumber The card number. Note that only the 6 first and the 4 last digits are provided. All other digits are masked with stars. '479275\*\*\*\*\*\*9999' 'Viva.com Terminal' application for Android
    tid A 12-character string indicating the terminal's TID number. '16016684' 'Viva.com Terminal' application for Android
    transactionId A unique identifier for the transaction. 'a78e045c-49c3-4743-9071-f1e0ed71810c' 'Viva.com Terminal' application for Android
    orderCode The order code. '9256110059000200' Android Card Terminals'Viva.com Terminal' application for Android
    shortOrderCode 10-digit integer. '1234567890' Android Card Terminals'Viva.com Terminal' application for Android
    clientTransactionId The client transaction ID. '12345678901234567890123456789012' Android Card Terminals'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' Android Card Terminals'Viva.com Terminal' application for Android
    verificationMethod The verification method used.

    Possible values: CHIP, CONTACTLESS, MAGNETIC, MANUAL ENTRY
    'CHIP' Android Card Terminals'Viva.com Terminal' application for Android
    authorisationCode A 6-digit number indicating the transaction's Authorisation code provided by the host. '690882' Android Card Terminals'Viva.com Terminal' application for Android
    aid A string indicating the AID of the card.
    (Used in successful receipts)
    'A000000003101001' Android Card Terminals
    rrn The Retrieval Reference Number of the transaction RRN.
    (Used in successful and declined receipts)
    '123456833121' Android Card Terminals'Viva.com Terminal' application for Android
    referenceNumber
    A number with up to 6 digits indicating the transaction's STAN (System Trace Audit Number). '833121' Android Card Terminals'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

    An Unreferenced Refund response result for an approved refund transaction looks as follows:

    An Unreferenced Refund response for a successful refund transaction using AADE parameters looks as follows:

    It is expected that certain transactions will fail for various reasons. An Unreferenced Refund response result for a failed refund transaction looks as follows:

    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!