Receive POS info

Add this to your AndroidManifest.xml file

AndroidManifest.xml

Add this query to enable communication with the myPOS app
<queries>
    <package android:name="com.mypos" />
</queries>

Here you can find simple info about myPOS terminal like TID, currency name, currency code, merchant info, etc.

Register POS Info

Retrieve terminal and merchant information from the myPOS device
MyPOSAPI.registerPOSInfo(MainActivity.this, new OnPOSInfoListener() {

    @Override

    public void onReceive(POSInfo info) {

        // =========================
        // POS TERMINAL INFORMATION
        // =========================

        // Terminal ID of the POS device
        String tid = info.getTID();
 
        // Currency name configured on the POS (example: EUR)
        String currencyName = info.getCurrencyName();
 
        // Currency ISO code (example: 978 for EUR)
        String currencyCode = info.getCurrencyCode();
 
        // =========================
        // MERCHANT INFORMATION
        // =========================
 
        // MerchantData object containing merchant details
        MerchantData merchant = info.getMerchantData();
 
        if (merchant != null) {

            // Merchant ID assigned by the payment provider
            String merchantId = merchant.getMID();

            // Official merchant/business name
            String merchantName = merchant.getMerchantName();
 
            // Merchant address line 1
            String addressLine1 = merchant.getAddressLine1();
 
            // Merchant address line 2
            String addressLine2 = merchant.getAddressLine2();
 
            // Descriptor that appears on the customer's bank statement
            String billingDescriptor = merchant.getBillingDescriptor();
 
            // Receipt footer type
            // 0 = No custom footer
            // 1 = Custom footer enabled
            int receiptFooterType = merchant.getReceiptFooterType();
 
            // Custom receipt footer text (row 1)
            String customReceiptRow1 = merchant.getCustomReceiptRow1();

            // Custom receipt footer text (row 2)
            String customReceiptRow2 = merchant.getCustomReceiptRow2();
 
            // =========================
            // Example usage (logging)
            // =========================
 
            Log.d("POS_INFO", "TID: " + tid);
            Log.d("POS_INFO", "Currency Name: " + currencyName);
            Log.d("POS_INFO", "Currency Code: " + currencyCode);
            Log.d("POS_INFO", "Merchant ID: " + merchantId);
            Log.d("POS_INFO", "Merchant Name: " + merchantName);
            Log.d("POS_INFO", "Address Line 1: " + addressLine1);
            Log.d("POS_INFO", "Address Line 2: " + addressLine2);
            Log.d("POS_INFO", "Billing Descriptor: " + billingDescriptor);
            Log.d("POS_INFO", "Receipt Footer Type: " + receiptFooterType);
            Log.d("POS_INFO", "Custom Receipt Row 1: " + customReceiptRow1);
            Log.d("POS_INFO", "Custom Receipt Row 2: " + customReceiptRow2);
        }
    }
});
Select Java or Kotlin above

POSInfo Object

FieldTypeDescription
TIDStringTerminal ID of the POS device
CurrencyNameStringCurrency name
CurrencyCodeStringCurrency code (ISO)
MerchantDataObjectMerchant data

MerchantData Object

FieldTypeDescription
MIDStringMerchant ID
merchant_nameStringMerchant name
address_line1StringAddress - line 1
address_line2StringAddress - line 2
billing_descriptorStringDescriptor for bank statement
receipt_footer_typeintReceipt footer type (0 = none, 1 = custom)
custom_receipt_row1StringCustom receipt row 1
custom_receipt_row2StringCustom receipt row 2

Example Response

The SDK returns data as a Bundle, but here's a logical JSON representation:
{
      "TID": "12345678",
      "CurrencyName": "EUR",
      "CurrencyCode": "978",
      "MerchantData": {
        "MID": "000123456789",
        "merchant_name": "My Shop Ltd",
        "address_line1": "Sofia Center",
        "address_line2": "Bulgaria",
        "billing_descriptor": "MYSHOP",
        "receipt_footer_type": 1,
        "custom_receipt_row1": "Thank you!",
        "custom_receipt_row2": "Visit again!"
      }
}