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:
| Key | Description |
|---|---|
reference_number | Internal myPOS transaction reference |
cardholder_name | Embossed name on the card |
date_time | Date and time of transaction (YYMMDDHHmmss) |
pan | Obfuscated PAN, e.g., XXXX-XXXX-XXXX-8008 |
pan_hash | A hashed version of the PAN |
status (int) | Numeric code (see Transaction Result Codes) |
status_text | Human-readable transaction status |
card_brand | Card scheme: e.g., VISA, MASTERCARD, MAESTRO |
card_entry_mode | Card input method: - ENTRY_MODE_MAGSTR - ENTRY_MODE_EMV - ENTRY_MODE_CONTACTLESS - ENTRY_MODE_CONTACTLESS_MCHIP - ENTRY_MODE_MANUAL |
response_code | Response code from the card issuer (≠ "00" means declined) |
authorization_code | Code returned by issuer |
signature_required (boolean) | true if receipt requires cardholder signature |
TSI | Transaction Status Indicator |
TVR | Terminal Verification Result |
AID | Application Identifier (from the card) |
STAN | System Trace Audit Number (transaction unique ID) |
CVM | Cardholder Verification Method: - P: PIN - S: Signature - N: No CVM |
application_name | Application 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_dcc | DCC currency |
exchange_rate (double) | DCC exchange rate |
TID | Terminal ID |
update_pending (boolean) | Whether an update is pending |
resp_code | Payment request response code |
expire_date | Payment request expiration date |
merchant_data Bundle
This bundle contains merchant information used for printing:
billing_descriptoraddress_line1address_line2MID– Merchant IDcustom_receipt_row1custom_receipt_row2
installment_data Bundle
Returned only if the transaction was done using installments:
| Key | Description |
|---|---|
number (int) | Number of installments |
interest_rate (double) | Interest rate applied |
fee (double) | Additional fee |
annual_percentage_rate | APR applied |
total_amount (double) | Total repayment amount |
first_installment_amount | Amount for the first installment |
subsequent_installment_amount | Remaining 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;
}
| Code | Constant | Description |
|---|---|---|
| 0 | TRANSACTION_SUCCESS | Transaction completed successfully |
| 1 | TRANSACTION_CANCELED | User cancelled the transaction |
| 2 | TRANSACTION_DECLINED | Transaction declined by the issuer or host |
| 3 | TRANSACTION_FAILED | Transaction failed due to timeout or error |
| 4 | DEVICE_NOT_ACTIVATED | Terminal is not activated |
| 5 | NO_DATA_FOUND | No transaction data found for the requested task |
| 6 | INVALID_CURRENCY | Terminal does not support the selected currency |
| 7 | INVALID_AMOUNT | Amount is outside the allowed range |
Tip: Use status_text or transaction_approved to quickly assess success/failure before evaluating deeper details.