Access your customer dashboad
client_id
and secret
, which you will use as the basic auth username and password for your API key respectively. Note that your client_id
and secret
vary between thedevelopment
and production
environments.Subscribe to webhooks
Retrieve available merchants
type = transaction_link
. These are merchants you can display in your app and allow users to link. To get started quickly, you can use merchant_id: 19
for DoorDash to later pass when initializing the SDKYou will be notified via the MERCHANT_STATUS_UPDATE
webhook when/if this list changes.Create a session
client_id
and secret
for the development
environment, call Create Session to create a session used when invoking the SDK.Install the SDK
development
and production
environments in your Customer Dashboard.Initialize the SDK
session_id
retrieved from Create Session and a merchant Id
retrieved from List Merchants in KnotConfiguration
or you can use merchant_id: 19
for DoorDash 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.Id
in KnotConfiguration
when initializing the SDK is required for the TransactionLink product.Login
Handle authenticated event
AUTHENTICATED
webhook to notify your backend that the merchant account is successfully linked to Knot and that the connection status is connected
. Similarly and as applicable, listen to the client-side onEvent
callback in the SDK to receive the authenticated
event.You can also use Get Merchant Accounts to retrieve this and other merchant accounts, as well as their connection status. This can be useful to know that you should display the merchant account to the user in their list of linked merchant accounts with the appropriate connection status (i.e. connected
or disconnected
). See more about handling disconnected merchant accounts here.NEW_TRANSACTIONS_AVAILABLE
webhook. You will receive this event shortly after a user authenticates to a merchant account for the first time and on any subsequent instance where new transactions are created in the merchant account.
Upon receiving the NEW_TRANSACTIONS_AVAILABLE
webhook, make a request (or multiple) to Sync Transactions to sync new transactions for a user’s specific merchant account. In the development environment, you will receive 205 new transactions.
UPDATED_TRANSACTIONS_AVAILABLE
webhook. You will receive this event for a merchant account each time there are existing transactions for which data has changed (e.g. orderStatus: SHIPPED
-> orderStatus: DELIVERED
).
Upon receiving the UPDATED_TRANSACTIONS_AVAILABLE
webhook with an array of transaction IDs, make a request to Get Transaction By Id for each transaction ID, passing the ID received in the webhook as a path parameter.
connection.status
in Get Merchant Accounts will be returned as disconnected
and you will not receive transaction data for the user’s merchant account until it is reconnected. In this case, you’ll want to display a UX in your app to allow users to reconnect their account. For example, you may choose to display a button that says “Reconnect” or similar.