Where can I find magnetic strip (track) test data?

R Ghosh picture R Ghosh · May 17, 2013 · Viewed 11.5k times · Source

I have written a library of functions that parses track 1 and track 2 data from magnetic strips on cards (credit cards, IDs etc.) as per ISO/IEC 7813. I am looking to test this library rigorously against some valid (but obviously not real credit cards') track 2 data. I have only been able to find a few example strings online. My code works perfectly with those examples but id like to test different card issuers etc. to make sure the code is really ready for production. Any ideas? I know that http://www.getcreditcardnumbers.com/ offers test credit card numbers, something similar for track2 data would be ideal.

A standard track 2 string containing CC number, expiry date and other info looks something like this: ;1111222233334444=9912101xxxxxxxxxxxxx?

Answer

PaulG picture PaulG · May 17, 2013

I have this list that I generated a good few years back based on a sample pack of physical test cards that were provided by a bank I was integrating with. The list is so old some of these cards have since been rebranded (Switch is now known as Maestro for example). Hope it is of some use.

You can always mock up this data using a card number that passes/doesn't pass the luhn check

Mastercard, valid
;5301250070000191=08051010912345678901?3

Delta valid
;4539791001730106=08051010912345678901?;

Visa invalid luhn
;4100000000000000=08051010912345678901?8

JCB Valid
;3540599999991047=080501234567?8

JCB Invalid Luhn
;3540599999991043=080501234567?<

Switch Invalid Luhn
;490340439601000194=080510109123145678?;

Switch Issue 2
;6331101999990016=08051010912345678902?7

Switch Issue 3 (Test card 33)
;490303340561001048=080510109123345678?3

Switch Issue 4
;491182014290000027=080510109123445678?=

Switch Issue 5 (Test card 35)
;675938410597000022=080510109123545678?8

Switch Issue 6 (Test card 36)
;6759184500000120768=08051010912346567?4

Switch Issue 12 (Test card 31)
;5641820300097008=08051011212345678901?>

Switch (Test card 38) Start 04/04. Exp 05/08
;6333000023456788=08051010912345056781?5

Switch (Test card 41) Start 08/04. Exp 05/08
;6333000023452340=08051010912341778901?8

Switch (Test card 44)
;6333000012345679=08051010912345078901?7

Switch (test card 45)
;6759820000000019=08051010912345078901?4

Solo (Test card 55) Start 04/04. Exp 05/08
;6334520000000001=08051210912345078901?=

Solo (Test card 56) Start 04/04. Exp 05/08
;6767110000000007=08051010912345078901?<