Check digit verification (CDV)
Overview
A CDV request submits data to verify a batch of account numbers against a bank-supplied algorithm to determine if the account numbers fall in a valid range for that bank.
Request URL
https://www.peachpay.co.za/API/CDV?key=yourkey
Request structure
A CDV request consists of three separate sections with a root parameter called APICDVRequest
. The Header
section contains information on the CDV batch, the Records
section is a collection of account details for verification, and the Totals
section verifies that the information sent is complete and correct.
Header
A CDV request has a single Header
section with the following parameters:
Parameter | Description | Condition |
---|---|---|
PsVer | The version of the Peach Payments file format. 2.0.1. | Required |
Client | Your unique client code. | Required |
Service | The code for the service. CDV for check digit verification. | Required |
Reference | The batch reference. Allows you to identify the batch on the history page of the secure website. | Required |
UniqueId | Used to prevent duplicate requests. | Optional |
Records
A CDV request has a single Records
section with multiple FileContents
sections with the following parameters:
Parameter | Description | Condition |
---|---|---|
AccountNumber | The account number for verification. | Required |
BranchCode | The branch code of the account number. | Required |
CustomerCode | The customer identifier returned with the CDV results. | Optional |
Totals
A CDV request has a single Totals
section with the following parameters:
Parameter | Description | Condition |
---|---|---|
Records | The total number of CDV records submitted. | Required |
BranchHash | The sum of all the branch codes for the CDV records. | Required |
AccountHash | The sum of all the account numbers for the CDV records. | Required |
Example request
<APICDVRequest>
<Header>
<PsVer>2.0.1</PsVer>
<Client>EXA001</Client>
<Service>CDV</Service>
<Reference>TEST CDV</Reference>
</Header>
<Records>
<FileContents>
<AccountNumber>559071574627</AccountNumber>
<BranchCode>632005</BranchCode>
</FileContents>
</Records>
<Totals>
<Records>1</Records>
<BranchHash>632005</BranchHash>
<AccountHash>559071574627</AccountHash>
</Totals>
</APICDVRequest>
Response structure
The standard response structure includes a CDVResults
parameter containing the validation results.
The Response
root parameter has the following parameters:
Parameter | Description |
---|---|
Result | Always OK . |
BatchCode | Deprecated. Empty. |
TotalFeeIncludingVat | Deprecated. 0 . |
UniqueId | The unique ID submitted |
The Result
section has the following parameters:
Parameter | Description |
---|---|
Result | The result of the CDV check. Invalid for a failed account. |
Message | The rejection reason. |
AccountNumber | The account number that failed the CDV test. |
BranchCode | The submitted branch code. |
Reference | The submitted reference. |
Example valid response
<Response>
<Result>OK</Result>
<BatchCode></BatchCode>
<TotalFeeExcludingVAT>0</TotalFeeExcludingVAT>
<UniqueId>12345443</UniqueId>
<CDVResults>
<Result>
<Result>Valid</Result>
<AccountNumber>123456789</AccountNumber>
<BranchCode>632005</BranchCode>
<Reference>Example 1</Reference>
</Result>
</CDVResults>
</Response>
Example invalid response
<Response>
<Result>OK</Result>
<BatchCode></BatchCode>
<TotalFeeExcludingVAT>0</TotalFeeExcludingVAT>
<UniqueId>12345443</UniqueId>
<CDVResults>
<Result>
<Result>Invalid</Result>
<Message>Account number is not valid for ABSA Bank.</Message>
<AccountNumber>1234567891</AccountNumber>
<BranchCode>632005</BranchCode>
<Reference>Example 1</Reference>
</Result>
</CDVResults>
</Response>
Postman collection
See the Peach Payments Postman collection for sample calls.
Updated over 1 year ago