KnotConfiguration
class. The configuration allows you to set the environment
, entry point
, and other user experience configurations.
KnotConfiguration
and CustomerConfiguration
classes are used to initialize the SDK with specific parameters.
KnotConfiguration
Name | Type | Description |
---|---|---|
sessionId | string | The session created by calling /session/create in your backend. |
clientId | string | Your organization’s client ID. Note that this varies between development and production environments. |
environment | string | The desired environment (development or production ). |
product | string | Optional. Ignored in version 1.0.7+ and fully deprecated in the next major version. The Knot product the session will inherit — the same as the type of session created (e.g. card_switcher , transaction_link ). |
entryPoint | string | Optional. The specific entry point from within your app where you are initializing the Knot SDK (e.g. onboarding ). |
useCategories | boolean | Optional. Whether to display merchant categories and therefore group merchants into categories for discoverability. Default: true . |
useSearch | boolean | Optional. Whether to display the search bar, enabling users to search for merchants. Default: true . |
merchantIds | number[] | Optional. A list of merchant ID(s) to display. It is recommended to provide 0 or 1 merchant ID depending on your desired user experience. |
domainUrls | string[] | Optional. Android only. A set of domains for which Knot should explicitly not clear cookies. |
CustomerConfiguration
onError
callback. To take advantage of this functionality, please contact the Knot team who will be happy to assist you.Name | Type | Description |
---|---|---|
cardName | String | Optional. The differentiated display name for the card product, used inside the Knot SDK (e.g. Debit Card , Credit Card ). This value will override the default value Card . |
customerName | String | Optional. The differentiated display name for the company, used both as a standalone and prepended to the cardName (e.g. Smart Bank , Payment Corp ). This value will override your default customer name value. Only recommended if you issue cards under multiple brands. |
logoId | String | Optional. The differentiated logo for the company. This value will override your default logo. |
"Your [customerName] [cardName | Card] was added."
open
method like below:
KnotConfiguration
. More in Retrieving & Listing Merchants. The merchant ID is the same across all environments.
Knot.open
. This value will be returned in the AUTHENTICATED
webhook.
useCategories: false
and useSearch: false
in Knot.open
. This is not recommended.
addKnotListener
method.
onSuccess
onError
KnotError
with the following errors:
errorCode | errorDescription |
---|---|
Invalid_Session | The session is invalid. |
Expired_Session | The session has expired. |
Invalid_Client_Id | The client ID is invalid. |
Internal_Error | An internal error occurred. |
Merchant_Id_Not_Found | The merchant ID is required. |
Invalid_Card_Name | The card name is invalid. |
Invalid_Customer_Name | The customer name is invalid. |
Invalid_Logo_Id | The logo ID is invalid. |
onExit
onEvent
KnotEvent.event
property:
Name | Purpose |
---|---|
REFRESH_SESSION_REQUEST | Emitted when the session used to initialize the SDK needs to be refreshed. |
MERCHANT_CLICKED | Emitted when a user clicks on a merchant from the merchant list. |
LOGIN_STARTED | Emitted when a user submits their credentials to login to the merchant. |
AUTHENTICATED | Emitted when a user successfully logs in to the merchant. |
OTP_REQUIRED | Emitted when a user needs to enter an OTP code to login to the merchant. |
SECURITY_QUESTIONS_REQUIRED | Emitted when a user needs to enter answers to security questions to login to the merchant. |
APPROVAL_REQUIRED | Emitted when a user needs to approve the login - often via a push notification or directly in the merchant’s mobile app - to login to the merchant. |
ZIPCODE_REQUIRED | Emitted when a user needs to enter their zip code to login to the merchant. |
LICENSE_REQUIRED | Emitted when a user needs to enter their drivers license to login to the merchant. |
domainUrls
configuration in Knot.open
. This is uncommon.