Your cart is empty
Shop now
+

Card Expiry Test: How to Check Expiration Date Validation

Explore

Card Expiry Test: How to Check Expiration Date Validation

We guarantee gift cards direct to your inbox immediately.
Shop Now!

Let's Work Together

Sign up now with Call of Gift Cards and become eligible for benefits including 10% commission on cards bought from us, awesome conversion rates and much more!
Find Out More

Digital Gift Cards

The market for digital goods and services are growing rapidly. One of the true shifts in online behaviour is the switch from traditional direct online payments and purchase to wallets and gift cards. ...read more
+

Digital Gift Cards

The market for digital goods and services are growing rapidly. One of the true shifts in online behaviour is the switch from traditional direct online payments and purchase to wallets and gift cards. We invite you to start your own online business as a partner of ours. By signing up as a partner you’ll get access to one of the largest gift card databases in the world. All you need to focus on is to market your website and products. Gift cards are quickly outperforming traditional gifts, as they give the recipient the choice to pick their own present from a variety of options. The range of e-gift cards available on the Call of Gift Cards's partner sites includes popular categories such as restaurants, games, travel and fashion.

Gift Vouchers

Traditional gift vouchers are printed paper gifts available in set values that can be spent in specific stores. Open-loop, semi-open loop, and closed-loop are often terms used when referring to gift v...read more
+

Gift Vouchers

Traditional gift vouchers are printed paper gifts available in set values that can be spent in specific stores. Open-loop, semi-open loop, and closed-loop are often terms used when referring to gift vouchers. All gift cards sold via our partners’ websites are closed loop. This means that the gift card can only be spent at a single brand location, for example, an Xbox voucher can only be spent at Xbox etc.

Our Gift Cards

Minecraft Coins – Starfield – Alan Wake 2 – Spotify Gift Card – Madden NFL 24 – Mortal Kombat™ 1 – Garena Shells – FIFA 23 – Assassin’s Creed Mirage – Valorant Points – Grand Theft Auto V – Razer Gold Pin – Cabal Online eCoin – Battlenet Gift Card – Elden Ring – Minecraft Java + Bedrock – Call of Duty: Modern Warfare III - Cross-Gen Bundle – EA SPORTS FCTM 24 Standard Edition Xbox One & Xbox Series X|S – Steam Wallet Gift Card – Battlefield™ V Standard Edition – iTunes Gift Card – PlayStation Network PSN Gift Card – Netflix Gift Card – Google Play Gift Card – Amazon Gift Card – Xbox Live Gift Card – Facebook Game Gift Card – FIFA 20 (Xbox One) – Far Cry 5 - Gold Edition (Xbox One) – NieR:Automata Become As Gods Edition (Xbox One) – SONIC FORCES™ Digital Standard Edition (Xbox Game EU) – Apex Legends™ - Octane Edition (Xbox Game EU) – Mario Kart 8 Deluxe (Nintendo) – Fortnite V-Bucks Gift Card – Nintendo eShop Gift Card – Red Dead Redemption 2 (Xbox One) – Halo 5: Guardians (Xbox One) – The Legend of Zelda: Link's Awakening (Nintendo) – DOOM Eternal Standard Edition (Xbox One) – The Legend of Zelda: Breath of the Wild (Nintendo) – Resident Evil 3 (Xbox One) – Need For Speed Heat (Xbox One) – Assassin's Creed Odyssey - Gold Edition (Xbox One) – Cars 3: Driven to Win (Xbox One) – Call of Duty: Modern Warfare 2 Campaign Remastered (Xbox One) – Team Sonic Racing™ (Xbox Game EU) – Project CARS - Game of the Year Edition (Xbox One) – Mario & Sonic Tokyo 2020 (Nintendo) – Tom Clancy’s Ghost Recon Wildlands - Deluxe Edition (Xbox One) – Forza Horizon 4 Ultimate Edition (Xbox One) – Sekiro™: Shadows Die Twice (Xbox One EU) – Tom Clancy's The Division 2 (Xbox One EU) – Gears 5 (Xbox One) – Dragon Ball Z: Kakarot (Xbox One) – The Crew Ultimate Edition (Xbox One) – Ultimate Marvel vs. Capcom 3 (Xbox One) – Pokemon Let's Go Eevee! (Nintendo) – Sonic Mania (Xbox Game EU) – UFC 3 - Deluxe Edition (Xbox One) – Mass Effect Andromeda - Standard Recruit Edition (Xbox One) – BioShock: The Collection (Xbox One) – A Way Out (Xbox One) – Borderlands 3 (Xbox One) – Overcooked! 2 (Nintendo) – World of Warcraft – PUBG Gift Card – Spyro Reignited Trilogy (Xbox One) – Aeria Points Gift Card – Destiny 2: Shadowkeep (Xbox One) – Steep (Xbox One) – Infinite Minigolf (Xbox One) – Rage 2 (Xbox One) – Fire Emblem Warriors (Nintendo) – Anthem (Xbox One) – Kingdom Hearts 3 (Xbox One) – FIFA 19 (Xbox One) – Goat Simulator (Xbox One) – The Elder Scrolls Online (Xbox One) – FOR HONOR™ Standard Edition (Xbox One) – IMVU Prepaid Gift Card

