# VIBAN Info

## Virtual IBAN Info - Request <a href="#virtual-iban-open" id="virtual-iban-open"></a>

<mark style="color:green;">`POST`</mark> <https://connect.lhv.com/viban/info>

Service is used to request Virtual IBAN data. Response message structure is slightly different for private and legal persons.

#### **Headers**

| Name           | Value             |
| -------------- | ----------------- |
| Content-Type   | `application/xml` |
| Client-Code    | `customer value`  |
| Client-Country | `customer value`  |

#### **Body**

{% file src="<https://2266620947-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHGywduAxJuxV3reZhASh%2Fuploads%2Fqsa7metF8aJ1dAu3vajK%2Fviban.info.request.xsd.xml?alt=media&token=34baa506-3139-4456-a697-73498afac70a>" %}

XML structure description:

<table><thead><tr><th width="105">MULT.</th><th>MESSAGE ELEMENT</th><th>XML TAG</th><th>Description</th></tr></thead><tbody><tr><td>[1..1]</td><td>+MessageRoot</td><td>&#x3C;VibanInfoRequest></td><td></td></tr><tr><td>[1..1]</td><td>++MasterAccount</td><td>&#x3C;MasterAccount></td><td>Master account IBAN (must belong to PSP).</td></tr><tr><td>[1..1]</td><td>++VirtualIBAN</td><td>&#x3C;VirtualIBAN></td><td>Virtual IBAN (must be issued under MasterAccount specified).</td></tr></tbody></table>

#### Samples

{% tabs %}
{% tab title="Request VIBAN Info" %}

```xml
<?xml version="1.0" encoding="UTF-8"?>
<VibanInfoRequest>
  <MasterAccount>GB88LHVB01020000000001</MasterAccount>
  <VirtualIBAN>GB88LHVB01020000000002</VirtualIBAN>
</VibanInfoRequest>
```

{% endtab %}
{% endtabs %}

### **Response**

**Headers**

| Name         | Value             |
| ------------ | ----------------- |
| Content-Type | `application/xml` |
| X-Bank-Code  | `LHVUK`, `LHVEE`  |

#### Body

{% file src="<https://2266620947-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHGywduAxJuxV3reZhASh%2Fuploads%2FEXm2HoDVDmJLx2iRgpQt%2Fviban.info.response.xsd.xml?alt=media&token=b84300df-e033-4a19-a8b3-3b246854123e>" %}

{% tabs %}
{% tab title="202" %}
{% hint style="success" %}
Request accepted - no content
{% endhint %}
{% endtab %}

{% tab title="403" %}
{% hint style="danger" %}
Error code and description
{% endhint %}

<pre><code>&#x3C;Errors>
<strong>    &#x3C;Error>
</strong>        &#x3C;ErrorCode>FORBIDDEN&#x3C;/ErrorCode>
        &#x3C;Description>User doesn't exist&#x3C;/Description>
    &#x3C;/Error>
&#x3C;/Errors>
</code></pre>

{% endtab %}
{% endtabs %}

## Response message

