# Authentication Alignment

If your application has its own authentication mechanism (e.g. username and password) and multiple pricing tiers, you may need to ensure that the Smart Terminal using your application has an active billing agreement with the right service tier.

If you wish to confirm this information, please follow the steps outlined below.

  1. Perform a getSubscriptions (opens new window) call on the smart terminal.

  2. Compare the businessId that you received in the getSubscriptions response with the businessId of the current terminal.

NOTE

Please note that if your subscription is at the store level or terminal level, you would also have to make sure the storeIds and deviceIds match.

Currently, there are two ways for your application to find the terminal storeId and businessId:

# Using IPoyntBusinesService

You can call IPoyntBusinessService.getBusiness() to get a Business object. The business object will contain an array of Store objects with only one element - the current store. The Store object will contain an array of StoreDevice objects again with only one element - the current terminal.

{
   "mcc" : "5812",
   "sic" : "5812",
   "legalName" : "Dennis's Biz",
   "businessUrl" : "",
   "doingBusinessAs" : "the poynt shop",
   "timezone" : "America/Los_Angeles",
   "acquirer" : "CHASE_PAYMENTECH",
   "attributes" : {
      "tipScreenTimeoutInMilliSecs" : "4000",
      "automaticSettlementTime" : "2330",
      "validatePANForManualEntry" : "0",
      "merchantContactLastName" : "Smith",
      "customScreenBrightness" : "0",
      "purchaseAction" : "AUTHORIZE",
      "tipType2" : "P",
      "lodgingPromptTotalStayAmount" : "1",
      "maxOfflineTotal" : "10000",
      "receiptScreenTimeoutInMilliSecs" : "3000",
      "signoutAfterTransaction" : "0",
      "closingTime" : "",
      "defaultScreenBrightness" : "-1",
      "showCustomTipByDefault" : "0",
      "skipSignatureAmount" : "2500",
      "reportingContactEmail" : "dennis+joesfoodtruck2@poynt.co",
      "defaultScreenOffTimeoutInSecs" : "-1",
      "merchantBackgroundImageUrl" : "",
      "disableOrderAutoClose" : "0",
      "disableDebit" : "0",
      "stopAfterCardReadRecords" : "0",
      "tipPercent1" : "15",
      "disableEMVCT" : "0",
      "hideCustomerWelcomeMessage" : "0",
      "hideCustomerPaymentIcons" : "0",
      "verifySignature" : "0",
      "disablePaperReceipt" : "0",
      "autoCapture" : "0",
      "automaticReportsTypes" : "TRANSACTIONS,ITEMS",
      "merchantContactFirstName" : "Dennis",
      "tipType3" : "P",
      "settlementMode" : "HOST",
      "operatingHours" : "",
      "tipBeforeCardRead" : "0",
      "tipType1" : "P",
      "tipAmount1" : "100",
      "disableSMSReceipt" : "0",
      "supportContactEmail" : "",
      "viewScope" : "TERMINAL",
      "useVTForManualEntry" : "1",
      "distributorId" : "",
      "autoForwardReceiptScreen" : "0",
      "customerWelcomeMessage" : "",
      "customFooterText" : "",
      "autoSelectCommonDebitAID" : "0",
      "forceEnableVT" : "0",
      "supportContactPhone" : "",
      "localeCountry" : "US",
      "disableEmailReceipt" : "0",
      "signoutAfterSuspend" : "0",
      "productsDisabled" : "0",
      "tipAmount2" : "200",
      "customScreenOffTimeoutInSecs" : "0",
      "autoInventoryUpdate" : "0",
      "maxOfflineTransactions" : "5",
      "lodgingTaxRate" : "0",
      "transactionListLimitSize" : "1000",
      "disableWaitForCardRemoval" : "0",
      "secondScreenLanguages" : "",
      "tipAfterCardRead" : "0",
      "disableOrderInbox" : "0",
      "autoForwardTipScreen" : "0",
      "tipPercent3" : "20",
      "cashbackAmountLimit" : "30000",
      "webOnboarded" : "0",
      "supportedCustomFunding" : "",
      "parentMid" : "",
      "maxOfflineTransactionValue" : "2500",
      "distributorName" : "",
      "tipAmount3" : "300",
      "automaticReportsTime" : "0000",
      "tipPercent2" : "18",
      "customerBackgroundImageUrl" : "",
   },
   "externalMerchantId" : "dennis's933a",
   "address" : {
      "territoryType" : "STATE",
      "line1" : "15685 Business Drive",
      "status" : "ADDED",
      "countryCode" : "USA",
      "territory" : "California",
      "id" : 946,
      "postalCode" : "94301",
      "line2" : "Suite 302",
      "city" : "Palo Alto"
   },
   "activeSince" : {
      "year" : 2015,
      "dayOfMonth" : 20,
      "month" : 6,
      "minute" : 14,
      "hourOfDay" : 16,
      "second" : 35
   },
   "id" : "469e957c-57a7-4d54-a72a-9e8f3296adad",
   "emailAddress" : "dennis@domain.com",
   "phone" : {
      "ituCountryCode" : "1",
      "areaCode" : "999",
      "id" : 946,
      "type" : "BUSINESS",
      "status" : "ADDED",
      "localPhoneNumber" : "1550011",
      "extensionNumber" : "7398"
   },
   "industryType" : "Cafe",
   "description" : "Just another test merchant",
   "status" : "ACTIVATED",
   "type" : "TEST_MERCHANT",
   "stores" : [
      {
         "attributes" : {
            "disablePaperReceipt" : "0",
            "autoCapture" : "0",
            "supportContactEmail" : "",
            "disableEMVCL" : "0",
            "tipBeforeCardRead" : "1",
            "operatingHours" : "",
            "lodgingPromptTotalStayAmount" : "1",
            "hostSettlementTime" : "0000",
            "closingTime" : "",
            "tipScreenTimeoutInMilliSecs" : "4000",
            "validatePANForManualEntry" : "0",
            "purchaseAction" : "SALE",
            "stopAfterCardReadRecords" : "0",
            "disableDebit" : "0",
            "disableOrderAutoClose" : "0",
            "showCustomTipByDefault" : "1",
            "defaultScreenOffTimeoutInSecs" : "72000",
            "reportingContactEmail" : "dennis@domain.com",
            "parentMid" : "",
            "tipAfterCardRead" : "0",
            "disableOrderInbox" : "0",
            "customerBackgroundImageUrl" : "https://domain.com/background.jpg",
            "tipAmount3" : "300",
            "distributorName" : "",
            "localeCountry" : "US",
            "disableEmailReceipt" : "0",
            "customFooterText" : "",
            "viewScope" : "TERMINAL",
            "customerWelcomeMessage" : "",
            "distributorId" : "",
            "customScreenOffTimeoutInSecs" : "1",
            "tipAmount2" : "200",
            "productsDisabled" : "0",
            "tipType3" : "P",
            "automaticReportsTypes" : "TRANSACTIONS,ITEMS",
            "merchantContactFirstName" : "Dennis",
            "hideCustomerWelcomeMessage" : "0",
            "hideCustomerPaymentIcons" : "0",
            "verifySignature" : "0",
            "disableSMSReceipt" : "0",
            "tipAmount1" : "100",
            "tipType1" : "P",
            "settlementMode" : "TERMINAL",
            "signoutAfterTransaction" : "0",
            "receiptScreenTimeoutInMilliSecs" : "3000",
            "tipType2" : "P",
            "maxOfflineTotal" : "10000",
            "defaultScreenBrightness" : "-1",
            "merchantContactLastName" : "Smith",
            "automaticSettlementTime" : "2330",
            "customScreenBrightness" : "0",
            "merchantBackgroundImageUrl" : "",
            "tipPercent1" : "15",
            "skipSignatureAmount" : "100",
            "tipPercent3" : "20",
            "cashbackAmountLimit" : "30000",
            "webOnboarded" : "0",
            "autoForwardTipScreen" : "0",
            "maxOfflineTransactionValue" : "2500",
            "enableGratuity" : "1",
            "tipPercent2" : "18",
            "automaticReportsTime" : "0000",
            "supportContactPhone" : "",
            "autoSelectCommonDebitAID" : "0",
            "signoutAfterSuspend" : "0",
            "useVTForManualEntry" : "0",
            "autoForwardReceiptScreen" : "0",
            "transactionListLimitSize" : "1000",
            "lodgingTaxRate" : "0",
            "maxOfflineTransactions" : "5",
            "autoInventoryUpdate" : "0",
            "secondScreenLanguages" : "",
            "disableWaitForCardRemoval" : "0",
         },
         "currency" : "USD",
         "longitude" : -132.162,
         "acquirer" : "CHASE_PAYMENTECH",
         "fixedLocation" : true,
         "externalStoreId" : "dennis's71f3",
         "id" : "d1f94f81-6257-41ce-83a8-54bf233fc78d",
         "address" : {
            "territory" : "California",
            "countryCode" : "USA",
            "status" : "ADDED",
            "line1" : "15685 Business Drive",
            "territoryType" : "STATE",
            "line2" : "Suite 302",
            "postalCode" : "94301",
            "city" : "Palo Alto",
            "id" : 947
         },
         "displayName" : "Store 2",
         "latitude" : 37.4457,
         "phone" : {
            "localPhoneNumber" : "1550011",
            "status" : "ADDED",
            "type" : "BUSINESS",
            "id" : 947,
            "areaCode" : "180",
            "ituCountryCode" : "1",
            "extensionNumber" : "7398"
         },
         "storeDevices" : [
            {
               "name" : "counter 1",
               "externalTerminalId" : "941a",
               "catalogId" : "d657f867-aebd-4e90-997e-b04839fc027f",
               "status" : "ACTIVATED",
               "deviceId" : "urn:tid:d23eaeca-675f-3766-9c51-f6a0707e2587"
            }
         ],
         "timezone" : "America/Los_Angeles",
         "processor" : "CREDITCALL"
      }
   ],
   "processor" : "CREDITCALL"
}

If you would like to see this API in action, please refer to our Sample App (opens new window).

# Using IPoyntTokenService

Another option to work with businessId and storeId is using the IPoyntTokenService.grantToken API, which returns an access token with a set of custom claims, including poynt.biz (or businessId), poynt.str (or storeId), and poynt.did (deviceId).

The correct implementation and execution of this API are also documented on our Sample App (opens new window).

Last Updated: 10/4/2022, 8:01:35 AM