Menu
Feedback
Start here
Tutorials
Developer portal

Known Issues
Support Rules
Troubleshooting

Frequently Asked Questions
Announcements
News
Announcements
Luhn algorithm for credit and debit cards at checkout
Photo of the author
PedroAntunesCosta
Published on 9/19/2023
Last update on 9/19/2023

VTEX now allows validating credit and debit card numbers with the Luhn algorithm at checkout.

What has changed?

Previously, when a customer entered the card number at checkout, it was not possible to identify whether it was a valid card. When there were typing errors, the transaction was created but then canceled during authorization.

Now, the Luhn algorithm will ensure that only a valid card number can be used for payment, which will reduce the percentage of declined transactions due to invalid card numbers.

If a customer enters an incorrect number, an error message is displayed at checkout. In such cases, the customer must check and correct the number to complete the purchase.

{"base64":"  ","img":{"width":617,"height":710,"type":"png","mime":"image/png","wUnits":"px","hUnits":"px","length":72633,"url":"https://raw.githubusercontent.com/vtexdocs/help-center-content/refs/heads/main/docs/en/announcements/2023-09-19-luhn-algorithm-for-credit-and-debit-cards-at-checkout_1.PNG"}}

Why did we make this change?

Having a payment transaction declined due to an invalid card number could lead customers to give up on buying again, as they would have to enter the card number again. So, this improvement in the shopping experience aims to increase your store conversion rate.

What needs to be done?

No action is required. The Luhn algorithm is already active in all VTEX stores.

The Luhn algorithm does not prevent fraud through card testing attacks. Its purpose is to detect typing errors in card numbers.

Was this helpful?
Yes
No
Suggest Edits (GitHub)
On this page
Still got questions?
Ask the community
Find solutions and share ideas in the VTEX community.
Join our community
Request support from VTEX
For personalized assistance, contact our experts.
Open a support ticket
GithubDeveloper portalCommunityFeedback