invalid_cvcThe CVC is invalid
Stripe's invalid_cvc decline means the security code is incorrect. How it differs from incorrect_cvc, how to test it, and what to tell customers.
- Next step
- Customer should correct their card details
- Hard decline
- Not on Stripe's list
- Share the reason
- Yes
What does invalid_cvc mean?
The CVC number is incorrect.
Stripe describes invalid_cvc and incorrect_cvc the same way. As API error codes, Stripe calls invalid_cvc an invalid security code and incorrect_cvc an incorrect one. Handle both with the same message.
What Stripe says to do
The customer needs to try again with the correct CVC.
What to tell the customer
You can tell the customer the security code wasn't valid.
The security code (CVC) isn't valid. Please check the digits on your card and try again.
Should you retry invalid_cvc?
Yes, after the customer enters a valid CVC. It isn't on Stripe's hard decline list, so Stripe Billing retries follow your Smart Retries or custom schedule.
Before any retry, check the charge's outcome.advice_code. try_again_later means the issuer allows a retry, do_not_try_again means don't use the card again for this transaction, and confirm_card_data means some card details need checking.
Where invalid_cvc shows up
On a failed PaymentIntent, read last_payment_error.decline_code. On the Charge, the same code is in outcome.reason. Card declines usually come with the error code card_declined and the reason in decline_code.
Stripe also documents invalid_cvc as a top-level API error code, so check error.code as well as decline_code when you handle it.
To test it in a Stripe sandbox: Enter a two-digit CVC such as 99 with any test card.
Get failed payments in Slack
ChargeBell posts a Slack alert when a Stripe payment fails, with the amount, the customer, and Stripe's decline message. Open the payment from the alert to see its decline code, such as invalid_cvc, and follow up from there.