CVV Input Test Cases: Payment Form QA Guide

Our Cards

Choose from any of our gift cards to give to your loved ones

cvv test input example

giftcardimage

Where to Use?

Redeem your gift cards at any of our Merchants

cvv input test

Where to Buy?

You can purchase a gift card from any of these locations

cvv test input example

ABOUT US

about

What is ONYX GiftCards?

Onyx Gift Cards is a Grenadian company designed to introduce, market and manage gift cards systems in Grenada for retailers and corporations. We are enthusiastic about the effect and influence we will have on the local market. We intend to expand our systems regionally with a range of product offerings and services.

What is a Gift Card?

Gift cards are the preferred way of giving and receiving gifts. They carry a monetary value that can be redeemed for gifts at your favorite store.
Onyx GiftCards are “Open Gift Cards” which means that they can be redeemed at multiple merchant locations. They are standard credit card size, can fit into the average wallet and made of PVC plastic. Onyx GiftCards are Barcoded for security and safety for the consumer and bear a disclaimer at the back.
Onyx Giftcards can be bought with a branded Card backer which is black in colour and is designed to fit the card. There is an area to write a brief message to the recipient as well.

How it Works?

  • Buy an Onyx Gift Card at these local stores
  • Give your gift card to friends, family, co-workers, etc.
  • The recipient can shop at our select merchants nationwide
  • Your friends, family, co-workers, etc. will present their gift card at checkout to pay for your item(s)
  • They will walk away happy with the best gift ever...the gift of Choice

Why ONYX GiftCards?

  • Save TIME. No need to run around looking for the perfect gift
  • Redeem from a variety of business island-wide. We will continue adding businesses as fast as ONYX grows.
  • ONYX Gift Cards do not expire
  • Cards are valued at convinient amounts to meet every need and occasion

The top pick for most payment teams is a table-driven set of about 30 CVV input test cases run against a processor sandbox, built around four checks: brand-specific digit length, character filtering on typing and paste, boundary handling for blanks and whitespace, and parity between browser and server validation. Those four checks cover the failures that actually reach production, such as a field that accepts letters, a server that trusts the browser, or a database column that holds a value PCI DSS says you must not keep. The criteria below rank each test family by defect yield, cost to automate, and how directly it maps to a compliance or accessibility requirement.

Brand length and digit format

Card verification values differ by network. Visa, Mastercard, and Discover use three digits; American Express uses a four-digit CID printed on the front. A test set that only covers three digits will pass while your Amex checkout is broken. Drive the cases from the detected brand rather than a single hardcoded length, and include a case where the brand changes after the number field is edited.

Pros

Cons

Use this family first on any checkout that supports more than one network, and rerun it whenever the card-number parsing logic changes.

Character filtering on typing and paste

Test letters, symbols, spaces, and non-ASCII digits such as Arabic-Indic numerals. Then repeat every case through a paste event and through autofill, since masked inputs often handle keystrokes and pastes with different code paths. The expected result is consistent: the field rejects or strips the input, shows a clear message, and never submits the raw string to the server.

Pros

Cons

Reach for this family when the input uses a custom mask or a third-party form component you do not control.

Boundary and whitespace handling

Cover the empty field, a single digit, one digit over the limit, leading zeros, a value padded with trailing spaces, and a value containing a hyphen. Leading zeros matter because a value like 007 is valid and will break if the field is treated as a number. Trailing whitespace matters because mobile keyboards add it silently, and a server-side trim that runs after length validation can still pass a bad string through.

Pros

Cons

Run this family before a release that touches form serialization, mobile layouts, or keyboard configuration.

Client and server validation parity

Every browser-side case needs a matching server-side case sent with the client checks disabled. Post an empty value, a two-digit value, a five-digit value, and a value with letters directly to the endpoint. The server must reject each one on its own. OWASP guidance is consistent here: treat all input as untrusted and validate on a trusted server using allowlist rules, never rely on the browser as the control.

Pros

Cons

Make this the non-negotiable family in your suite. If you automate only one group, automate this one.

Error messaging and field states

Check the message text, not just the rejection. WCAG requires error identification in text plus a suggestion for correction, so a red border alone fails. Confirm the message is programmatically associated with the field, that focus moves to it, and that the field does not clear the card number when the CVV is wrong. Also confirm the decline message stays generic and does not reveal which field failed on a live authorization.

Pros

Cons

Use this family whenever copy changes, the design system updates, or a new locale ships.

Test data and environment

Run every case in a processor sandbox with the test card numbers the processor publishes, and keep those numbers in a fixture file rather than in the test code. Never use live account data in a test environment. PCI DSS does not permit storing the verification value after authorization, so no test case should ever assert that the CVV was written to a log, a database column, or an analytics event. Add an explicit negative assertion that reads your logs after a transaction and fails if the value appears.

Pros

Cons

Adopt this as a standing guard rather than a one-time project, and rerun it on every logging or monitoring change.

Recommended order of adoption

  1. Server-side parity cases, since they carry the highest severity.
  2. Brand length cases, because Amex breakage is common and cheap to prevent.
  3. Character and paste filtering, which covers the masked-input gap.
  4. Log and storage assertions, to keep the compliance rule enforced.
  5. Boundary and whitespace cases, as a fast regression layer.
  6. Error message and accessibility checks, expanded as copy and locales change.

Thirty cases across these six families will fit in a single data table and run in seconds against a sandbox, which is enough to keep a payment form honest without turning the suite into a maintenance burden.

Contact Us

Latest

Latest

Read our complete guide: Should You Buy CVV From a Card Shop? The Honest Buyer's Guide