ibanPaperFormat
 
SOAP API > Validating Payments > IBAN >
ibanPaperFormat

 

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


Paper Format:       GB29 NWBK 6016 1331 9268 19

 

 


 

 

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 System;
using
System.Collections.Generic;
using
System.Text;
namespace
ibanPaperFormat
  {
  class
Program
  {
    static void Main(string
[] args)
    {
      string keycode = "qwerty"
;
      string iban = "GB29NWBK60161331926819"
;

      validate.validate wsObject = new validate.validate();
      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 .

 Visual Basic.net Example 1

    Dim wsobject As New validate.validate()
    Dim pibanObject As validate.pIban
    pibanObject = wsobject.ibanPaperFormat("qwerty""ES9121000418450200051332")

 

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 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) {
       
        validate.Validate service = new validate.Validate();
        validate.ValidateSoap port = service.getValidateSoap12();

        java.lang.String keyCode = "qwerty" ;
        java.lang.String iban = "ES9121000418450200051332" ;

        validate.PIban result = port.ibanPaperFormat(keyCode,  iban);
        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"?>
<
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:ibanPaperFormat>
      <tns:keyCode>qwerty</tns:keyCode>
      <tns:iban>ES9121000418450200051332</tns:iban>
    </tns:ibanPaperFormat>
  </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>
    <ibanPaperFormatResponse xmlns="http://vtest.bemac.com/">
      <ibanPaperFormatResult>
        <iban>ES9121000418450200051332</iban>
        <paperIban>ES91 2100 0418 4502 0005 1332</paperIban>
        <paperIbanFormal>IBAN: ES91 2100 0418 4502 0005 1332</paperIbanFormal>
      </ibanPaperFormatResult>
    </ibanPaperFormatResponse>
  </soap:Body>
</
soap:Envelope>


 


 

 ©Copyright 2023 Paygate Solutions Limited