Converts an IBAN in electronic format to paper
format.
Syntax:
validateIban (string keycode , string iban )
Notes
IBANs are large alphanumeric strings
and it is advised to always use the IBAN paper format when displaying an IBAN
that will be read by humans.
The IBAN paper format simply adds a
space every forth character in the IBAN effectively splitting the IBAN into
chunks of four characters.
Conversely, when the IBAN will be read by a
computer, you should always use the electronic version - although the Validate
API can handle either format.
Electronic Format GB29NWBK60161331926819
Returned
data
An object [pIban
]
containing the following fields:
Name | Description |
iban |
The originally submitted IBAN. |
paperIban |
The paper format version of the
IBAN |
paperIbanFormal |
The formal paper format version of the IBAN (Adds
IBAN: prefix) |
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
Example
Code
c#
The following sample show how to use the ibanPaperFormat 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
iban = "GB29NWBK60161331926819";
validate.validate wsObject = new
validate.validate();
validate.pIban pIbanObject = wsObject.ibanPaperFormat(keycode,
iban);< /FONT >
c# Example 2 using
validate.
using
System.Collections.Generic;
using System.Text;
namespace
ibanPaperFormat
{
class Program
{
static
void
Main(string[]
args)
{
string
keycode = "qwerty";
string iban = "GB29NWBK60161331926819";
validate.pIban pIbanObject =
wsObject.ibanPaperFormat(keycode,
iban);< /FONT >
Console.WriteLine("Electronic Format:\t" +
pIbanObject.iban);
Console.WriteLine("Paper
Format:\t\t" + pIbanObject.paperIban);
Console.WriteLine(pIbanObject.errorCode);
Console.WriteLine(pIbanObject.errorText);
Console.ReadLine();
}
}
}
Visual Basic .net
The following sample show how to use the ibanPaperFormat function
using Visual Basic.net.
As with all examples,
please see the section Adding a reference to the
Validate Web Service .
Dim wsobject As New
validate.validate()
Visual Basic.net Example 1
Dim pibanObject As validate.pIban
pibanObject =
wsobject.ibanPaperFormat("qwerty""ES9121000418450200051332")
Visual Basic.net Example 2 Module Module1Sub Main() ' define the keycode and iban to validate, both as strings. Dim keycode As String = "qwerty" Dim iban As String = "ES9121000418450200051332" ' Create a web service object Dim wsobject As New validate.validate() ' create a iban object for the returning data Dim pibanObject As validate.pIban ' Call the web service function - validateIban pibanObject = wsobject.ibanPaperFormat(keycode, iban) ' display the validity and institution address - or error message Console.WriteLine("Electronic Format: " & vbTab & pibanObject.iban) Console.WriteLine("Paper Format: " & vbTab & vbTab & pibanObject.paperIban) Console.WriteLine(pibanObject.errorCode) Console.WriteLine(pibanObject.errorText) Console.ReadLine() End Sub End Module |
Java
The following sample show
how to use the ibanPaperFormat using Java.
Java Example
1 package ibanpaperformat; public
class Main { public static void main(String[] args)
{ java.lang.String keyCode
= "qwerty"
; validate.PIban result =
port.ibanPaperFormat(keyCode,
iban); }
validate.Validate service =
new
validate.Validate();
validate.ValidateSoap port =
service.getValidateSoap12();
java.lang.String iban =
"ES9121000418450200051332"
;
System.out.println( "IBAN Paper format:
"
+result.getPaperIban());
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"?>
![]() |
©Copyright 2023 Paygate Solutions Limited |