As a first step, please contact Klavi business personnel([email protected]) to create Sandbox environment API credentials for you. These will give you access to Klavi Sandbox environment WhiteLabel/APIs and test financial institutions until you are ready to upgrade to a paid plan with live financial institutions and real customers.
Regardless of the environment, please ensure the security of this credentials, which means that the backend must be saved.
Follow the 2 steps below to create a test customer and share some test accounts with Open finance.
Step 1. Create Access Token
You should use the backend system to create an accessToken.
If you need to keep a valid accessToken in the backend system at all times, please use the refresh endpoint to refresh or call the auth endpoint again to apply for a new accessToken before the accessToken reaches its expiration.
Step 2. Create a Link
Create a Link using the accessToken generated earlier.
You should notice that using this endpoint has generated another linkToken, yes, these are two different tokens. accessToken: You can assume that this is the token used by your backend system linkToken: You can assume that this is the token used by the linkURL generated by this endpoint, and its lifecycle is the lifecycle of the linkId and linkURL.
You can use web or webview to open the linkURL, make subsequent selection of institutions, redirect to that institution for authentication, and return to the final result web page.
Klavi backend will send you the results through event webhook(even if it is a failed state), after the status change to AUTHORISED, you can send the specific report generation request you want based on the end user type(personal or business, their endpoints are different).
After you submit a request to generate specific or all report(The report you want to purchase has already been limited by Klavi backend), Klavi randomly starts retrieving data from the institution and processing it to generate the corresponding report, which will be sent to you through the report webhook.
Klavi also supports not having to actively call this endpoint. After you go living or move to production, you can proactively send all the reports you need through the report webhook after authorization is completed, or send them to Klavi's storage space. You can download them at any time through the Klavi Console.