CVV Test Cases: Validation Scenarios for Payment QA

What a CVV test suite covers

A CVV test case checks that your payment form and gateway integration handle the card verification value correctly on every path. You verify format rules per card brand, simulate issuer approve and decline responses, and confirm your application never persists the CVV after authorization. Run every case in a sandbox. Production cardholder data should never appear in a test environment.

related article

Prerequisites

Format and length test cases

  1. Submit a Visa sandbox card with a 3-digit numeric CVV and confirm the request reaches the processor.
  2. Submit an Amex sandbox card with a 4-digit CID and confirm the form accepts the full value without truncation.
  3. Enter 2 digits and confirm client-side validation blocks submission with a field-level error.
  4. Enter 5 digits on a 3-digit brand and confirm the form rejects the value.
  5. Enter letters or symbols and confirm the field strips or rejects non-numeric input.
  6. Enter 000 and confirm the value passes format validation and is sent to the issuer. Format checks and issuer decisions are separate layers.
  7. Paste a value with leading or trailing spaces and confirm trimming happens before transmission.
  8. Submit an empty CVV field and confirm your decline behavior matches the brand rule for missing data.
  9. Switch the card number between brands mid-form and confirm the length rule updates with the detected brand.

Issuer response test cases

  1. Use the gateway's CVV match test card and confirm the order completes with an approval code.
  2. Use the CVV mismatch test card and confirm you receive the decline code your gateway returns for a failed verification.
  3. Use the verification-not-processed test card and confirm your app treats the result as indeterminate instead of a hard decline.
  4. Map every returned code to a user-facing message and confirm the message shown in the UI matches your mapping table.

Edge cases

  1. Retry after a network timeout with the same idempotency key and confirm you do not create a duplicate authorization.
  2. Send a CVV alongside a tokenized card and confirm the gateway rejects or ignores it as documented.
  3. Grep your application logs, database, and error traces after the run and confirm the CVV value appears in none of them.

Checks before you ship

Mistakes to avoid

Do not run these cases against live card numbers. Do not store the CVV after authorization, which payment card industry rules prohibit. Do not assume a passing client-side check proves the server validates the same rules. Fix the server first, then mirror the rule in the form.

cvv test cases document

More

Read our complete guide: Buy CVV Cheap: Pricing, Risks, and What First-Time Buyers Need to Know