REST API

Creating an
mposUI
Instance Using the
create
Function

Follow these steps to create an
mposUi
 instance. This instance is required to access the functionality of the Tap to Phone Android SDK.
  1. Create an
    mposUi
    instance using the
    create
    function.
  2. Set the
    merchantId
    field value to the merchant ID you obtained.
  3. Set the
    merchantSecret
    field value to the secret key you obtained.
  4. Specify the environment by setting the
    providerMode
    field value to
    TEST
    or to
    LIVE
    • Use the
      ProviderMode.TEST
      setting to test your integration without charging a real payment card.
    • Use the
      ProviderMode.LIVE
      setting to perform live transactions.
    val mposUi = MposUi.create( providerMode = ProviderMode.LIVE, // ProviderMode.TEST merchantId = "MerchantId", merchantSecret = "SecretKey" )