---
title: Concepts
slug: connect/concepts
docTags: 
createdAt: 2023-11-24T14:14:33.622Z
---

# Partner Configuration

## Partner Account

Once the onboarding process starts, Klavi creates your partner account, which represents your organization and serves as the top-level entity in Klavi’s system.

## Partner Applications

A partner account can contain one or more applications, which are used for integration and configuration.

Each application has its own set of configurations:

1. Access Key & Secret Key
2. Whitelabel user journey customization
3. Transmitting institutions available for authorisation
4. Reports enabled for request
5. Reports and Events delivery addresses&#x20;
6. Delivery method (Autopost vs Fetch)

:::hint{type="info"}
There are no limits to application creation. Partners may request as many applications as needed.

Each application can be independently configured according to where it will be used in the partner’s user journey.

For example, a partner whose business is credit provision may configure one application with the pf\_identity report and whitelabel messaging focused on “accelerating the registration process”, to be used at the top of the onboarding funnel.

Alternatively, a second application may be configured with the pf\_credit\_risk report and whitelabel messaging focused on “credit reconsideration”, to be presented to users who were rejected during the initial analysis.
:::

# Link & Consent&#x20;

Links and consents are closely related but represent different concepts in Klavi’s integration.&#x20;

:::hint{type="info"}
A link represents the session in which the end user interacts with the consent authorisation flow, while a consent represents the authorization granted by the user.
:::

## Link

Since Open Finance is based on end-user authorization for data access, all Klavi Conecte data-sharing products rely on the creation of a **link session**. A link is the session through which the end user interacts with the flow and may authorize **one or more consents**.

- Session-level object&#x20;
- Represented by `linkId`
- Created using application credentials&#x20;
- Loads application configuration&#x20;
- Determines the end-user journey&#x20;
- Can result in **one or more consents**

## Consent

A **consent&#x20;**&#x69;s the authorization an end user grants to Klavi to access their data from a financial institution.
&#x20;After the user completes the required authorization steps, the consent becomes active and Klavi can collect data within its defined scope and share it with the partner.

There are 2 options regarding consent validity:

- Undetermined: valid until the user revokes it
- 12 months: valid for 12 months counting from authorisation date.&#x20;

When a consent expires or is revoked, data can no longer be requested. To resume data access, the user must authorise a new consent.&#x20;

- Regulatory authorization object&#x20;
- Represented by `consentId`
- Created during a link session&#x20;
- Used to track authorization status
- Is unique

### Consent vs Link

| Aspect       | Link                                                                                                                                        | Consent                                                                                                                                 |
| ------------ | ------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| Purpose      | Manage user session                                                                                                                         | Represent user authorisation                                                                                                            |
| Scope        | Session-level                                                                                                                               | Authorisation-level                                                                                                                     |
| Identifier   | `linkId`                                                                                                                                    | `consentId`                                                                                                                             |
| Created when | - Link is initialized (Basic Whitelabel)
- After [/links](docId\:Mz5jyWMWVljrEZZqpd30s) endpoint request (Advanced Whitelabel and API Only) | * After CPF/CNPJ confirmation (Basic/Advanced Whitelabel)
* After [/consents](docId\:j28OKsmDUuOoNqt53XSh7) endpoint request (API Only) |
| Relationship | One `linkId` -> one or more `consentIds`                                                                                                    | Each `consentId` is unique                                                                                                              |
| Used for     | Consent journey and configuration                                                                                                           | Data access and status tracking                                                                                                         |



### Consent Status

The details regarding each of the possible consent status are listed in the table below:

| **Consent Status**                | **Description**                                                          |
| --------------------------------- | ------------------------------------------------------------------------ |
| **STARTED**                       | Link created, start to consent flow                                      |
| **AWAITING\_AUTHORISATION**       | Waiting for end-user Open Finance consent authorization                  |
| **AWAITING\_LGPD\_AUTHORISATION** | Waiting for end-user LGPD authorisation; (required for Financial Data)   |
| **AUTHORISED**                    | Consent authorized by the end-user (valid status to call data endpoints) |
| **ERROR**                         | There was an issue in the link authorization flow                        |
| **REJECTED**                      | End-user rejected the link authorization                                 |
| **EXPIRED**                       | The link session expired before authorisation or rejection               |
| **REVOKED**                       | Consent revoked by end-user or other application                         |
| **DELETED\_BY\_USER**             | End-user requested data deletion                                         |



# Authorisation Types (Open Finance vs LGPD)

Klavi's data sharing authorisation flow is composed of 2 different authorisations:

:::Heading{depth="2" indent="1"}
Open Finance Authorisation
:::

This is the standard Open Finance authorisation journey where the end-user authorises the creation of a consent, through which a recipient institution (Klavi) is granted access to the end-user's data stored in a transmitting institution account.&#x20;

:::Heading{depth="2" indent="1"}
LGPD Data Sharing Authorisation
:::

Once Open Finance authorisation is successful, Klavi will display the LGPD Data Sharing Authorisation step to the end-user.&#x20;

The purpose of this authorisation is the end-user allowing Klavi to share the data with it's partners. Once granted, your application will receive the [consent\_authorised](docId\:L2P6pW11AdwVumkNS6PKc) event and will have permission to fetch the user's data using the [institution-level](docId:4rinIOvI1I501NOpBXprc) and [user-level](docId\:vDAeKvpwKHkHeDBsrO4Ac) APIs.

