Transaction Search

Description

The Transaction Search function is used to retrieve details of previous transactions.


Request

Sample Bundle

"authenticationKey": "e27b5ce6-8ba6-4746-9453-536728f7cbeb"
"merchantID": "770000000000123"
"launchType": "TX_SEARCH"

Parameters

PARAMETER

TYPE

DESCRIPTION

EXAMPLE

REQUIRED

launchType

STRING

Must be “TX_SEARCH”
Used for launching the Ecentric Payment App to perform a transaction search query.

TX_SEARCH

merchantID

STRING

The merchant ID assigned to the merchant.

945230000000001

authenticationKey

STRING

The authentication token that was generated by the server on a successful login to the Ecentric Payment App

e27b5456-8bff6-4746-94bg-367253356eb

OPTIONAL

transactionUuid

STRING

Unique ID (UUID) of transaction if searching for a specific transaction..

79f451e7-edc9-4f9e-8625-18618f597a8f


Sample Code

private void doTxSearch() {
    Intent intent = new Intent();
    intent.setClassName("com.ecentric.ecentricpay", "com.ecentric.ecentricpay.MainActivity");
    Bundle dataBundle = new Bundle();
    dataBundle.putString("launchType", "TX_SEARCH");
    dataBundle.putString("merchantID", "910100000000001");
  	dataBundle.putString("authenticationKey", "received_authenticationKey");
  	dataBundle.putString("transactionUuid", "78a501e7-edc9-4f9e-8625-18618f597a8f"); // Returns last transaction or specific transaction if UUID is specified

    intent.putExtra("ecentricBundle", dataBundle);
    try {
        intentLauncher.launch(intent);
    } catch (Exception e) {
        Log.e(TAG, "Error launching intent: " + e);
   }
}

Response

Sample Bundle

"resultDescription": "APPROVED",
"buildInfo": "Ecentric",
"isReceiptDataAvailable": true,
"resultCode": "01",
"receiptBundle": {
    "MERCHANT_REGION_CODE": "09",
    "RC_ALT": "00",
    "SEQ_NO": "000",
    "STATUS": "APPROVED",
    "BUDGET_PERIOD": "",
    "CARD_TYPE": "Debit",
    "PAN_WITH_BIN": "445143** **** 2309",
    "MERCHANT_ID": "770000000000123",
    "TIMESTAMP": "1746605893000",
    "EXTERNAL_TRANSACTION_DATETIME": "",
    "PROCESSING_CODE": "",
    "RC_DESCRIPTION": "Approved",
    "EXTERNAL_INVOICE_GUID": "",
    "REPLACEMENT_MERCHANT_ID": "",
    "BATCH_NO": "000",
    "AUTH_PROFILE": "",
    "INTERCHANGE": "Debit",
    "ESC_BY_AUTH_CODE": "226 00 IH 172484",
    "TX_TYPE": "DEBIT",
    "ACC_TYPE_DESC": "",
    "TIP_AMOUNT": "",
    "CURRENCY_CODE": "ZAR",
    "AUTH_CODE": "172484",
    "RC": "00",
    "AID": "A0000000031010",
    "ATC": "",
    "CRY": "4FFE220CCEA29052",
    "CVM": "none",
    "IAD": "06010A03A04000",
    "PAN": "**** **** **** 2309",
    "RRN": "512718120039",
    "TSI": "",
    "TVR": "0000000000",
    "APSN": "",
    "DATE": "2025-05-07T08:18:13.000+0000",
    "STAN": "",
    "NAME_ON_CARD": "",
    "AMOUNT_CENTS": "1000",
    "ABS_AMOUNT": "10.00",
    "TOKEN": "",
    "RECEIPT_NUMBER": "",
    "EXTENDED_TRX_TYPE": "",
    "TERMINAL_ID": "77012398",
    "TX_TYPE_DESCRIPTION": "SALE",
    "EXTERNAL_TERMINAL_ID": "",
    "FORMATTED_AMOUNT": "ZAR 10.00",
    "DESCRIPTION": "",
    "BATCH_NUMBER": "0",
    "SETTLEMENT_DATE": "",
    "SURCHARGE_AMOUNT": "0.00",
    "EXTERNAL_TRANSACTION_GUID": "",
    "CARD_BIN": "445143",
    "TRANSACTION_INFO": "22600IH172484",
    "REPLACEMENT_TERMINAL_ID": "",
    "POS_ENTRY": "",
    "RC_ISO_DESCRIPTION": "Approved or completed successfully",
    "APPLICATION_LABEL": "VISA SAVINGS",
    "MERCHANT_CITY": "Cape Town",
    "MERCHANT_NAME": "Istore",
    "CUSTOMER_NAME": "",
    "APP_VERSION": "1.1.214",
    "CARD_SEQ_NO": "",
    "APP_LABEL": "VISA SAVINGS",
    "INVOICE_NUM": "",
    "MESSAGE_1": "",
    "MESSAGE_2": "",
    "CARD_TRANSACTION_TYPE": "CONTACTLESS",
    "FORMATTED_CASH_AMOUNT": "ZAR 0.00",
    "CASH_AMOUNT": "0.00",
    "RESULT_CODE": "00",
    "MERCHANT_COUNTRY_CODE": "ZA",
    "REPRINT": "",
    "PAN_HASH": "",
    "AMOUNT": "10.00",
    "TIP_LABEL": "",
    "DIGITS": "2309",
    "CVM_ABSA": ""
  },
