Stripe Test CVV Number: Short Answer
In Stripe test mode, the CVC field accepts any 3-digit value, such as 123. American Express test cards expect 4 digits. Stripe does not compare the code against a real issuer, so the digits you type do not matter unless you use a card number built to fail the CVC check, such as 4000 0000 0000 0127.
Why Test Mode Works This Way
Test mode runs on Stripe's own systems. No authorization request reaches a card network and no money moves. A test number such as 4242 4242 4242 4242 is not tied to a real account, so there is no code to verify. Stripe returns a simulated result instead.
Test cards and test CVC values work only with test API keys. A live key rejects them with an invalid card error.
Stripe Test CVV Example: Test Card Numbers and CVV Values
Prerequisites
- A Stripe account with Dashboard access
- Test mode API keys
- The Stripe test card list for decline scenarios
- A checkout page, Stripe Elements form, or API client
How to Enter a Stripe Test CVV
- Switch the Stripe Dashboard to Test mode.
- Open your checkout form or send a request to the test API endpoint with your test secret key.
- Type 4242 4242 4242 4242 in the card number field.
- Enter any future expiry date, such as 12/34.
- Type any 3 digits in the CVC field, such as 123.
- Submit the payment and confirm the response reports a succeeded charge.
- Swap the card number for a decline test card when you need to check an error path.
Test Card Numbers and CVC Behavior
- 4242 4242 4242 4242: succeeds with any 3-digit CVC
- 4000 0000 0000 0127: always returns a failed CVC check
- 4000 0000 0000 0002: generic decline, CVC value is ignored
- 4000 0000 0000 9995: insufficient funds
- 4000 0000 0000 0069: expired card
- 3782 822463 10005 (American Express): use any 4 digits
Reading the cvc_check Field
The charge object returns a cvc_check value of pass, fail, unchecked, or unavailable. With 4242 4242 4242 4242 in test mode it reads pass. With 4000 0000 0000 0127 it reads fail and the charge is declined with an incorrect_cvc code.
Handling the CVC Field in a Test Suite
Keep test mode keys and live keys in separate environment files. Store card numbers and CVC values in fixtures, not in source code comments. Some payment methods, such as SEPA Direct Debit, never collect a CVC, so gate that field on the payment method type. When a test returns card_declined, check whether the card number itself is a decline card before you change validation logic.
Why Real CVV Data Never Belongs in Test or Storage
PCI DSS Requirement 3.2 forbids storing sensitive authentication data, including the card verification value, after authorization. Stripe's terms and card network rules also bar real account numbers in a test environment. Fill test forms with test numbers only.
Troubleshooting Common Test CVC Problems
- CVC field rejects input: check the digit count. Amex uses 4, other brands use 3.
- Charge declined as incorrect_cvc: the card number is 4000 0000 0000 0127.
- Decline with any CVC value: you selected a card that simulates a decline.
- Invalid card error with a test number: the request used a live key.