Card Expiry Test Examples Guide
Learn the best card expiry test examples to ensure card security when purchasing CVVs.
Redeem your gift cards at any of our Merchants
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.
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.
A card expiry test app checks how a payment form handles the expiration date field. It verifies formatting, month and year ranges, and the rules that decide which dates pass and which dates fail. The app runs against sandbox card numbers, so no live account data is used.
Most teams test three things at once: the input mask, the validation message, and the request sent to the processor. A form that shows "invalid date" in the wrong place still fails the checkout.
The expiry field breaks in ways the card number field does not. It holds two values, it accepts a slash or a space, and it must compare against the current month. One bad rule can reject valid cards at the till.
Payment processors publish test card numbers for their sandboxes. Stripe, Adyen, Braintree, and PayPal all list card numbers that trigger approved, declined, and error responses.
Stripe accepts any future expiry date in test mode, so 12/34 works for most runs. Check your processor docs, because some sandboxes pin a fixed date or demand a set year.
Run this list after every change to the checkout code. Each line maps to one assertion in your suite.
The field parses the string into a month and a year, then compares that pair to the current month. A card passes when its month and year are greater than or equal to the current month and year.
Two-digit years need a window. Many libraries map 00 through 49 to 2000 through 2049 and the rest to 1950 through 1999, but any clear rule works if you document it.
The Luhn check digit applies to the card number, not the expiry date. Keep those two checks apart in your tests.
The security code sits next to the expiry date and shares the same validation path. Test both fields together so error messages do not stack on top of each other.
You can test by hand in a sandbox checkout, but automated runs catch regressions after each deploy. Pick the method that matches your release cycle.
Use a date at least one year ahead, such as 12/34. It avoids boundary failures while you test other parts of the form.
No. Sandbox cards accept any 3-digit code, or 4 digits for American Express. The processor ignores the value in test mode.
Yes. Type a past date into the field. The form should stop the request before it reaches the processor.
Testing your own payment form with sandbox numbers is standard practice. Testing live card data you do not own is not.