curl --request POST \
--url https://development.knotapi.com/development/accounts/link \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"external_user_id": "abc123",
"merchant_id": 19,
"card_switcher": true,
"card_id": "81n9al10a0ayn13"
}
'{
"message": "Success"
}Development
Link Account
Link a merchant account in development.
POST
/
development
/
accounts
/
link
curl --request POST \
--url https://development.knotapi.com/development/accounts/link \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"external_user_id": "abc123",
"merchant_id": 19,
"card_switcher": true,
"card_id": "81n9al10a0ayn13"
}
'{
"message": "Success"
}Before using this endpoint, it is recommended to setup a webhook for the development environment in the Knot Dashboard if you have not done so already.
Overview
This endpoint is used to manually link a user’s merchant account in the development environment for testing purposes without the need to install or invoke the client-side SDK. Calling this endpoint will generate a linked merchant account on the Knot platform for a specific user & merchant and optionally simulate the card switcher flow (by passingcard_switcher: true) or generate new transactions (by passing the transactions object in the request).
Usage
- CardSwitcher
- TransactionLink
- Shopping
You can test all of the following without use of the client-side SDK:
- Link a merchant account to the Knot platform.
- Receive notification of the link via the
AUTHENTICATEDevent to your webhook, then POST card data to theSend Card (JWE)orSend Cardendpoint. - Receive notification of the result via the
CARD_UPDATEDorCARD_FAILEDevent.
The
card_id parameter is required when card_switcher is true. The card_switcher parameter is mutually exclusive with the transactions parameter. You cannot use both in the same request.You can test all of the following without use of the client-side SDK:
- Link a merchant account to the Knot platform.
- Receive notification of the link via the
AUTHENTICATEDevent to your webhook. - Generate sample transactions.
- Receive notification of the transactions via the
NEW_TRANSACTIONS_AVAILABLEevent to your webhook.
You can test all of the following without use of the client-side SDK:
- Link a merchant account to the Knot platform.
- Receive notification of the link via the
AUTHENTICATEDevent to your webhook. - Begin making requests to Sync Cart and Checkout.
Authorizations
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password. Use your client_id as the username and your secret as the password value.
Body
application/json
The input parameters required for linking a merchant account in development.
- CardSwitcher
- TransactionLink
- Shopping
Your unique identifier for the user.
Example:
"abc123"
Unique identifier for the merchant.
Example:
19
When set to true, simulates the card switcher flow.
Example:
true
Your unique identifier for a specific card. Required when card_switcher is true.
Example:
"81n9al10a0ayn13"
Optional key-value pairs to include in webhook payloads. Maximum 10 keys, 500 characters per value.
Show child attributes
Show child attributes
Example:
{
"reference_token": "abc123",
"trace_id": "def456"
}Response
Successful request.
Success message.
Example:
"Success"
Was this page helpful?
⌘I