validateBic

 

Validates a Bank Identification Code (BIC ).

 

 

Syntax:

validateBic (string keycode, string bic)

 


 

Returned data

An object Bic  containing the following fields:

 

 

 Name Description
 bicCode  The first 8 characters of the BIC.
 branchCode  The branch section of the BIC.  The last 3 characters of an 11 digit BIC. XXX signified a Primary Office.
 bicFull The full BIC used in the original command. The BIC will have been formatted correctly is valid. 
 validity String ‘Valid’ if the BICis valid.

String ‘Invalid’ if the BIC is not valid. 

A Valid BIC is defined as a BIC that resolved to a real Bank branch office.

 institutionName  The name of the Financial Institution that the BIC belongs to.
 city  The city in which the branch signified by the BIC is in.
 branchInformation  Extra information about the branch.
   
 
 routingBicCode

 If applicable, this is the first 8 characters of the routing BIC.  ROUTING BIC CODE is the routing or processing BIC to which the Euro payment should be sent.

 routingBranchCode;  If applicable, this is the last 3 characters of the routing BIC. ROUTING BIC CODE is the routing or processing BIC to which the Euro payment should be sent.
   
 countryCode  ISO country code of the Financial Institution
 chipsUid  Chips {Clearing House Interbank Payments System} Universal ID for the financial institution
 subtypeIndicator   Type of financial institution. For example: a bank or a broker.
 serviceCodes

 Service codes: value added services that the financial institution has subscribed to.

Use the resolveServiceCode() and resolveSingleServiceCode() function to determine the meaning of the codes returned here.

 branchQualifier

 Extra information about the branch.

Use the functions resolveBranchQualifier() and resolveSingleBranchQualifier() to determine the meaning of the codes returned here.

 
 address1  Address line 1 of the Branch Office. 
 address2  Address line 2 of the Branch Office. 
 address3  Address line 3 of the Branch Office. 
 address4  Address line 4 of the Branch Office. 
 zipCode  Address zipcode (Postcode) of the Branch Office. 
 location;  Where possible, the location field is formatted to show the following logical groups of information, in this sequence: "Suburb, City, Region, State".
 countryName  Country name
 pobNumber  The Post Office Box number if applicable
 pobZipCode  The Post Office Box zip (post) code if applicable
 pobLocation  The Post Office Box location if applicable
 pobCountryName  The Post Office Box country name if applicable
 nationalIdExpiryDate  Reserved
 updateDate  The date on which a record was last updated
 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

1300          Incorrect number of digits in supplied BIC.  Should be either 8  or 11 digits.


Example Code

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

c# Example 1

    string keycode = "qwerty";
    string bic = "MIDLGB2113C";
    validate.validate wsObject = new validate.validate();
    validate.Bic bicObject = wsObject.validateBic(keycode, bic);

 

c# Example 2

using System;
using
System.Collections.Generic;
using System.Text;

namespace
ConsoleApplication1
{
 class
Program
 {
     static void Main(string
[] args)
     {
          string keycode = "qwerty"
;
         
string bic = "MIDLGB2113C"
;
          validate.
validate wsObject = new validate.validate
();
          validate.
Bic
bicObject = wsObject.validateBic(keycode, bic);

         
Console.WriteLine(bicObject.validity);
         
Console
.WriteLine(bicObject.errorCode);
         
Console
.WriteLine(bicObject.errorText);
         
Console
.ReadLine();
     }
  }
}

 

Visual Basic .net
The following sample show how to use the validateBic function using Visual Basic.net.
As wilth 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 bicObject As validate.Bic
      bicObject = wsobject.validateBic("qwerty", "MIDLGB2113C")

 

Visual Basic.net Example 2

Module Module1

      Sub Main()

            ' define the keycode and bic to validate, both as strings.
            Dim keycode As String =
"qwerty"
            Dim theBic As String = "MIDLGB2113C"

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

            ' create a bicObject for the returning data
            Dim bicObject As
validate.Bic

            ' Call the web service function - validateBic
            bicObject = wsobject.validateBic(keycode, theBic)

            ' display the validity or error message
            Console.WriteLine(bicObject.validity)
            Console.WriteLine(bicObject.errorCode)
            Console.WriteLine(bicObject.errorText)
            Console.ReadLine()

      End Sub

End Module

 

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

Java Example 1

package validatebic;

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 bic = "MIDLGB2113C" ;

        validate.Bic result = port.validateBic(keyCode, bic);
        System.out.println( "Result = " +result.getValidity());
        System.out.println( "Institution Name = " +result.getInstitutionName());
        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:validateBic>
      <tns:keycode>qwerty</tns:keycode>
      <tns:bic>MIDLGB2113C</tns:bic>
    </tns:validateBic>
  </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>
    <validateBicResponse xmlns="http://vtest.bemac.com/">
      <validateBicResult>
        <bicCode>MIDLGB21</bicCode>
        <branchCode>13C</branchCode>
        <bicFull>MIDLGB2113C</bicFull>
        <validity>Valid</validity>
        <institutionName>HSBC BANK PLC</institutionName>
        <city>SHEFFIELD</city>
        <branchInformation>(SHEFFIELD, CHURCH STREET)</branchInformation>
        <ibanBranchCode>13C</ibanBranchCode>
        <routingBicCode />
        <routingBranchCode />
        <parentBankCode>MIDL</parentBankCode>
        <chipsUid />
        <subtypeIndicator>NSWB</subtypeIndicator>
        <serviceCodes>CHP CHP</serviceCodes>
        <branchQualifier>BRA</branchQualifier>
        <address1>17, CHURCH STREET</address1>
        <address2 />
        <address3 />
        <address4 />
        <zipCode>S1 1HH</zipCode>
        <location>SHEFFIELD</location>
        <countryName>UNITED KINGDOM</countryName>
        <pobNumber />
        <pobZipCode />
        <pobLocation />
        <pobCountryName />
      </validateBicResult>
    </validateBicResponse>
  </soap:Body>
</
soap:Envelope>


URL Encoding

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

serviceUrl.asmx/bic2.aspx?keycode=qwerty&bic=MIDLGB2113C