getBacsDetails
 
SOAP API > Validating Payments > Bank Account Numbers > United Kingdom Functions >

getBacsDetails


A United Kingdom specific function that returns information specific to the BACS service for a given bank branch.

Syntax:

getBacsDetails(string keycode, string sortcode)


 Notes:

getBacsDetails returns details or information use specifically for BACS electronic payments.  The function can be used to determine that

  • The branch is a full BACS scheme member or a sponsored institution or not able to process BACS payments
  • The branch can handle Electronic Direct Debit Instrutions (DDI)
  • The branch can accept credits, debits
  • Details of any disallowed transactions.types.
  • Redirection sort codes. The sort codes that the payment needs to be directed to if the branch is unable to handles BACS payments directly.

This function is normally used in conjunction with validateAccount().  First  use validateAccount to ensure the account number and sort code are valid and then use getBacsDetails to return BACS specific information.


Returned data

An object bacs containing the following:

 

 Name  Description
 bacsStatus Bacs service status:

M – Bank office of a Bacs scheme member; accepts Bacs payments
A – Bank office of a sponsored institution in Bacs; accepts Bacs payments
N – Bank office does not participate in Bacs; does not accept Bacs payments.
 Toddaso4

TODDASO flag:

Y – Bank office accepts electronic TODDASO output
N – Bank office does not accept electronic TODDASO output
null – Bank office does not participate in Bacs.

 bacsDateLastChanged The date that the details of the bank office’s participation in the Bacs clearing was amended. (NoteClosure of the Bacs service is not considered an amendment for the purpose of this field.)
 DateClosed The is the date from which the bank office will no longer participate in the Bacs service.
 RedirectionFromFlag If R, the bank office is set as the redirection sorting code of another bank office(s).
 RedirectionToSortCode If the output from the Bacs service for this bank office is to be redirected, will contain the sorting code to which payments are redirected.
 SettlementBank The bank code of the Bacs scheme member that settles the output from the Bacs clearing for this bank office.
 SettlementSection Data used for Bacs output and settlement.
 SettlementSubSection Data used for Bacs output and settlement.
 HandlingBank The bank code of the Bacs scheme member that handles the output from the Bacs clearing for this bank office.
 HandlingBankStream Data used for Bacs output.
 AccountNumbersFlag Account numbered flag:

Y Bank office has transferable account numbers On redirection due to branch closure the account number is not zeroised.
N Bank office does not transferable account numbers On redirection due to branch closure the account number is zeroised.
 DDIVoucherFlag Direct Debit Instruction (DDI) voucher flag:

Y – Bank office cannot accept output of electronic DDIs; requires printed vouchers
N – Bank office can accept output of electronic DDIs; does not require printed vouchers.
 TransactionGroupCode

Disallowed transactions code. Specifies that the bank office cannot accept a particular transaction type:

DR – Direct Debits (transaction codes 01, 17, 18, 19)
CR – credits (99)
CU – claims for unpaid cheques (13)
BS – interest payments (Z4)
DV – dividend payments (Z5)
AU – Direct Debit Instructions (0N, 0C, 0S).

 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 getBacsDetails 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 sortcode = "404113";
 validate.validate wsObject = new validate.validate();
 validate.
bacs bacsObject = wsObject.getBacsDetails(keycode, sortcode);< /FONT >

 

c# Example 2

using System.Collections.Generic;
using System.Text;
namespace getBacsDetails
{
    class Program
    {
        static void Main(string[] args)
        {

            // Define strings for the keycode and the sort code get BACS details for.
            string keycode = "qwerty";
            string sortcode = "404113";

            // Set up a web service object
            validate.validate wsObject = new validate.validate();

            // make the call to the Validate getBacsDetails method
            validate.bacs bacsObject = wsObject.getBacsDetails(keycode, sortcode);

            // now we have an object 'bacsObject' containing all of the 
            //BACS information for the branch with sort code 404113
           
Console.WriteLine(bacsObject.bacsStatus);
            Console.WriteLine(bacsObject.DDIVoucherFlag);
            Console.WriteLine(bacsObject.errorCode);
            Console.WriteLine(bacsObject.errorText);
            Console.ReadLine();
        }
    }
}

 

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

 

Visual Basic.net Example 2

Module Module1
  Sub Main()

    ' define the keycode and sortcode
    Dim keycode As String = "qwerty"
    Dim sortcode As String = "404113"

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

    ' create a bacs object for the returning data
    Dim bacsObject As validate.bacs

    ' Call the web service function - getBacsDetails
    bacsObject = wsobject.getBacsDetails(keycode, sortcode)

    ' display the returned information - or error message
    Console.WriteLine("Bacs Status: " & bacsObject.bacsStatus)
    Console.WriteLine(
"Bacs DDI Flag: " & bacsObject.DDIVoucherFlag)
    Console.WriteLine(bacsObject.errorCode)
    Console.WriteLine(bacsObject.errorText)
    Console.ReadLine()

  End Sub
End
Module

 

Java
The following sample show how to use the getBacsDetails function using Java.

Java Example

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" ;

        validate.Bacs result = port.getBacsDetails(keyCode, sortcode);
        System.out.println( "Result = " +result.getBacsStatus());
        System.out.println( "DDI Voucher Flag = " +result.getDDIVoucherFlag());
        System.out.println( "Error Code = " +result.getErrorCode());
        System.out.println( "Error Message = " +result.getErrorText());
       
    }

}


XML 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:getBacsDetails>
      <tns:keyCode>qwerty</tns:keyCode>
      <tns:sortcode>404113</tns:sortcode>
    </tns:getBacsDetails>
  </soap:Body>
</soap:Envelope>

 

XML Response

Below is a typical XML message response from using getBacsDetails(). 

<?xml version="1.0" encoding="utf-8"?>
<bacs xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://vtest.bemac.com/">
  <bacsStatus>M</bacsStatus>
  <Toddaso4/>
  <bacsDateLastChanged>06/06/2005</bacsDateLastChanged>
  <SettlementBank>0005</SettlementBank>
  <SettlementSection>01</SettlementSection>
  <SettlementSubSection>36</SettlementSubSection>
  <HandlingBank>0005</HandlingBank>
  <HandlingBankStream>01</HandlingBankStream>
  <AccountNumbersFlag>Y</AccountNumbersFlag>
  <DDIVoucherFlag>N</DDIVoucherFlag>
</
bacs>

 

 


 


 

 ©Copyright 2023 Paygate Solutions Limited