Invalid Number
What This Means
The card number is not a valid credit card number, typically failing the Luhn algorithm check or having an incorrect length. This is a checkout-time error that should be caught by client-side validation. SaaS businesses using Stripe Elements will rarely see this.
Retrying will likely fail again. The customer needs to update their payment method or contact their bank.
Common Causes
- 1Customer entered a number that fails the Luhn checksum algorithm
- 2Card number has an incorrect length for the card network
- 3Non-numeric characters or spaces were included in the card number
Recovery Tactics
- 1Implement Luhn validation on the client side before submitting to Stripe
- 2Use Stripe Elements which validates card number format in real time
- 3Strip non-numeric characters from the input before validation
How healthy is your Stripe account?
Get a free churn health report. Find pending cancellations, failed payments, and expiring cards putting your MRR at risk.
Run Free AuditRelated Decline Codes
FAQ
What is the Luhn algorithm?
The Luhn algorithm is a checksum formula used to validate credit card numbers. It catches most single-digit transposition errors. If a card number fails the Luhn check, it is definitely not a valid card number.
Should I show the specific validation error to the user?
Show a generic "Invalid card number" message rather than explaining the Luhn check failed. Specific technical details do not help the customer and could provide information to bad actors.
How healthy is your Stripe account?
Get a free churn health report. Find pending cancellations, failed payments, and expiring cards putting your MRR at risk.
Run Free Audit