For Stripe test cards, enter any 3-digit number as the card verification code (CVC). The one exception is American Express: Amex test cards take a 4-digit code. The standard test card 4242 4242 4242 4242 works with any future expiration date and any 3-digit CVC, such as 123.

stripe test card cvv validation

What is the verification code on a Stripe test card?

The verification code is the CVC, also called CVV, CVC2, or CID depending on the network. It is the short number printed on a real card that card issuers use to confirm the person entering the number physically holds the card.

more on this topic

In Stripe test mode, that code is simulated. Stripe does not contact an issuer, so no real verification happens. The value you type only needs to match the expected length for the card brand.

stripe test card cvv validation

Which CVC values work with Stripe test cards?

Stripe documents that any 3-digit value works for its Visa, Mastercard, Discover, Diners Club, and JCB test numbers, and any 4-digit value works for Amex test numbers. Common choices are 123, 1234, or 999.

more on this topic

  • 4242 4242 4242 4242 (Visa): any 3 digits
  • 5555 5555 5555 4444 (Mastercard): any 3 digits
  • 6011 1111 1111 1117 (Discover): any 3 digits
  • 3782 822463 10005 (American Express): any 4 digits, such as 1234

How do I test a failed CVC check?

Stripe publishes specific Visa test numbers that force a CVC verification response instead of a pass. Enter a normal test CVC with these numbers to see how your code handles a failed check.

  • 4000 0000 0000 0127: triggers an incorrect CVC response
  • 4000 0000 0000 0101: triggers a CVC check failure on the returned charge

The exact outcome differs between these cards, and some let the charge succeed while reporting a failed check. Confirm current behavior in Stripe's testing documentation before you build assertions around it.

Where does the CVC appear in the Stripe API response?

Stripe returns a cvc_check field on the charge or payment method object. It reports values such as pass, fail, unavailable, or unchecked.

Stripe also returns a separate address_postal_code_check field. These are independent, so a pass on one says nothing about the other. Test both paths if your checkout logic blocks orders on verification failures.

Common mistakes when testing CVC in Stripe

  1. Typing a 3-digit CVC into the Amex test card, which expects 4 digits.
  2. Using a real card number. Test mode accepts only Stripe's published test numbers, and live card data does not belong in a test environment.
  3. Running tests with live API keys. CVC simulation only happens with test keys.
  4. Assuming every test card validates the CVC. Standard cards do not check it at all.

Frequently asked questions

What CVC do I use with 4242 4242 4242 4242?

Any 3-digit number, such as 123 or 999. Stripe does not validate the verification code on that card in test mode.

What CVC goes with the Stripe Amex test card?

Any 4 digits, such as 1234, because American Express verification codes are four digits long.

Can I use any expiration date with a Stripe test card?

Use any future date, such as 12/34. An expired test date will produce a decline instead of a normal authorization.

Does Stripe test mode accept real card numbers?

No. Test mode recognizes only Stripe's documented test numbers, and entering real card data outside production can violate card network rules and Stripe's terms of service.

Is the Stripe test CVC safe to store in my test database?

Test values carry no risk because they are not tied to a real account. Never store real verification codes after authorization, since PCI standards prohibit retaining CVC data.