What Is a CVV Test for Compliance?
A CVV test for compliance confirms that your payment stack collects the card verification value, sends it to the issuer for validation, and never stores it after the authorization response. You run the test with sandbox test card numbers, capture the logs, and hand the evidence to your PCI DSS assessor. Real customer card data, including your own card, does not belong in this process.
The check exists because the CVV is one of the few pieces of card data a merchant cannot keep. PCI DSS classifies it as Sensitive Authentication Data (SAD), and the rule is simple: use it, then discard it.
Which CVV Values Do Compliance Rules Cover?
Card networks issue several verification values. They share a purpose but live in different places, and PCI DSS treats them the same way.
- CVV2: the three-digit code printed on the back of a Visa card, used for card-not-present transactions.
- CVC2: Mastercard's version of the same printed code.
- CID: the four-digit code printed on the front of American Express cards.
- CVV and iCVV: data encoded on the magnetic stripe or chip. Never printed, never entered by a customer.
All four count as Sensitive Authentication Data. A compliance test must show that none of them survive the transaction in your systems.
Where Do You Get Test Values?
Your payment processor publishes test card numbers for its sandbox. These numbers pass Luhn checks and behave like real cards against a test issuer.
Stripe, for example, offers test cards that return specific decline codes, including one for a CVV mismatch. Visa and Mastercard also publish test BINs for acquirers and developers. Using them keeps the test repeatable and free of live card data.
Never run these tests with a card number pulled from production. That turns a compliance exercise into a data handling violation.
Who Needs This Test?
Any organization that accepts card-not-present payments. That covers e-commerce merchants, subscription billers, marketplaces, and the payment service providers behind them.
Organizations that hand card capture to a hosted payment page have a smaller scope, but not zero. You still confirm that the CVV never reaches your servers, and you keep the evidence.
Acquirers and processors run the same tests at a larger scale, often against multiple card brands at once.
How to Run a CVV Compliance Test
- Define the scope. List every system that touches the CVV: checkout forms, payment gateways, order management, support tools, log pipelines.
- Set up a sandbox. Use your processor's test environment with test card numbers. Keep production traffic out of it.
- Build test cases. Run a valid CVV, an invalid CVV, a missing CVV, and a card that declines on mismatch. Confirm each returns the expected response.
- Inspect storage and logs. Query your databases, application logs, and error trackers for the test CVV value. Zero hits is the pass condition.
- Check the network path. Confirm the CVV travels over TLS and is not written to any file, cache, or queue along the way.
- Package the evidence. Save timestamps, request and response records, and the query output that proves the value left no trace.
Run the same sequence after any change to the payment flow. A new checkout plugin can reintroduce storage without anyone noticing.
Which PCI DSS Requirements Apply?
PCI DSS v4.0 addresses CVV handling in a handful of requirements. Your test evidence should map to each one.
- Requirement 3.3.1: Sensitive Authentication Data is not stored after authorization, even if encrypted.
- Requirement 3.3.2: SAD is not stored on any system, including the one that receives it.
- Requirement 3.3.3: SAD is not copied or relocated to another location.
- Requirement 4.2.1: Card data in transit is protected with strong cryptography.
Issuer verification of the CVV is expected. Retaining the value afterward is not.
What Fails a CVV Compliance Test?
Most failures come from the same few places. Look for them first.
- The full authorization request, CVV included, is written to an application log.
- Error monitoring tools capture the payment payload when a charge fails.
- The gateway stores the CVV in a token vault for convenience.
- Customer support screens display the value to an agent.
- Backups and data warehouse imports carry the field along.
Each of these is a finding, and each one is fixable by trimming the field at the source rather than scrubbing it later.
Frequently Asked Questions
Is a CVV test required for PCI DSS?
The standard does not name a specific test. It requires that you prove SAD is not stored. A sandbox test with logged evidence is the accepted way to show that.
Can I test with a real card I own?
No. Use processor-issued test cards. A live account number in a test flow creates a real transaction record and can breach your merchant agreement.
How often should the test run?
Before each annual assessment and after every change to the payment path. Processors also push gateway updates that can alter what gets logged.
Does a CVV decline mean the transaction is fraudulent?
No. A mismatch means the code entered does not match the issuer's record. It is one signal among several, and it says nothing about the cardholder's intent.
What if my processor handles CVV for me?
You still own the requirement. Your systems must not store the value, and you need evidence that hosted fields, iframes, or tokenization keep it out of your environment.