Transaction Details request

An overview of the Transaction Details request message for Android.

Overview

👉 The Transaction Details request is used to retrieve detailed information about a previously-completed transaction.

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.

Transaction Details request

For a typical Transaction Details request, the client app must provide the following information:

Field Description Example Card Termimal Support Character limit Type
scheme The Viva's custom URL scheme, the host and the version. 'vivapayclient://pay/v1' Android Card Terminals'Viva.com Terminal' application for Android
merchantKey The merchant's key. For successful validation, should not be empty. Deprecated: you may pass any value 'SG23323424EXS3' Android Card Terminals'Viva.com Terminal' application for Android
action TransactionDetails. For successful validation, should not be empty. 'transactionDetails' Android Card Terminals'Viva.com Terminal' application 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 Recent Transaction Request. Is only available if it was set in the original Sales Request. '12345678901234567890123456789012' Android Card Terminals'Viva.com Terminal' application for Android No length restrictions text
sourceTerminalId Source Terminal Id of terminal where payment was made ‘16031147’ Android Card Terminals'Viva.com Terminal' application for Android
callback The URI callback that will handle the result. For successful validation, should not be empty. 'mycallbackscheme://result' Android Card Terminals'Viva.com Terminal' application 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=transactionDetails"
                + "&callback=mycallbackscheme://result"
                + "&clientTransactionId=1234567801234"
                + "&sourceTerminalId=16031147"))

payIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);

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

Transaction Details response

After executing a transactionDetails request the ‘Viva.com Terminal’ application responds with a transactionDetails response.

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' Android Card Terminals'Viva.com Terminal' application for Android
status The status of the transaction 'success' Android Card Terminals'Viva.com Terminal' application for Android
message A string containing information about the transaction status. 'Transaction Details Fetched' Android Card Terminals'Viva.com Terminal' application for Android
action TransactionDetails 'transactionDetails' Android Card Terminals'Viva.com Terminal' application for Android
clientTransactionId The client transaction ID. '12345678901234567890123456789012' Android Card Terminals'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 Android Card Terminals'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 Android Card Terminals'Viva.com Terminal' application for Android
verificationMethod The verification method used. 'CHIP-PIN' Android Card Terminals'Viva.com Terminal' application for Android
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
cardType The card type. 'VISA' Android Card Terminals'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' Android Card Terminals'Viva.com Terminal' application for Android
referenceNumber A 6-digit number indicating the transaction's STAN number. '833121' 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
tid A 12 character string indicating the terminal's TID number. ' 16016684' Android Card Terminals'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
installments Number of installments. ' 10' 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
transactionId A unique identifier for the transaction. 'a78e045c-49c3-4743-9071-f1e0ed71810c' Android Card Terminals'Viva.com Terminal' application for Android
vatNumber The VAT number of merchant. (if print VAT is enabled in the 'Viva.com Terminal' application settings) (Used in successful and declined receipts) '123412341' Android Card Terminals'Viva.com Terminal' application for Android
address The address of merchant (if print address is enabled in the 'Viva.com Terminal' application settings) (Used in successful receipts) ‘Main St 123, 12312 Anytown’ Android Card Terminals'Viva.com Terminal' application for Android
businessDescription Merchant’s Business/Trade/Store name (depending on what option is selected in the 'Viva.com Terminal' application settings), (Used in successful receipts) 'Wonka Industries' Android Card Terminals'Viva.com Terminal' application for Android
cardholderNameExpirationDateFlags Each char may be 0 (false) or 1 (true) and indicates if the cardholder name and the expiration date should be printed on the merchant/cardholder receipts)
  • 1st char: if 1 then the Cardholder Name should be printed in the merchant's receipt. If 0, then it should not.
  • 2nd char: if 1 then the Cardholder Name should be printed in the cardholder's receipt. If 0, then it should not.
  • 3rd char: if 1 then the Expiration Date should be printed in the merchant's receipt. If 0, then it should not.
  • 4rd char: if 1 then the Expiration Date should be printed in the cardholder's receipt. If 0, then it should not.
    (Used in successful receipts)
'1010' Android Card Terminals'Viva.com Terminal' application for Android
needsSignature A boolean indicating if the receipt needs a signature section. (Used in successful receipts) false Android Card Terminals'Viva.com Terminal' application for Android
addQRCode A boolean indicating if the order code should be printed as a QR. (Used in successful receipts) false Android Card Terminals'Viva.com Terminal' application for Android
terminalSerialNumber The serial number of the terminal. (Used in successful receipts) “1234567891“ Android Card Terminals'Viva.com Terminal' application for Android
currency The currency of the transaction. (Used in successful receipts) “EUR“ Android Card Terminals'Viva.com Terminal' application for Android
applicationVersion The version off the application. (Used in declined receipts) 'v3.7.0(1956)' Android Card Terminals'Viva.com Terminal' application for Android
entryMode The POS entry mode. (Used in successful receipts) '07' Android Card Terminals'Viva.com Terminal' application for Android
transactionType The string of the action of the transaction in question (e.g. 'sale') 'SALE' Android Card Terminals'Viva.com Terminal' application for Android

A transactionDetails response result for an approved request 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!