Card Expiry Test: How to Check Expiration Date Validation

A card expiry test checks whether a payment form accepts or rejects a card based on the expiration month and year a customer enters. Valid future dates should pass, expired dates and malformed entries should fail, and the result should hold true on both the client and the server. Developers run these checks in a processor sandbox with published test card numbers, never with real card data.

more on this topic

What a card expiry test is actually checking

The expiry field looks simple, but it sits at the intersection of user input, browser behavior, and payment processor rules. A useful test covers more than one happy path.

Card Expiry Validation Guide

  • Format handling. Does the form accept MM/YY and MM/YYYY, or only one of them? Does it reject letters, symbols, and empty values?
  • Month range. Months 00 and 13 are invalid. Months 1 through 12 are valid, with or without a leading zero.
  • Expired versus current month. A card is valid through the last day of its expiry month, so a card marked 09/26 is still good during September 2026.
  • Two-digit years. The form needs a consistent rule for mapping 26 to 2026 and 85 to 1985 or 2085.
  • Server-side repetition. Client checks are for convenience. The server must run the same validation, because anyone can bypass the browser.
  • Clock and time zone. Expiry validation that depends on the local device date can disagree with the processor's date.

Edge cases worth adding to a test plan

Most bugs in expiry handling show up at the boundaries. Build a small table of inputs and expected results before you start.

expiry test card

  1. Past year with a valid month, which must decline as expired.
  2. Current month and year, which should pass until the month ends.
  3. Next month, which should pass.
  4. Month 00, month 13, and negative numbers.
  5. Whitespace, slashes in the wrong place, and pasted text like 09 / 26.
  6. Years far in the future, which some processors reject.
  7. Empty month with a filled year, and the reverse.

Using sandbox test cards

Payment processors publish test card numbers that behave in predictable ways, including cards that trigger specific decline codes. These numbers are issued for testing only and their expiry dates can be set to any future value in the sandbox. That makes them the right tool for confirming that your form reacts to an expired date the way you expect, without touching a live account.

related article

Keep test data separate from production data. Test cards should live in your repository or test fixtures, and your sandbox keys should never be swapped into a live environment by accident.

Rules that should shape the validation

  • Reject any month outside 01 to 12 before you send a request.
  • Treat the card as valid through the final day of the expiry month, not the first day.
  • Store card data only as far as your compliance obligations allow. Sensitive authentication data such as the CVV should not be retained after authorization.
  • Return a clear error message so the customer can correct the date instead of guessing.
  • Log the validation outcome, not the card number.

What not to do

Do not run expiry tests with live card numbers or with card data that belongs to someone else. Card numbers, expiry dates, and CVV values that are traded online are stolen records, and using them is a criminal offense regardless of the reason. A card expiry test belongs in a sandbox, with data your processor gave you for exactly that purpose.

What's New

What's New

Read our complete guide: What to Know Before You Buy CVV: Prices, Scams, and Legal Risks