Sample Checkdigit

Creditron as a solutions provider contributes to the advancement of payment processing knowledge by providing a clear definition of common terms used in the payment processing industry.

checkdigit2

Sample Checkdigit Calculation:

Check digits are used to verify accuracy of data scanned from the OCR line. By performing a mathematical calculation on all the numbers in a scanline, an additional digit (the check digit) is generated and printed with the scanline. The same calculation is performed when the line is read to ensure that the check digit is the same. Although check digit routines vary widely from application to application, the following is an example of a typical Mod 10 check digit calculation.

The following is the sample scanline (see Scanline Recommendations).

1203547437000006715000017150000201611200000300000001

The check digit in this example is in position 52 and will be calculated as follows:

1. Multiply each digit position by the weight (2121212121) to obtain the products:

1203547437000006715000017150000201611200000300000001
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
212121212121212121212121212121212121212121212121212

1 X 2 = 2
2 X 1 = 2
0 X 2 = 0
3 X 1 = 3
5 X 2 = 10
4 X 1 = 4
7 X 2 = 14
4 X 1 = 4
3 X 2 = 6
7 X 1 = 7
0 X 2 = 0
0 X 1 = 0
0 X 2 = 0
0 X 1 = 0
0 X 2 = 0
6 X 1 = 6
7 X 2 = 14
1 X 1 = 1
5 X 2 = 10
0 X 1 = 0
0 X 2 = 0
0 X 1 = 0
0 X 2 = 0
1 X 1 = 1
7 X 2 = 14
1 X 1 = 1
5 X 2 = 10
0 X 1 = 0
0 X 2 = 0
0 X 1 = 0
0 X 2 = 0
2 X 1 = 2
0 X 2 = 0
1 X 1 = 1
6 X 2 = 12
1 X 1 = 1
1 X 2 = 2
2 X 1 = 2
0 X 2 = 0
0 X 1 = 0
0 X 2 = 0
0 X 1 = 0
0 X 2 = 0
3 X 1 = 3
0 X 2 = 0
0 X 1 = 0
0 X 2 = 0
0 X 1 = 0
0 X 2 = 0
0 X 1 = 0
0 X 2 = 0
1 X 1 = 1

2. Add the digits of the products together

E.g.: 2+2+3+1+4+1+4+4+6+7+6+1+4+1+1+1+1+4+1+1+2+1+1+2+1+2+2+3= 69

3. Divide by 10 and calculate remainder.

E.g. 62/10 = 6 with remainder of 9

4. Subtract remainder from 10 for the check digit.

E.g. 10 – 9 = 1 The check digit for the sample line is 1.

 

©2024 Creditron | All Rights Reserved

Top