CVV Test Cases for Development: A Guide

Our Cards

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

related article

giftcardimage

Where to Use?

Redeem your gift cards at any of our Merchants

cvv test case examples

Where to Buy?

You can purchase a gift card from any of these locations

cvv testing scenarios

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

A CVV test case checks that a payment form reads, validates, and sends the 3 or 4 digit security code, then discards it. Development and QA use test card numbers from the payment processor's sandbox. Real card data never belongs in a development, staging, or CI environment.

What the CVV field holds

The CVV is a 3 digit code on the back of Visa, Mastercard, and Discover cards. American Express uses a 4 digit card identification number on the front. The code is not part of the card number and is not printed on the magnetic stripe. PCI DSS Requirement 3.2 prohibits storing the value after authorization, in any form.

Where test values come from

Each processor publishes test card numbers for its sandbox: Stripe, Adyen, Braintree, and Authorize.net all do this. A sandbox number passes only against the sandbox endpoint. A live card number declines in sandbox, and a sandbox number declines in production. Copy the numbers from the processor's documentation and pin the version you tested against.

Cases to cover

  1. Valid 3 digit CVV with a Visa test number: approval.
  2. Valid 4 digit CID with an Amex test number: approval.
  3. Blank CVV: client-side error before any network call.
  4. 2 digits: length error, submit blocked.
  5. Letters, spaces, and symbols: rejected at input.
  6. 5 digits typed into a 3 digit field: confirm truncation or rejection, not silent pass.
  7. Leading zeros such as 001: accepted and not stripped by a numeric cast.
  8. Processor decline code for a CVV mismatch: mapped to a readable message.
  9. Card types that carry no CVV in a given market: field hidden, not required.
  10. Tokenized payload: confirm the CVV field is absent from the request your server sends.

Sandbox versus production

Run a search of logs, database columns, analytics events, and error traces for the test CVV value after a full checkout. The value should appear in none of them. Check application performance monitoring captures and support ticket exports as well. Mask the input, keep it out of the URL, and send it only over TLS to the processor's tokenization script.

Common failures

Unknown: the exact test numbers differ by processor and change with API versions. Read the current sandbox documentation before you write the fixtures.

Contact Us

Latest

Latest

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