New in Chargebee: Explore Reveal and understand your payment performance end-to-end.Try Now
Docschargebeedocs
HomeBillingPaymentsRevRecGrowthReveal
Support

Product Updates


  • Release Notes

Payment Methods


  • Payment Methods Overview
  • Cards
  • Direct Debit
  • Bank Based Payments
  • Wallets
  • Vouchers
  • Articles and FAQ

Payment Gateways and Configuration


  • Payment Gateways Overview
  • Chargebee Test Gateway
  • Stripe
  • PayPal Payment Services
  • Chargebee Pay
  • Adyen
  • Authorize.net
  • Bambora (formerly Beanstream)
  • Bank of America
  • BluePay
  • BlueSnap
  • Braintree
  • Checkout.com
  • CyberSource
  • dLocal
  • EBANX
  • Ecentric
  • Elavon
  • E-xact Direct Integration
  • eWay Rapid
  • Global Payments
  • GoCardless
  • J.P. Morgan Mobility Payment Solutions
  • Metrics Global
  • Mollie
  • Moneris
  • Network Merchants Incorporated (NMI)
  • Nuvei
  • Orbital (Chase Paymentech)
  • Pay.com
  • Paymill
  • Paystack
  • Pin Payments
  • QuickBooks Payments
  • Razorpay
  • Sage Pay
  • Solidgate
  • Twikey
  • Windcave
  • Worldline Online Payments(formerly Ingenico)
  • Worldpay
  • Articles and FAQ

Level 2/3 Data Support


  • Level 2/3 Data Support

Advanced Routing


  • Advanced Routing

Dunning


  • Dunning
  • Articles and FAQ

Offline Checkout


  • Offline Checkout
  • Articles and FAQ

Transaction Sync & Invoice Mapping


  • Transaction Sync and Invoice Mapping

Fraud Management


  • Fraud Management

Error Handling


  • Errors with Root Cause and Troubleshooting

Payment Lifecycle Logs


  • Payment Intents
  • Transactions
  • Gateway Activity Logs
  • Articles and FAQ

Others


  • Reach (Merchant of Record)
  • Payment Verification
  • Bulk Deletion of Payment Methods
  • Custom Payment Methods
  • Payment Initiator Parameter
  • PSD2 and Strong Customer Authentication
  • RBI e-Mandate
  • RBI Tokenization Regulations
  • Chargeback Management
  • Transaction Descriptors
  • Payment Preferences
  • Visa Trial Rules
  • Mastercard Trial Rules
  • Co-badged Card Compliance
  • Articles and FAQ
  1. Payments
  2. Payment Methods
  3. Articles and FAQ
  4. Cards
  1. Payments
  2. Payment Methods
  3. Articles and FAQ
  4. Cards

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

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

image

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

image

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

image

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

image

Related Articles

Can I use multiple currencies with my Chargebee account?
Where is the credit card stored for recurring transactions? Is it safe?
Does Chargebee automatically update an expired card?
How can customers add or update their payment information in Chargebee?
My customers are not able to sign up using their American Express, Discover, JCB or Diners Club cards even though these card types are enabled in Chargebee. How can I fix this?
I want to edit specific card details for a customer such as the date of expiry. Is this possible?
How to charge a card before the next retry after a failed payment?
How can my customers set a primary/backup payment method using their self serve portal?
How to copy/move just the card details from one customer record to another?
'Fix for error- when Credit cards are being added in the "Add payment method" link/ MISSING_CARD_HOLDER_INFO: Either the first name or last name should be present.'
'Card Verification: Enabled Configuration'
Billing address updated in chargebee is not reflecting on open invoices or in the gateway. Why?
How can I get information when a card is submitted as a payment method?

Show more

Was this article helpful?