Introduction

Merchant Link is the client-side component that your customers interact with to link their merchant accounts.

Merchant Link handles credential validation, multi-factor authentication, and error handling for each merchant that Typecastle supports.

Check out our demo of Merchant Link to see how it works.

Merchant Link is the only available method for connecting merchant accounts and is required for all Typecastle integrations.

The flow

Here is the step-by-step process of connecting a customer’s merchant account. The flow begins when a customer wants to connect their merchant account to your app.

Step 1. Create a new connection

Send a POST /connection request to create a new connection. Upon success, the response will contain a connection_id, a unique identifier for the newly created connection.

{
   "connection_id": 01ARZ3NDEKTSV4RRFFQ69G5FAV"
}

Be sure to store this identifier on your system, as you’ll need it for future requests.

New connections have a Pending Link status. You can see the status of any connection you have created by sending a GET /connection/{connection_id} request.

Step 2. Request a connection token

Send a POST /connection/{connection_id}/token to request a connection_token.

Include the connection_id as a URL parameter to indicate the connection you’re requesting a token for.

Connection tokens are short-lived tokens that are used to initialize Merchant Link.

Pass the connection_token to an instance of Merchant Link. This allows your customer to proceed with linking their merchant account.

After a customer successfully links their account, you will receive a callback via the onSuccess() function, indicating that account credentials were verified by Typecastle.

Connections move to a Activated status when a customer successfully verifies their credentials and links their account.

You can customize parts of Merchant Link in the Typecastle Dashboard.

  • Branding - Upload your logo to be placed on screen.
  • Merchant list - Set a default list of merchants for customers to select, or limit the choice to one or more relevant merchants based on your project’s needs.

Next steps

Take a look at our recommended next steps.