Response message is created and can be requests by the Messages services - [messages](https://docs.lhv.com/home/connect/services/messages "mention")

{% hint style="info" %}
HTTP Header Message-Response-Type: VIBAN\_INFO
{% endhint %}

#### Body

XML structure description:

<table><thead><tr><th width="104">MULT.</th><th>MESSAGE ELEMENT</th><th>XML TAG</th><th>Description</th></tr></thead><tbody><tr><td>[1..1]</td><td>+MessageRoot</td><td>&#x3C;VibanInfoResponse></td><td></td></tr><tr><td>[0..1]</td><td>++ClientReference</td><td>&#x3C;ClientReference></td><td>Customer reference defined by Payment Service Provider.</td></tr><tr><td>[1..1]</td><td>++VirtualIBAN</td><td>&#x3C;VirtualIBAN></td><td></td></tr><tr><td>[1..1]</td><td>++User</td><td>&#x3C;User></td><td></td></tr><tr><td>[0..1]</td><td>+++Person</td><td>&#x3C;Person></td><td>Element of choice, used if Virtual IBAN owner is private person.</td></tr><tr><td>[1..1]</td><td>++++Name</td><td>&#x3C;Name></td><td>First and last name of private person.</td></tr><tr><td>[1..1]</td><td>++++BirthDate</td><td>&#x3C;BirthDate></td><td>Birth date of private person (YYYY-MM-DD).</td></tr><tr><td>[0..1]</td><td>++++BirthCountry</td><td>&#x3C;BirthCountry></td><td>Country of birth of private person (ISO 3166-1 alpha-2).</td></tr><tr><td>[1..1]</td><td>++++Residency</td><td>&#x3C;Residency></td><td>Country of residence of private person (ISO 3166-1 alpha-2).</td></tr><tr><td>[0..1]</td><td>++++DocumentNumber</td><td>&#x3C;DocumentNumber></td><td>Document number of private person.</td></tr><tr><td>[0..1]</td><td>+++Company</td><td>&#x3C;Company></td><td>Element of choice, used if Virtual IBAN owner is legal person.</td></tr><tr><td>[1..1]</td><td>++++Name</td><td>&#x3C;Name></td><td>Name of company.</td></tr><tr><td>[1..1]</td><td>++++CountryOfOrigin</td><td>&#x3C;CountryOfOrigin></td><td>Country of origin of legal person (ISO 3166-1 alpha-2).</td></tr><tr><td>[1..1]</td><td>++++TaxResidency</td><td>&#x3C;TaxResidency></td><td>Tax residency of legal person (ISO 3166-1 alpha-2).</td></tr><tr><td>[1..1]</td><td>++++RegistrationNumber</td><td>&#x3C;RegistrationNumber></td><td>Registration number of legal person.</td></tr><tr><td>[1..1]</td><td>++++Representative</td><td>&#x3C;Representative></td><td></td></tr><tr><td>[1..1]</td><td>+++++Name</td><td>&#x3C;Name></td><td>First and last name of representative.</td></tr><tr><td>[1..1]</td><td>+++++BirthDate</td><td>&#x3C;BirthDate></td><td>Birth date of representative, YYYY-MM-DD.</td></tr><tr><td>[1..1]</td><td>+++++Residency</td><td>&#x3C;Residency></td><td>Country of residence of representative (ISO 3166-1 alpha-2).</td></tr><tr><td>[1..1]</td><td>+++Address</td><td>&#x3C;Address></td><td></td></tr><tr><td>[1..1]</td><td>++++Country</td><td>&#x3C;Country></td><td>Address country (ISO 3166-1 alpha-2).</td></tr><tr><td>[1..1]</td><td>++++StreetNo</td><td>&#x3C;StreetNo></td><td>Street address.</td></tr><tr><td>[1..1]</td><td>++++CityCounty</td><td>&#x3C;CityCounty></td><td>City, county.</td></tr><tr><td>[1..1]</td><td>++Status</td><td>&#x3C;Status></td><td>Status of Virtual IBAN: 'ACTIVE', 'ON_HOLD', 'PENDING', 'REJECTED', 'BLOCKED' or 'CLOSED'.</td></tr><tr><td>[0..1]</td><td>++DateActivated</td><td>&#x3C;DateActivated></td><td>Optional. Added if Virtual IBAN has been in activated.</td></tr><tr><td>[0..1]</td><td>++DateClosed</td><td>&#x3C;DateClosed></td><td>Optional. Added if Virtual IBAN has beel closed.</td></tr></tbody></table>

#### Samples

{% tabs %}
{% tab title="Private person" %}

```xml
<?xml version="1.0" encoding="UTF-8"?>
<VibanInfoResponse>
  <ClientReference>12345678</ClientReference>
  <VirtualIBAN>GB88LHVB01020000000002</VirtualIBAN>
  <User>
  	<Person>
  	  <Name>Donald Duck</Name>
  	  <BirthDate>1908-11-29</BirthDate>
  	  <BirthCountry>DE</BirthCountry>
  	  <Residency>DE</Residency>
  	  <DocumentNumber>A942819</DocumentNumber>
  	</Person>
  	<Address>
  		<Country>GB</Country>
  		<StreetNo>88 High Holborn</StreetNo>
  		<CityCounty>London</CityCounty>
  	</Address>
  </User>
  <Status>ACTIVE</Status>
  <!--Optional:-->
  <DateActivated>2018-01-01+02:00</DateActivated>
  <!--Optional:-->
  <DateClosed>2018-05-22+03:00</DateClosed>
</VibanInfoResponse>
```

{% endtab %}

{% tab title="Legal person" %}

```xml
<?xml version="1.0" encoding="UTF-8"?>
<VibanInfoResponse>
  <ClientReference>12345678</ClientReference>
  <VirtualIBAN>GB88LHVB01020000000002</VirtualIBAN>
  <User>
  	<Company>
  		<Name>UK Ltd Version 2.0</Name>
  		<CountryOfOrigin>GB</CountryOfOrigin>
  		<TaxResidency>GB</TaxResidency>
  		<RegistrationNumber>1849203</RegistrationNumber>
  		<Representative>
  			<Name>Harry Potter</Name>
  			<BirthDate>2001-01-01</BirthDate>
  			<Residency>GB</Residency>
  		</Representative>
  	</Company>
  	<Address>
  		<Country>GB</Country>
  		<StreetNo>Waterloo Bridge 13</StreetNo>
  		<CityCounty>London, Cold</CityCounty>
  	</Address>
  </User>
  <Status>ACTIVE</Status>
  <!--Optional:-->
  <DateActivated>2018-01-01+02:00</DateActivated>
  <!--Optional:-->
  <DateClosed>2018-05-22+03:00</DateClosed>
</VibanInfoResponse>
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.lhv.com/home/connect/services/viban/open-a-viban-1-3.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
