Validation service

You use the validation service to validate supplied account details. You must supply either the BBAN or the IBAN. If the IBAN is supplied it is decomposed to form the BBAN before the verification is performed. You must also specify the check context, (DD for a Direct Debit check, or DC for a Direct Credit check).

This example code validates the account details. It does not return the sub branch, SWIFT, SEPA or additional information for the account.

DataValidationRequest DataRequest = new DataValidationRequest();

DataRequest.setClientInformation(clientInformation);

ClientElement clientDetails = new ClientElement();

/* Set the client details for this call */

clientDetails.setBranchNumber(new BigInteger("111"));

clientDetails.setClientIPAddress("120.128.0.0");

clientDetails.setClientMACAddress("1010101023456703");

DataRequest.setClientDetails(clientDetails);

/*

Set the service details, which are country, language for the returned messages, check type (validate), and context (Direct Credit or Direct Debit)

*/

serviceDetails serviceDetails = new ServiceDetails();

serviceDetails.setLanguageCountryCode("GB");

serviceDetails.setISOCountryCode("GB");

serviceDetails.setCheckType(CheckTypeElement.VALIDATE);

serviceDetails.setContextCheck(ContextCheckElement.DC);

 

DataRequest.setServerDetails(serviceDetails);

BankDetailsTag bankDetails = new BankDetailsTag();

/* Sending BBAN */

bankDetails.setBBANparam1("938611");

bankDetails.setBBANparam2("02149187");

/* Specify what additional information should be returned */

bankDetails.setSubBranches(OptionalItem.NO);

bankDetails.setAdditonalinfo(OptionalItem.NO);

bankDetails.setSWIFTData(OptionalItem.NO);

 

DataRequest.setBankDetails(bankDetails);

 

if (DataResponse != null) {

/* If the call was successful, display a successful message */

System.out.println("DataResponse Data retrieved");

} else {

/* If the call was not successful, display an error message */

System.out.println("NO DataResponse Data retrieved");

}

Example SOAP messages