> For the complete documentation index, see [llms.txt](https://docs.lhv.com/home/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.lhv.com/home/connect/fundamentals/service-provider-model.md). Agents can also search and read this documentation through its [MCP server](https://docs.lhv.com/home/~gitbook/mcp).

# Service Provider Model

Describing the optional Service Provider model to provide a single integration for multi-client setup.

The service provider model allows one integration to access Connect services on behalf of multiple clients using a single connection certificate.

It is suitable for technical service providers and corporate groups that manage banking integrations for several legal entities.

### Choose your connection model

| Model                    | Description                                                                                                 |
| ------------------------ | ----------------------------------------------------------------------------------------------------------- |
| Direct client connection | A client uses a dedicated connection certificate to access its own agreed services and accounts.            |
| Service provider model   | A service provider uses one connection certificate to access services on behalf of multiple legal entities. |

The connection certificate authenticates the connecting party. Access to accounts and services depends on the relevant agreements.

### How the service provider model works

There are two roles:

* **Service provider:** operates the integration and connects directly to LHV Connect.
* **Represented client:** legal entity on whose behalf the service provider uses Connect services.

Typical examples include:

* A corporate group operating one integration for several legal entities.
* A technical service provider offering banking integrations to LHV clients.

The connection certificate identifies the service provider. Client identification headers identify the represented client for each request.

### Identify the represented client

In the service provider model, every Connect API request must include `Client-Code` and `Client-Country` identifying the represented client, alongside the other inputs required by the service.

| Header           | Description                                                                                                                                                    |
| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Client-Code`    | The represented client’s identifier, typically a company registration number, such as a UK Companies House number or an equivalent national registration code. |
| `Client-Country` | The ISO country code of the country that issued the client identifier.                                                                                         |

For example:

```
Client-Code: 01234567
Client-Country: GB
```

Use the represented client’s values when acting on that client’s behalf. Requests missing the required headers return an error.&#x20;

### Manage messages and webhooks

The service provider receives and processes messages on behalf of its represented clients.

Retain the relevant client and message identifiers so that responses, events, and processing outcomes are associated with the correct client.

Read [Messaging Pattern](https://docs.lhv.com/home/connect/fundamentals/messaging) for response correlation, acknowledgement, duplicate handling, and retry guidance.

#### Webhook configuration

In the service provider model, webhook subscriptions are managed by the service provider rather than directly by represented clients.

Follow [Managing Webhook Configurations](https://docs.lhv.com/home/connect/services/webhooks/managing-webhook-configurations) for subscription setup and [Webhook Security](https://docs.lhv.com/home/connect/services/webhooks/webhook-security) for incoming request verification.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.lhv.com/home/connect/fundamentals/service-provider-model.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
