# Verify any 16 digit number in Chargebee fields (Luhn Algorithm)

Modified on: Tue, 28 Sep, 2021 at 8:57 PM

Summary

In Universal coding language, LUHN ALGORITHM is used at the framework level. The Luhn Algorithm—also known as the “Modulus 10 Algorithm”—is a formula that is used to determine whether the identification number provided by a user is accurate. The formula is widely used in validating credit card numbers, as well as other number sequences such as government Social Security Numbers (SSNs). Today, the Luhn Algorithm is an essential component in the electronics payments system and is used by all major credit cards.

Solution

1. If you enter a 14-16 digit number in any input fields like email, company name, first name, address fields then the Chargebee system will verify that number against Luhn Algorithm to check if it is a card number or not. If it matches then it will not be accepted by Chargebee.

2. Copy the 16 digit number and paste it in Number to Check textbox and hit verify. If the resulting tick shows a green right check sign then it is a card number and Chargebee will not accept it. If the resulting tick is a red cross sign then that number is not a card number and is accepted by Chargebee.

3. Example: Email address - org-test-20210917131347022-417573@testingtoolkit.co.uk  when you try to create a customer or update customer details in an email field with the above mail id then that is not acceptable.

4. Chargebee system will verify 20210917131347022 this 16 digit number in the Luhn algorithm and if it is found to be valid then it will be rejected and the customer will be created/ updated.

5. If any digit in this number is changed let say 022 to 122 and try to create/update customer details that will be accepted by chargebee.

6. https://www.dcode.fr/luhn-algorithm - site to verify the 16 digit number

Example:

Verify original number given by customer 20210917131347022

The result shows a green right tick that means this is a card number in use.

Verify the number by changing 022 to 122 the number will be 20210917131347122

The result is a red cross sign so this is not a card number and can be used in Chargebee.

Did you find it helpful? Yes No

Send feedback