Card Expiry Test Methods
Discover the most effective card expiry test methods for your needs.
Choose from any of our gift cards to give to your loved ones
Top Pick for Card Expiry Test Tips
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
Blocking early gives faster feedback, but keep a server rule as well. The gateway remains the authority on the final decision.