Card Test Case: What It Is and How to Build Payment Test Cases

Our Cards

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

giftcardimage

Where to Use?

Redeem your gift cards at any of our Merchants

Where to Buy?

You can purchase a gift card from any of these locations

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 card test case is a documented set of steps, test data, and expected results used to verify how a payment system handles card transactions inside a controlled test environment. It checks approval, decline, validation, refund, and error paths using sandbox credentials or gateway-issued test card numbers, so no real cardholder funds or data are involved.

What a card test case actually covers

Payment flows touch more systems than most teams expect: the checkout form, tokenization layer, payment gateway, acquirer response, order database, and the notifications sent afterward. A single card test case targets one behavior across those layers. For example, a case might confirm that an expired card is rejected before a charge attempt, or that a declined authorization leaves the order in a pending state instead of marking it paid.

Good test suites split cases by intent rather than by screen. Authorization rules, input validation, and post-payment events each deserve their own set, because a failure in one rarely shows up in the others.

Core scenarios every card test suite should include

How to structure a single card test case

Most teams follow a structure similar to the one ISTQB describes for test cases in general, adapted to payment data.

  1. ID and title: a unique identifier plus a one-line description of the behavior under test.
  2. Preconditions: the environment, gateway mode, account state, and cart contents needed before the test starts.
  3. Test data: the specific sandbox card profile, expiry, and amount. Reference the source rather than copying numbers between documents.
  4. Steps: the exact sequence a tester follows, written so a new team member can repeat it.
  5. Expected result: the response code, UI state, database state, and any email or webhook triggered.
  6. Postconditions: cleanup such as voiding the transaction or resetting the test account.

Where the test data should come from

Use the test card numbers your payment provider publishes for its sandbox. Stripe documents test card numbers and decline triggers that work only in test mode, and Adyen provides test card numbers and simulated responses in its test environment. These numbers are not tied to real accounts and cannot move money.

Never run a card test case with live cardholder data. PCI DSS limits the storage of sensitive authentication data and requires cardholder data to be protected wherever it exists, including staging and QA systems. If a production-like dataset is required, tokenize or mask it first.

Common mistakes

Keeping the suite useful over time

Treat card test cases as living assets. Version them alongside the integration, tag each one with the gateway and API version it targets, and rerun the full set after any change to the checkout, the payment provider, or the order pipeline. A suite that covers approval, decline, validation, refund, and error paths gives you a clear signal before a release reaches real customers.

Contact Us

Latest

Buy CVV: A Comprehensive Buying Guide

Discover the ins and outs of purchasing CVVs with our expert buying guide. Learn the essentials, avoid common pitfalls, and get answers to frequently asked questions.

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