Open Nav
  Back to guides

Working with Multi-MID terminals

Updated Oct 10, 2017

Overview

Multi-MID feature allows a single physical terminal to be associated with multiple merchant accounts. This is used for businesses like salons where each stylist has their own business and a unique Merchant ID. Merchants can easily swap between MIDs by switching the user on the device.

Setting up a developer terminal/emulator as a multi-MID device

  1. Create two test merchants with the same acquirer (Note: if the merchant accounts do not use the same acquirer multi-MID activation will fail)
  2. Activate the terminal using the first test merchant account by either scanning the QR code or entering MID and TID information manually.
  3. Once the terminal is activated unlock Poynt Developer settings. (Please note, that most of these settings should not be modified as changing some of them could render the terminal unusable)
    • go to Settings
    • go to About
    • Tap 10 times on Poynt OS. You should get a Toast message that the Developer Preferences have been enabled
    • Go back to the Settings screen
    • Tap on Developer Preferences
    • Tap on Payments/Add Merchant Terminal Id
    • Make sure the right Acquirer is selected in the drop-down and enter the MID and TID associated with your second test account and Tap on Add button

You can find the MID and TID for the second test merchant in Poynt HQ.

If the activation was successful you should see a Select User screen which will now contain the list of terminal users from the second test merchant. If you don't see this screen check the device logcat and search for "/activate". The log lines surrounding this will have an error message explaining the failure reason.

To change context between test merchant #1 and test merchant #2 use the Switch User button on the terminal home screen. Note: we recommend that you use descriptive names when creating terminal users in each of the test merchant accounts that would allow you to easily tell which test merchant you are logging in as.

Integration

Recognizing if your application is running on a multi-MID terminal

To determine if your application is running on a multi-MID device call IPoyntBusinessService.getAllBusinesses().
In your callback's onResponse() check if the List of Business objects contains more than 1 element, and if it does, the terminal is set up as a multi-MID device.

When a terminal user switch occurs, Poynt broadcasts an event poynt.intent.action.ACCOUNT_LOGIN. Your application should have a BroastcastReceiver class listening to this event and triggering IPoyntBusinessService.getBusiness() call to determine if the merchant switch has occurred and subsequently updating your application's state.

<receiver  
  android:name=".LoginReceiver"
  android:exported="true">
  <intent-filter>
    <action
      android:name="poynt.intent.action.ACCOUNT_LOGIN"/>
  </intent-filter>
</receiver>  

For example, let's say merchant A installed a gift card application and used it to reload a customer's card. When merchant B logs in, the gift card app should receive the ACCOUNT_LOGIN event, check if the other merchant is logged in now and present a sign in screen (assuming merchant B also uses the same gift card application) or a registration screen. When merchant A logs back in, the app should recognize that this merchant was already logged in.