Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Re: Parsing credit card track data

by mattr (Curate)
on Aug 26, 2002 at 10:49 UTC ( #192818=note: print w/replies, xml ) Need Help??

in reply to Parsing credit card track data

On the off chance that the oracle might have missed a useful Japanese page I took a swing. Found a very interesting page in Japanese which covers different standards and some history of terminals and codes. Anyway you can probably see the code names in double-width numerals even if you can't read the rest of the kanji. Certainly the MC/Cirrus logos will show up..

Basically there seem to be two major standards in Japan for the magnetic strip, JIS-I and JIS-II. I think this page is from 4 years ago. It says that II was meant for domestic use and I is the international standard, but that II was pretty much scrapped for compatibility.

JIS-I is the same as the ISO standard. Here is a brief translation of this first paragraph for JIS-I.

A. Tracks used and related standards
Credit cards use the second track part (ABA Standard = American Bankers Association Standard). The format follows the ISO standard (ISO 2894/3166/3554/4217).

Note: I looked at and 2894 is withdrawn. 3166 is the country code spec. 3554 is also withdrawn, but is the magnetic stripe encoding spec(?). 4217 is the currency code. Unfortunately it looks like they want you to pay to see the standards (jeez!). I started surfing (the sitemap) and found but it is all not very helpful. Hmpf. Maybe they should hire a programmer to provide a credit card parsing service. It is tantalizing but I must be too dense, can't find where the info is.

B. JIS-I type format
Encoded data content uses the following format.
Starting code/Bank number(maximum 19 digits)/separator/expiry date/free region/ending code/LRC, and the member number is the only decisive key used to determine the issuing bank. (Usually that is the top 3 to 6 digits, but it is allowed to be a region of up to 12 digits)

C. ISO Standard Industry Assignments(International Credit Card Assignments)
(You can probably read this table if you have an recent browser. It says what industry is what code, 0 to 9.)

Update: I found mention on the infowar ml about someone who was asking a similar question, and whether the magstripe could hold credit history info. There are machines that say they can parse, according to the oracle, but I'm not so sure the credit companies want people to know what is in there..

Here's a lousy standards-for-sale store at X9: Track 3 Data (for $40) is: - Found it by giving the oracle " magnetic".

I found a brief description of the 3 or 4 stripes and who made them at Introduction to Magnetic Stripe Cards from North Florida U. and this pdf from might actually be of some help.

Actually that last PDF is extremely detailed, but only a rough breakdown of the central field.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://192818]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (9)
As of 2017-12-12 15:09 GMT
Find Nodes?
    Voting Booth?
    What programming language do you hate the most?

    Results (335 votes). Check out past polls.