Transaction Response Data

When a transaction completes, the myPOS Smart SDK returns an Intent to the calling Activity containing detailed transaction information. This allows you to verify, log, or display data as needed.

Returned Extras (Intent Data)

Below is a list of possible extras returned in the Intent:

KeyDescription
reference_numberInternal myPOS transaction reference
cardholder_nameEmbossed name on the card
date_timeDate and time of transaction (YYMMDDHHmmss)
panObfuscated PAN, e.g., XXXX-XXXX-XXXX-8008
pan_hashA hashed version of the PAN
status (int)Numeric code (see Transaction Result Codes)
status_textHuman-readable transaction status
card_brandCard scheme: e.g., VISA, MASTERCARD, MAESTRO
card_entry_modeCard input method:
- ENTRY_MODE_MAGSTR
- ENTRY_MODE_EMV
- ENTRY_MODE_CONTACTLESS
- ENTRY_MODE_CONTACTLESS_MCHIP
- ENTRY_MODE_MANUAL
response_codeResponse code from the card issuer (≠ "00" means declined)
authorization_codeCode returned by issuer
signature_required (boolean)true if receipt requires cardholder signature
TSITransaction Status Indicator
TVRTerminal Verification Result
AIDApplication Identifier (from the card)
STANSystem Trace Audit Number (transaction unique ID)
CVMCardholder Verification Method:
- P: PIN
- S: Signature
- N: No CVM
application_nameApplication label read from the chip
transaction_approved (boolean)true if approved, false if declined
dcc_available (boolean)If Dynamic Currency Conversion is available
amount_dcc (double)DCC amount
currency_dccDCC currency
exchange_rate (double)DCC exchange rate
TIDTerminal ID
update_pending (boolean)Whether an update is pending
resp_codePayment request response code
expire_datePayment request expiration date

merchant_data Bundle

This bundle contains merchant information used for printing:

  • billing_descriptor
  • address_line1
  • address_line2
  • MID – Merchant ID
  • custom_receipt_row1
  • custom_receipt_row2

installment_data Bundle

Returned only if the transaction was done using installments:

KeyDescription
number (int)Number of installments
interest_rate (double)Interest rate applied
fee (double)Additional fee
annual_percentage_rateAPR applied
total_amount (double)Total repayment amount
first_installment_amountAmount for the first installment
subsequent_installment_amountRemaining installment amounts

Most extras are returned as String values. Depending on the transaction and card type, some fields may be missing.


Transaction Result Codes

The transaction result is provided as an int in the status field and corresponds to constants in the TransactionProcessingResult class:

package com.mypos.smartsdk;

public class TransactionProcessingResult {
    /**
     * Transaction completed successfully
     */
    public static final int TRANSACTION_SUCCESS  = 0;
    /**
     * User canceled the transaction
     */
    public static final int TRANSACTION_CANCELED = 1;
    /**
     * The transaction was declined for some reason (by the Host or the Issuer)
     */
    public static final int TRANSACTION_DECLINED = 2;
    /**
     * The transaction failed - because of a connection timeout or some other malfunction
     */
    public static final int TRANSACTION_FAILED   = 3;
    /**
     * The device is not activated, meaning no transactions can be performed
     */
    public static final int DEVICE_NOT_ACTIVATED = 4;
    /**
     * Some needed data was missing. Mainly used when a Void transaction is requested when there is no previous transaction data present
     */
    public static final int NO_DATA_FOUND        = 5;
    /**
     * When a currency different than the device's currency is set when calling the payment app
     */
    public static final int INVALID_CURRENCY     = 6;
    /**
     * When the amount is greater than the allowed maximum or less than the allowed minimum.
     */
    public static final int INVALID_AMOUNT       = 7;
}

CodeConstantDescription
0TRANSACTION_SUCCESSTransaction completed successfully
1TRANSACTION_CANCELEDUser cancelled the transaction
2TRANSACTION_DECLINEDTransaction declined by the issuer or host
3TRANSACTION_FAILEDTransaction failed due to timeout or error
4DEVICE_NOT_ACTIVATEDTerminal is not activated
5NO_DATA_FOUNDNo transaction data found for the requested task
6INVALID_CURRENCYTerminal does not support the selected currency
7INVALID_AMOUNTAmount is outside the allowed range

Tip: Use status_text or transaction_approved to quickly assess success/failure before evaluating deeper details.