Introduction
Knot’s Detect product enables you to search for a user’s merchant accounts online and retrieve detected accounts, allowing you to then personalize your user experience.Getting started
Start the flow
Access your dashboard
Access your dashboard
Ensure you have access to the Knot Dashboard and retrieve your
client_id and secret to create an API key. Learn more about creating an API key and authentication to the API here.Retrieve available merchants
Retrieve available merchants
Call List Merchants to retrieve a list of merchants that are available for merchant account detection by passing
type = detect in the request. These are merchants you can allow users to link in your app and subsequently detect merchant accounts.You will be notified via the MERCHANT_STATUS_UPDATE webhook when/if the available merchant list changes, even if temporarily.Create a session
Create a session
With your API key for the
development environment, call Create Session with type: link to create a session used when invoking the SDK. More here on how to create an API key.Initialize the SDK
Initialize the SDK
Initialize the SDK with the
session_id retrieved from Create Session and a merchant Id retrieved from List Merchants in KnotConfiguration or you can use merchant_id: 60for Apple to get started quickly. The SDK is where users will interact with the Knot UI to authenticate to various merchants. All login flows, including step-up authentication, are handled within the SDK. Users will see real-time feedback as they progress through authenticating with a merchant.Link a merchant account
Login
Login
In the development environment, login to a merchant account using
user_good / pass_good credentials to link your user’s merchant account.Handle webhook events
Handle webhook events
Subscribe to webhooks in the Knot Dashboard so your backend can be notified about user-generated, server-side events. Listen for the following events:
AUTHENTICATED: fired when the authentication to a merchant is successful and the merchant account is therefore successfully linked to Knot. Similarly and as applicable, listen to the client-sideonEventcallback in the SDK to receive theauthenticatedevent.NEW_DETECTED_ACCOUNTS_AVAILABLE: fired when new detected accounts are available.
Search for detected accounts
When you receive theNEW_DETECTED_ACCOUNTS_AVAILABLE webhook, call Search Detected Accounts with a list of merchant or company names that are relevant to your use case. The endpoint will return whether a detected merchant account was found for the user at each one. This is useful when you have a specific set of merchants or companies you care about and want to know if a user has an account at any of them.
Sync detected accounts
When you receive theNEW_DETECTED_ACCOUNTS_AVAILABLE webhook, call Sync Detected Accounts to retrieve and save the merchants where a user has an account to your own system. This returns only merchants that Knot supports on its platform (i.e. those with a merchant_id), making it useful for engaging or re-engaging users to provision a payment method to the merchant wallet.