# VIBAN Open

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

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

Service is used to request new Virtual IBAN opening. Only one Virtual IBAN can be opened with one service request.\
It is mandatory to fill in minimal data set about Virtual IBAN owner and request message structure is slightly different for private and legal persons.\
After receiving the request, background check is done by LHV for Virtual IBAN owner (the check is done in less than a second).

* If check is OK, then Virtual IBAN is activated at once.
* If check is not OK, then Virtual IBAN will remain in status ON\_HOLD until decision about Virtual IBAN opening is made. CONNECT customer will be informed about the decision (status ACTIVE or REJECTED) via service *Status notification*.

#### **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%2FSv1E06dG6OZbOBScKpO1%2Fviban.open.request.xsd.xml?alt=media&token=4f72c389-e1e3-4910-a4d1-dc5baa2d6ef6>" %}
XML schema
{% endfile %}

XML structure description:

<table><thead><tr><th width="133">MULT.</th><th width="187">MESSAGE ELEMENT</th><th>XML TAG</th><th>Description</th></tr></thead><tbody><tr><td>[1..1]</td><td>+MessageRoot</td><td>&#x3C;VibanOpenRequest></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>[0..1]</td><td>++ClientReference</td><td>&#x3C;ClientReference></td><td>Customer reference defined by Payment Service Provider. Can be used to avoid opening duplicate VIBANs.</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>Address of virtual IBAN use</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></tbody></table>

#### Samples

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

```xml
<?xml version="1.0" encoding="UTF-8"?>
<VibanOpenRequest>
  <MasterAccount>GB88LHVB01020000000001</MasterAccount>
  <ClientReference>12345678</ClientReference>
  <User>
    <Person>
      <Name>Donald Duck</Name>
      <BirthDate>1988-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>
</VibanOpenRequest>
```

{% endtab %}

{% tab title="Legal person" %}

```xml
<?xml version="1.0" encoding="UTF-8"?>
<VibanOpenRequest>
  <MasterAccount>GB88LHVB01020000000001</MasterAccount>
  <ClientReference>12345678</ClientReference>
  <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>
</VibanOpenRequest>
```

{% endtab %}
{% endtabs %}

### **Response**

**Headers**

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

#### Body

{% 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\_OPEN
{% endhint %}

#### Body

{% file src="<https://2266620947-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHGywduAxJuxV3reZhASh%2Fuploads%2FXrfEFIiCSdFJfDTr5KcP%2Fviban.open.response.xsd.xml?alt=media&token=a2abf573-d231-4a39-a541-6482810d6346>" %}
XML schema
{% endfile %}

<table><thead><tr><th width="126">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;VibanOpenResponse></td><td></td></tr><tr><td>[1..1]</td><td>++MasterAccount</td><td>&#x3C;MasterAccount></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>Virtual IBAN that was generated.</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' or 'ON_HOLD'.</td></tr></tbody></table>

#### Samples

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

```xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<VibanOpenResponse>
    <MasterAccount>GB88LHVB01020000000001</MasterAccount>
    <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>
</VibanOpenResponse>
```

{% endtab %}

{% tab title="Legal person" %}

```xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<VibanOpenResponse>
    <MasterAccount>GB88LHVB01020000000001</MasterAccount>
    <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>
</VibanOpenResponse>
```

{% endtab %}
{% endtabs %}
