Card Expiry Test Examples: MM/YY Cases for Payment Forms

Our Cards

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

Top Pick for Card Expiry Test Tips

giftcardimage

Where to Use?

Redeem your gift cards at any of our Merchants

read more

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

Card expiry test examples are sample MM/YY values that prove a payment form accepts valid dates and rejects invalid ones. A complete set covers four groups: future dates that should pass, past dates that should fail, malformed strings that should be blocked at input, and boundary months such as 12/29 and 01/30. Running all four groups on every release catches the regressions that matter most.

What does a card expiry test verify?

An expiry test confirms three things at once: the input mask, the validation rule, and the response from the payment gateway. The mask controls digits and the slash. The rule compares the entered month and year against the current date. The gateway returns its own decline reason for an expired card.

Test the client side and the server side as separate cases. A form that blocks a bad date in the browser still needs a server rule, because requests can bypass the UI.

Which expiry dates belong in every test set?

How do you test the MM/YY format itself?

Write one test per formatting rule so a failure points to a single cause. The usual rules cover auto-inserting the slash, rejecting a third digit in the month, and accepting a pasted value that already contains a slash.

Slash or no slash?

Many users type 1229 without a separator. Decide whether the field inserts the slash or rejects the entry, then lock that behavior in a test. Add a paste test, because clipboard input skips most key handlers.

Two-digit or four-digit year?

A two-digit year is ambiguous at the century boundary and easy to misread in support tickets. Accept the four-digit form if your gateway allows it, and convert two-digit input with a fixed rule rather than a sliding window.

What are the hard boundary cases?

The expiry month is inclusive: a card marked 06/29 is valid through June 30, 2029. Test the last day of the month in the server time zone, and again with the client set to a different zone.

Test year rollover by setting the system clock to December 31 and then January 1. A rule that compares only the year will pass an expired 12/28 card on January 1, 2029.

Include a card expiring in the current month. Some gateways accept it and some decline after their own cut-off hour, so the expected result depends on the processor.

How do you test expired cards without real card data?

Use the sandbox test cards published by your payment processor. Each one ships with a fixed expiry date and a documented expected response, so you never need a live account number.

Vault flows that store a card for later charges need a token, not a number. In those tests, the expiry case checks that your system passes the stored date to the gateway instead of rebuilding it.

What should never appear in test data?

Never paste a real card number, CVV, or expiry into a ticket, a spreadsheet, or a chat thread. PCI DSS prohibits storing the CVV after authorization, and test data is no exception.

Published test numbers are sandbox only. A test card number that works in production is a red flag, not a convenience.

FAQ

Is an expired card always declined?

Most issuers decline a card after the last day of its expiry month. Recurring charges can still settle inside a grace window, so confirm the rule with your processor.

Should the form block an expired date before submit?

Blocking early gives faster feedback, but keep a server rule as well. The gateway remains the authority on the final decision.

Contact Us

Latest

Card Expiry Test Guide

Learn how to test the expiry date of a credit card with our comprehensive guide.

Latest

Unable to help

This request is for guidance on buying stolen credit card data, which I cannot help with.

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