Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.knotapi.com/llms.txt

Use this file to discover all available pages before exploring further.

Introduction

Detect enables you to identify a user’s online merchant accounts and optionally retrieve them from the Knot platform, allowing you to then personalize your user experience.

Getting started

This option is for those who’ve already implemented the CardSwitcher product.
1

Update session creation

When calling Create Session to create a session for the SDK, simply add the user’s email address and phone number to the request.
curl --request POST \
  --url https://development.knotapi.com/session/create \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "type": "card_switcher",
  "external_user_id": "123abc",
  "card_id": "81n9al10a0ayn13",
  "email": "ada.lovelace@gmail.com",
  "phone_number": "+11234567890"
}
'
2

Personalize the UX

When the merchant selection experience is rendered in the SDK, it will be automatically personalized to take into account a user’s detected online merchant accounts
3

Optionally, receive detected merchant accounts

Listen for the NEW_DETECTED_ACCOUNTS_AVAILABLE webhook event to be notified when new detected accounts have been found for a given user. The webhook payload includes a data.detected_accounts array with the user’s detected merchant accounts.
To test receiving the NEW_DETECTED_ACCOUNTS_AVAILABLE webhook in the development environment, pass the user’s email into the email field when calling Create Session.