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)
getBacsDetails returns details or information use specifically for BACS electronic payments. The function can be used to determine that
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:
TODDASO flag: Disallowed transactions code. Specifies that the bank
office cannot accept a particular transaction
type:
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
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
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;
// Define strings for the keycode and the sort code get BACS
details for.
// Set up a web service object
// make the call to the Validate getBacsDetails
method
// now we have an object 'bacsObject' containing all of
the
using System.Text;
namespace
getBacsDetails
{
class Program
{
static void
Main(string[]
args)
{
string keycode = "qwerty";
string sortcode = "404113";
validate.validate wsObject = new validate.validate();
validate.bacs
bacsObject = wsObject.getBacsDetails(keycode, sortcode);
//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 .
Dim wsobject
As New
validate.validate()
Visual Basic.net Example 1
Dim bicObject As validate.Bic
bicObject =
wsobject.validateBic("qwerty", "MIDLGB2113C")
Visual Basic.net Example 2 Module Module1Sub 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)
{
java.lang.String keyCode = "qwerty"
;
validate.Bacs result = port.getBacsDetails(keyCode,
sortcode); }
validate.Validate service =
new
validate.Validate();
validate.ValidateSoap port = service.getValidateSoap12();
java.lang.String sortcode
= "404113" ;
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"?>
XML Response
Below is a typical XML message response from using getBacsDetails().
<?xml version="1.0" encoding="utf-8"?>
![]() |
©Copyright 2023 Paygate Solutions Limited |