Skip to main content
Version: 2023-01-01

Cas Link

Introduction​

Cas Link is a display interface for interactive end customers to be able to link their financial accounts to Cas and allow your Application to access account information through the Cas API.

Cas Link will handle account authentication, login device verification, and error handling with each Financial Services that Cas provides.

Try demo, view Cas Link Demo

Authentication​

Your Cas API client-id.

Security Scheme Type:

apiKey

Header parameter name:

x-client-id

Overview​

Cas Link will return a publicToken then this information will be used in exchange for the accessToken, and the Cas API will use the 'accessToken' to authenticate requests for access to the information.

Cas Link is the bank-linking screen embedded right inside your app. Your customer never has to leave it and keeps seeing your interface and branding. Cas handles the whole bank login, OTP and any errors along the way.

The linking flow starts when your customer wants to connect their financial account to your app. Here are the steps:

https://app-cua-ban.com/link-accountLink bank accounthttps://app-cua-ban.com/link-accountCas LinkPlease enter yourdetails to connectyour account to theappLink</>Your serverPOST /grant/token2Your serverPOST /grant/exchange4513Your appYour serverCas

Click the “Link bank account” button in the diagram to watch the flow. Hover any block for an explanation.

https://app-cua-ban.com/link-accountLink bank accounthttps://app-cua-ban.com/link-accountCas LinkPlease enter yourdetails to connectyour account to theappLink</>Your serverYour serverPOST /grant/tokenPOST /grant/exchange12345
Your appYour serverCas
  1. Your customer taps “Link bank account” right inside your app.
  2. Call POST /grant/token to create a grantToken, then return it to your app front end.
  3. Use the grantToken to open Cas Link for your customer. On success Cas returns a temporary publicToken.
  4. Call POST /grant/exchange to exchange the publicToken for an accessToken and its grantId.
  5. Store the accessToken wherever you consider safe and use it to call the APIs.
info

To be able to start a process of linking a financial account, it is necessary to initiate a grantToken. With grantToken you can configure information such as: what information is queried, the language (comming soon) and the financial services we support. Once a user logs in via Cas Link, the result publicToken will be returned to the redirectUri, which will then be used in exchange for the accessToken.

In order to open the Cas Link interface you need grantToken, if not, see Create Grant. Once you have grantToken you will open Cas Link by changing the <GRANT_TOKEN> information in the link below and open that link, the interface of CasLink will be displayed and KH will link the financial account here.

https://dev.link.bankhub.dev?grantToken=<GRANT_TOKEN>&redirectUri=<https://your-domain.com/callback-uri>&iframe=false

EnvironmentDescriptionHost
SandboxFor sandbox credentialshttps://dev.link.bankhub.dev
ProductionUsing official information, and the application has been releasedhttps://link.bankhub.dev
ParameterDescriptionNote
grantTokenGrant token, 30 minutesAPI /grant/token
redirectUriA URI indicating the destination where a user should be forwarded after completing the Link flowThe result publicToken will be returned on this URI
iframeOpen Cas Link in iframeDefault: false
stateOpaque, client-generated string to prevent CSRF / carry contextReturned verbatim via the callback. Reference

Error-handling flows​

When using a grant for a long period of time on your application, you will encounter a change in the customer’s financial account information resulting in a failure to retrieve the resource.

In this case, Cas Link supports the Update Mode feature to process updates to change information such as password, device authentication. For details, see Update Mode.