createIban

 

Verifies that an IBAN is valid, decomposes the IBAN and returns useful information such as bank/branch information and BIC..

 

 

Syntax:

createIban (string keycode , string field1,string field2,string field3,string field4,string countryCode,)

 

Syntax For UK Accounts:

createIban (string keycode , string sortcode,string accountNumber, "", "", "GB")

 

 


 

Supported Country Codes

 

United Kingdom                               GB

 

 

 

 


 

Returned data


An object (createiban) containing the following fields:

 

 

 Name  Description
   iban  The created iban in electronic format.
 paperiban  The created iban in paper format.
 bankid  The bank identification code
 branchid  The branch identification code
 branchname  The branch name of the issuing bank
 accountnum  The original account number
 checkdigit  Any domestic checkdigits embedded in the domestic account number
 bic  The BIC matching the IBAN
 bban  The bban (Basic Bank Account Number) embedded in the IBAN
 country  The country of the issuing bank
 address1  Address line 1 of the issuing branch
 address2  Address line 2 of the issuing branch
 address3  Address line 3 of the issuing branch
 address4  Address line 4 of the issuing branch
 postcode  The postcode / zipcode of the issuing branch
 tel1  Telephone number 1 of the issuing branch
 tel2  Telephone number 2 of the issuing branch
 city  The City of the issuing branch
 countryspec1  Reserved
 countryspec2  Reserved
 errorCode  If an error occurs during processing the error number will be here. See the error section for more details.
 errorText  If an error occurs during processing the error textually description will be here. See the error section for more details.
   

 

 


 

Supported Versions

Validate Web Service Version 1.x


Errors

1400 Incorrect IBAN Check Digits
1401 Incorrect IBAN Format
1402 Caution - IBAN is correct but no bank or branch was not found.
1403 Incorrect IBAN Length
1404 Unknown Country with country ID: xx
1405 Domestic Account Number is invalid


Example Code

c#
The following sample show how to use the createIban function using c#.
As with all examples, please see the section Adding a reference to the Validate Web Service .

c# Example 1

 validate.validate wsObject = new validate.validate();
 validate.
createiban ibanObject = wsObject.createIban("qwerty", "404113", "12345678", "", ""
, "GB");

 

c# Example 2

using System;
using
System.Collections.Generic;
using
System.Text;
namespace
createIban
{
  class
Program
  {
    static void Main(string
[] args)
    {
      string keyCode = "qwerty"
;
      string sortCode = "404113"
;
      string accountNumber = "12345678"
;
      string countryCode = "GB"
;

      validate. validate wsObject = new validate.validate();
      validate.
createiban ibanObject = wsObject.createIban(keyCode, sortCode, accountNumber, "", ""
, countryCode);

      Console.WriteLine(ibanObject.iban);
      Console
.WriteLine(ibanObject.errorCode);
      Console
.WriteLine(ibanObject.errorText);
      Console
.ReadLine();
    }
  }
}

 

Visual Basic .net
The following sample show how to use the createIban function using Visual Basic.net.
As with all examples, please see the section Adding a reference to the Validate Web Service .

 Visual Basic.net Example 1

   Dim wsobject As New validate.validate()
   Dim ibanObject As validate.createiban
   ibanObject = wsobject.createIban("qwerty", "404113", "12345678", "", "", "GB")

 

Visual Basic.net Example 2

Module Module1
  Sub
Main()

    ' define the keycode and iban to validate, both as strings.
    Dim keycode As String =
"qwerty"
    Dim sortCode As String =
"404113"
    Dim accountNumber As String =
"12345678"
    Dim countryCode = "GB"

    ' Create a web service object
    Dim wsobject As New
validate.validate()

    ' create a iban object for the returning data
    Dim ibanObject As
validate.createiban

    ' Call the web service function - validateIban
    ibanObject = wsobject.createIban(keycode, sortCode, accountNumber, "", ""
, countryCode)

    ' display the validity and institution address - or error message
    Console.WriteLine(ibanObject.iban)
    Console.WriteLine(ibanObject.errorCode)
    Console.WriteLine(ibanObject.errorText)
    Console.ReadLine()

  End Sub
End
Module

 

Java
The following sample show how to use the createIBAN using Java.

Java Example 1

package createiban;

public class Main {

    public static void main(String[] args) {

        validate.Validate service = new validate.Validate();
        validate.ValidateSoap port = service.getValidateSoap12();

        java.lang.String keyCode = "qwerty" ;
        java.lang.String sortCode = "404113" ;
        java.lang.String accountNumber = "12345678" ;
        java.lang.String countryCode = "GB" ;

        validate.Criban result = port.createIban(keyCode, sortCode,accountNumber,"","",countryCode);
        System.out.println( "IBAN: " +result.getIban());
        System.out.println( "Error Code = " +result.getErrorCode());
        System.out.println( "Error Message = " +result.getErrorText()); 
        
    }

}

 


XML Messages

Below is a typical XML message request

<?xml version="1.0" encoding="utf-8"?>
<
soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://vtest.bemac.com/">
  <soap:Body>
    <tns:createIban>
      <tns:keyCode>qwerty</tns:keyCode>
      <tns:field1>404113</tns:field1>
      <tns:field2>12345678</tns:field2>
      <tns:field3/>
      <tns:field4/>
      <tns:country>GB</tns:country>
    </tns:createIban>
  </soap:Body>
</
soap:Envelope>

 

Below is a typical XML message response

<?xml version="1.0" encoding="utf-8"?>
<
soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <soap:Body>
    <createIbanResponse xmlns="http://vtest.bemac.com/">
      <createIbanResult>
        <iban>GB23MIDL40411312345678</iban>
        <paperiban>GB23 MIDL 4041 1312 3456 78</paperiban>
        <bankname>HSBC BANK PLC</bankname>
        <bic>MIDLGB2113C</bic>
        <address1>17, CHURCH STREET</address1>
        <address2 />
        <address3 />
        <address4 />
        <postcode>S1 1HH</postcode>
        <tel1 />
        <tel2 />
        <city>SHEFFIELD</city>
      </createIbanResult>
    </createIbanResponse>
  </soap:Body>
</
soap:Envelope>

 


URL Encoding 

Below is an example of using createIban via a URL encoded GET request

   serviceUrl.asmx/criban2.aspx?keycode=qwerty&field1=404113&field2=12345678&countrycode=GB