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

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

Syntax:

getCccDetails(string keycode, string sortcode)


 Notes:

getCccDetails returns details or information use specifically for the C&CC Service. The function can be used to determine that

  • The branch is a C&CC scheme member, a full agency, a debit agency or does not participate in C&CC; does not accept C&CC payments.
  • The bank ID of the settlement bank
  • The Debit Agency Sortcode, if applicable

 

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 getCccDetails to return C&CC specific information.


Returned data

An object ccc containing the following:

 

 Name  Description
 cccStatus C&CC service status:

M – Owning bank of bank office is a C&CC scheme member
F – Bank office is a full agency
D – Bank office is a debit agency
N – Bank office does not participate in C&CC; does not accept C&CC payments.

cccDateLastChanged

The date that the details of the bank office’s participation in C&CC was amended. (Note: Removal of the bank office’s participation in C&CC is not considered an amendment for the purpose of this field.)

cccDateClosed

The date from which the bank office will no longer participate in the C&CC service.

cccSettlementBank

The bank code of the C&CC scheme member that settles the output from C&CC for this bank office.

cccDebitAgencySortCode

If C&CC service status is D, this is the sorting code of the bank office that handles the cheque clearing for this bank office.

cccReturnIndicator

If R, the bank office is the office to which C&CC returns should be sent.

cccGBNIndicator

The Great Britain/Northern Ireland indicator. NI indicates the bank office participates in the Northern Ireland C&CC; otherwise GB.

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 getCccDetails function using c#.
As with all examples, please see the section Adding a reference to the Validate Web Service .

 

c# Example 1

using System;
using
System.Collections.Generic;
using
System.Text;
namespace
getCccDetails
{
  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 getChapsEDetails method
      validate.chapse
cccObject = wsObject.getCccDetails(keycode, sortcode);

      // now we have an object 'chapsEObject' containing all of the 
      // Chaps Euro information for the branch with sort code 404113
      Console
.WriteLine(cccObject.cccStatus);
      Console
.WriteLine(cccObject.cccSettlementBank);
      Console
.WriteLine(cccObject.errorCode);
      Console
.WriteLine(cccObject.errorText);
      Console
.ReadLine();
    }
  }
}

 

Visual Basic .net
The following sample show how to use the getCccDetails 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

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 chaps object for the returning data
    Dim cccObject As validate.chapse

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

    ' display the returned information - or error message
    Console.WriteLine( "CC&C Status: " & cccObject.cccStatus)
    Console.WriteLine(
"CC&C Settlement Bank " & cccObject.cccSettlementBank )
    Console.WriteLine(cccObject.errorCode)
    Console.WriteLine(cccObject.errorText)
    Console.ReadLine()

  End Sub
End
Module

 

Java
The following sample show how to use the getCccDetails function using Java

Java

package getcccdetails;
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.ccc result = port.getCccDetails(keyCode, sortcode);
        System.out.println( "Status = " +result.getCccStatus());
        System.out.println( "Settkement Bank = " +result.
cccSettlementBank ());
        System.out.println( "Error Code = " +result.getErrorCode());
        System.out.println( "Error Message = " +result.getErrorText());
    }

}

 


 


 

 ©Copyright 2023 Paygate Solutions Limited