"merchantID": "770000000000123",
"launchType": "TX_SEARCH",
"cashAmount": "0",
"transactionUuid": "08ea6867-3d85-4cab-9d0b-c5822230773d",
"appVersion": "1.9.2",
"transactionAmount": "1000"

Parameters

PARAMETER

TYPE

DESCRIPTION

EXAMPLE

launchType

STRING

Echo of the launchType used to launch the Ecentric Payment App.

TX_SEARCH

resultCode

STRING

Represents the result status of the TX Search intent call:
● 01: SUCCESSFUL
● 02: DECLINED
● 04: ERROR

01

isReceiptDataAvailable

BOOL

Boolean indicating whether a receiptBundle object is available. Will always be included for approved or declined transactions.

true

receiptBundle

STRING

Consists of a sub-bundle of server parameters that can be used by the partner application to create a receipt.

See Sample ecentricBundle SALE Response.

merchantID

STRING

Echo of the merchantID used in the request.

910100000000001

resultDescription

STRING

A user readable representation of the above resultCode i.e. Approved for resultCode 01.

COMPLETED

transactionAmount

LONG

Approved total transactionAmount.

1000

cashAmount

LONG

Approved cashAmount.

500

transactionUuid

STRING

Unique ID of transaction

bdf9d0af-17b3-48ca-8a0b-37dc52bf49bc

appVersion

STRING

The software version currently running on the Ecentric Payment App.

2.0.0


Sample Code

private final ActivityResultLauncher<Intent> intentLauncher = registerForActivityResult(
       new ActivityResultContracts.StartActivityForResult(),
       result -> {
           if (result.getResultCode() == Activity.RESULT_OK) {
               Intent data = result.getData();
               if (data != null) {
                   Bundle responseBundle = new Bundle(data.getBundleExtra("ecentricApplicationResponse"));
                   String launchType = responseBundle.getString("launchType");
                   String resultCode = responseBundle.getString("resultCode");
                   Boolean success = false;
                   if (resultCode != null && (resultCode.matches("00") || resultCode.matches("01"))) {
                       success = true;
                   }

                   if (success && launchType.matches("RETAIL_AUTH")) {
                       authenticationKey = responseBundle.getString("authenticationKey");
                   }

                   if (responseBundle.get("errorBundle") != null) {
                       Bundle errorBundle = new Bundle(responseBundle.getBundle("errorBundle"));
                   }
               }
           } else {
               Log.e(TAG, "Received error resultCode: " + result.getResultCode());
           }
       }
);

Error Handling

Sample Bundle

"resultDescription": "ABORTED",
"errorBundle": {
    "description": "ERROR",
    "reference": "",
    "errorType": "OTHER",
    "message": "Transaction cancelled by user"
  },
"buildInfo": "Ecentric_DEBUG_Ecentric_INT",
"resultCode": "03",
"merchantID": "910100000000001",
"serialNumber": "PC05P2CG10036",
"launchType": "CARDQUERY",
"appVersion": "1.9.8"