Basic WhiteLabel
Introduction
The Basic Whitelabel is the integration method to use Klavi's services with the least development effort for your company.
Klavi will create one or more partner applications, each with its own set of configurations and a corresponding static whitelabel URL.
The Basic Whitelabel URL will provide to your end-user access to Klavi's whitelabel consent journey so you can start collecting data sharing consents.
Obtain your Basic Whitelabel URLs
The whitelabel URLs for each app can be obtained through Klavi Console, following the path below:
- Login into your Console account
- In the menu sidebar, select:
- 'Integração'
- 'Configurar endereços'
- Select the desired environment
- Copy the 'Basic Whitelabel URL' of the desired application
If you have any issues, contact Klavi through [email protected].
Basic Whitelabel URL Example
Your Basic Whitelabel URL will follow the structure below:
How to use your Basic Whitelabel URLs
Integration & Delivery
The Basic Whitelabel URL is ready-to-use and can be integrated into your application or sent to your end-users through messaging solutions. The URL can be opened using webview or directly in the device browser.
Supported Path Parameters
The Basic Whitelabel URL supports path parameters, whose functions vary from data input automation (personal_tax_id, phone, e-mail), user redirection (redirect_url, app_link) and more.
All supported path parameters must be used with type = string
Parameter name | Description |
|---|---|
personal_tax_id | Automatically fills the user's CPF in the consent journey |
business_tax_id | Automatically fills the business CNPJ in the consent journey |
Automatically fills the user/business e-mail in the consent journey | |
phone | Automatically fills the user/business phone in the consent journey |
institution_code | Pre-determines the institution from which data will be shared. Skips institution selection page. |
redirect_url | The URL Klavi will redirect your end-user once the consent journey is completed. It's value must be processed in encodeURIComponent() function as below, for example: “%3a” replaces “:” “%2f” replaces “/” “%3f” replaces “?” “%3d” replaces “=” |
products_callback_url | Set one or more product callback URLs. Has higher priority than the receival address configured in Klavi Console. It's value must be processed in encodeURIComponent() function as below, for example: “%3a” replaces “:” “%2f” replaces “/” “%3f” replaces “?” “%3d” replaces “=” |
external_info | Used for:
It's value must be processed in encodeURIComponent() function as below, for example: “%3a” replaces “:” “%2f” replaces “/” “%3f” replaces “?” “%3d” replaces “=” |
app_link | Used when the partner wants to display the LGPD step inside their own app (via WebView). After the Open Finance authorization step is completed in the bank environment, the end-user is redirected to the URL provided in the app_link parameter (typically a deep link or universal link of the partner’s app). The redirect includes a query parameter whose name is defined by app_redirect_url_key. The value of this parameter is the Klavi-hosted LGPD URL, which the partner’s app must open in a WebView. |
app_redirect_url_key | Defines the name of the query parameter that Klavi will add to the app_link URL. This parameter will contain the Klavi-hosted LGPD step URL as its value. The partner’s application must read this parameter and open its value inside a WebView. |
The above parameters are similar to the Create a Link API parameters, except for changing from a camelCase to snake_case since Basic Whitelabel supports path parameters.
2. Fetch Product Data
You can use web or webview to open the Link URL, 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).
Command:
curl --location 'https://api-sandbox.klavi.ai/data/personal/institution-data' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer JhbGciOiJFUzI1NiIs.QtYjAyOC1hN2ZhMWFjZGRjZjkiLCJ0.nlTqpAZHeq4P2xFD' \
--data '{"taxId":"string","institutionId":"string","linkId":"String","consentId":"Array","products":"Array","productsCallbackURL":"Object"}'Expected response:
{
"requestId": "1325412e-e566-4f4e-ac5b-2f4471586b89",
"message": "ok"
}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 move to production, Klavi can proactively send all the reports to your webhook, or send them to Klavi's storage space. You can download them at any time through the Klavi Console.