Derives the coresponding Bank Identification Code (BIC) from an IBAN .
Sometime you may have an IBAN and wish to know the corresponding BIC since electronic payment systems mostly require both the IBAN and BIC for the payment to proceed.
Syntax:
deriveBic (string keycode, string bic, string iban)
Returned
data
An object bic containing
the following fields:
Object |
Explanation |
bicCode |
The BIC code part of the
derived BIC. |
branchCode |
The branch code part of
the derived BIC |
bicFull |
The full derived
BIC. |
validity |
The submitted IBAN is
validated before an attempt is made to derive the corresponding BIC. This field shows the validation
status of the IBAN – Valid or Invalid. |
institutionName |
The name of the
financial institution corresponding to the derived
BIC. |
city |
The city of the
financial institution corresponding to the derived
BIC |
branchInformation |
Extra information about
the branch of the financial institution corresponding to the derived
BIC. |
routingBicCode |
ROUTING BIC CODE is the
routing or processing BIC to which the Euro payment should be
sent. |
routingBranchCode |
Branch code (XXX for
main office) associated to ROUTING BIC CODE |
address1 |
Address Line 1 of the
financial institution corresponding to the derived
BIC. |
address2 |
Address Line 2 of
the financial institution corresponding to the derived
BIC. |
address3 |
Address Line 3 of
the financial institution corresponding to the derived
BIC. |
address4 |
Address Line 4 of
the financial institution corresponding to the derived
BIC. |
zipCode |
Zipcode / Postcode of the
financial institution corresponding to the derived
BIC. |
countryName |
Country of the financial
institution corresponding to the derived
BIC. |
parentBankCode |
Bank code of the parent
BIC |
countryCode |
ISO country code of the
Financial Institution |
errorCode |
Error code of any
returning error. |
errorText |
Textual description of
any returning errors. |
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 deriveBic 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.Bic bicObject =
wsObject.deriveBic("qwerty", "BG80BNBG96611020345678");
c# Example 2 using System;
validate.validate wsObject = new validate.validate();
Console.WriteLine(bicObject.bicFull);
using System.Collections.Generic;
using System.Text;
namespace deriveBic
{
class Program
{
static void Main(string[] args)
{
string keyCode =
"qwerty";
string iban =
"BG80BNBG96611020345678";
validate.Bic bicObject =
wsObject.deriveBic(keyCode, iban);
Console.WriteLine(bicObject.errorCode);
Console.WriteLine(bicObject.errorText);
Console.ReadLine();
}
}
}
Visual Basic .net
The following sample show how to use the deriveBic 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.deriveBic("qwerty", "BG80BNBG96611020345678")
Visual Basic.net Example 2 Module Module1Sub Main() ' define the keycode and iban to use to derive the bic, both as strings. Dim keycode As String = "qwerty" Dim iban As String = "BG80BNBG96611020345678" ' Create a web service object Dim wsobject As New validate.validate() ' create a bic object for the returning data Dim bicObject As validate.Bic ' Call the web service function - deriveBic bicObject = wsobject.deriveBic(keycode, iban) ' display the derived bic or the error message Console.WriteLine(bicObject.bicFull) 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 derivebic;
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 iban = "BG80BNBG96611020345678" ; validate.Bic result = port.deriveBic(keyCode, iban);
System.out.println( "BIC = " +result.getBicFull());
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"?>Below is a typical XML message response
<?
xml version="1.0" encoding="utf-8"?>
URL Encoding
Below is an example of using deriveBic via a URL encoded GET request:
serviceUrl/derivebic2.aspx?keycode=qwerty&iban=BG80BNBG96611020345678