CVV Test Case Guidelines for Payment Form Validation

Our Cards

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

cvv test case software

giftcardimage

Where to Use?

Redeem your gift cards at any of our Merchants

cvv test case template

Where to Buy?

You can purchase a gift card from any of these locations

related article

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

CVV test case guidelines define the checks a payment form must run on the card verification value before an authorization request leaves the checkout. They cover format (three digits for Visa, Mastercard, and Discover, four for American Express), required-field behavior, invalid-character handling, and how the system reacts to each issuer response code. A complete suite tests the input field and the server-side response path.

What Do CVV Test Case Guidelines Cover?

CVV Format Rules by Card Brand

Card brands use different lengths and names for the same security code. Build the test matrix from the brand, not from a fixed three-digit assumption.

Field-Level Test Cases to Write First

These cases exercise the input itself. Run each one on the checkout form, then confirm the request payload matches what the field should send.

  1. Valid three-digit value on a Visa test number. Expect a successful authorization.
  2. Valid four-digit value on an Amex test number. Expect a successful authorization.
  3. Two digits. Expect an inline validation error before submit.
  4. Five digits on a three-digit brand. Expect rejection.
  5. Letters or symbols (abc, 12/3). Expect rejection, and check that the field blocks or strips them.
  6. Empty field on a form where the code is required. Expect an error message tied to that field.
  7. Leading zeros (007, 0123). Expect acceptance, since these are valid values.
  8. Paste and browser autofill. Pasted values should behave the same as typed input.
  9. Trailing spaces. Check whether the value is trimmed before it reaches the gateway.
  10. Double submit with the same value. Confirm no duplicate authorization is created.

How Should CVV Failures Be Handled?

A mismatch does not always stop an authorization. The issuer returns a verification result, and the merchant decides how to act on it. Test every branch.

Test Data: What to Use Instead of Live Card Numbers

Use sandbox card numbers from your payment processor. Stripe, Adyen, Braintree, and similar gateways publish test PANs that trigger specific verification responses. Never paste a real card number into a staging environment, even for a quick check, because the number then sits in logs, fixtures, and screenshots.

Name test cards by behavior in your fixtures: cvv-match, cvv-mismatch, cvv-unchecked. Behavioral names keep the suite readable when a processor rotates its test numbers.

PCI DSS Rules That Shape the Tests

PCI DSS treats the CVV as sensitive authentication data. It may be used to process a transaction and must not be stored after authorization, in any form, including encrypted form.

Add a negative test that searches the log output for the test value after a run. If the string appears anywhere, the build fails.

Common Mistakes in CVV Test Suites

FAQ

Is the CVV always required for card-not-present payments?

No. Most gateways let you submit an authorization without it, and the issuer returns an unverified result. Many processors charge a higher rate or decline when the code is missing, so check your gateway rules.

Can a business store the CVV for repeat payments?

No. PCI DSS forbids storing sensitive authentication data after authorization. Recurring and subscription charges rely on a token or a stored account number instead.

What does a mismatch mean on a test transaction?

In a sandbox it means you used a test card number configured to return a mismatch. In production it means the code entered does not match the issuer record, which may point to a typo or to a card number that does not belong to the person paying.

How many digits does the CVV have on Amex?

Four. American Express prints a four-digit CID on the front of the card, above and to the right of the card number. Every other major brand uses three digits on the back.

Contact Us

Latest

Latest

Request declined

I can't write a buying guide for stolen card data and identity records.

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