A woman handing a customer her credit card back.

How do magnetic stripes work on credit cards

Saturday, December 05, 2015

Everyday, we make use of technological innovations that most often we can’t ourselves fully explain. Without a doubt, credit and debit cards are an example of one of these inventions, with many shoppers unaware of how the magnetic stripes (“magstripes”) found on the back of their cards provide card readers with the sensitive account information necessary to complete transactions.

Because some merchants and customers may be curious about how credit cards work, maybe for security purposes or just out of general curiosity, this article will focus on breaking down how exactly magstripes allow cards to transfer customer data with their simple and classic swipe.

What is the magnetic stripe on a credit card?

Credit cards like Visa and Mastercard aren’t the only card-based innovation that make use of magnetic stripes. Magstripes can also be found on other cards such as:

  • Hotel key cards - The hotel personnel encode the magnetic stripe once a guest checks in. The key card will then grant access only to the specified room lock.
  • Train tickets - A train ticket is encoded with information like the station at which the ticket was purchased, the date and time of purchase, etc.
  • Gift cards - The magstripe allows data to be encoded on point of sale (POS) systems. This data is then used within the software to load or reload value onto the gift cards.
  • Loyalty cards - Loyalty cards can have a variety of data encoded onto the magstripe, which allows business owners like you to apply points or offer discounts based on a customer's loyalty or purchase history.

Magstripes are typically a long black or gray rectangular bar, but can be found in essentially any color. It may be surprising to know that these bars are made out of iron and use magnetism to communicate data and account information.

These iron-based magnetic particles are incredibly small (about 20 millionths of an inch), and can all be magnetized in either a north or south pole position. It’s these mixings of pole magnetizing across the magstripe that make each card unique and provide the cardholder’s individual account information when card readers run a magnetic current through it.

Magstripe Tracks

When magstripes are first encoded with information, it typically occurs on one of three “tracks”. While it’s possible to encode information on all three tracks, most readers can only read one track at a time, and, usually, the information that one track can hold is enough to relay the necessary card data needed to fulfill the transaction.

To visualize these tracks, imagine the magstripe being broken down into three long rows along its longer side, and then sliced into dozens of vertical lines running perpendicular to the long rows. Note that we’re using “dozens” to help visualize, but it’s much more than that. First imagine the magstripe as a collection of tic-tac-toe boards; now imagine that each of the squares in our giant tic-tac-toe board is either red (for positively magnetized) or blue (for negatively magnetized).

Each of these three rows alongside the positively or negatively magnetized iron-particles that run within them make up a magstripe track.

The first track: Track 1 has a recording density of 210 bits per inch alongside a character configuration of 7 bits per character. Perhaps a more notable and understandable fact for Track 1 is that it allows for 79 alphanumeric characters to be encoded within it. This collection of characters make up the “information content” that Track 1 carries.

The second track: Track 2 has a recording density of 75 bits per inch and a character configuration of 5 bits per character. This allows for 40 numeric characters to be encoded within Track 2. Note that it’s only numeric characters this time, unlike the alphanumeric characters that Track 1 allows for.

Surprisingly, Track 2 is the main track that card readers use to complete transactions. This might seem odd as Track 1 seems like the best track given its ability to encode both numbers and alphabetical characters in addition to being able to encode a larger amount of data.

But, credit cards only need to relay numbers to initiate and complete transactions. And the amount of numbers it needs to transmit isn’t as much as you might think. Typically, most credit card transactions only require the 16 digit card number along with the 4 digit expiration date. All of this information can fit within Track 2.

If it’s a debit card, then Track 2 also holds the PIN and the CVV2 (the three digit security code on the back of credit and debit cards), although these are typically more often used for online purchases.

If it’s a store card or gift card, then they’ll just be looking for your 20-25 digit account number, in which case Track 2 can also fit this information as well.

For cards needing to relay longer or more complicated information, like perhaps security IDs, then they’ll make more use of the other two tracks.

The third track: Track 3 has a recording density of 210 bits per inch in addition to a character configuration of 5 bits per character. This track can hold 107 numeric characters, the most of the three tracks, although it is limited to numerals,

How does a magnetic stripe card work?

We’ve discussed what materials make up magstripes, and we’ve detailed out the three tracks that make them up and hold data; but how exactly do magstripes work in conjunction with card readers?

Card readers use a solenoid coil to release a magnetic current that flows onto the magstripe. This current then relays the north/south pole positions of the magnetized iron particles of a given magstripe track to a microcontroller. The microcontroller transfers this information into corresponding digital code (0s and 1s) to a computer, which then converts the data to the final correct format. The computer is then able to access a cardholder's account and verify and authorize a transaction.

How does writing information on a magnetic stripe card work?

Credit cards are fairly notorious for being rather flimsy and accruing some wear and tear over time that can make running them difficult. Furthermore, the card information encoded on credit cards can be erased if introduced to a strong enough magnetic field; and, of course, cards are also just misplaced and lost.

This problem of being able to wear down or “demagnetize” the magnetic iron particles is a big reason why chip readers, tap payments, and mobile transactions have grown in popularity.

So, given that credit cards often have to be recoded or replaced, some might be curious how information is coded onto credit cards in the first place.

Well, we already technically know the answer. We discussed earlier that magstripes carry the information they do through north/south pole magnetized iron particles. So, the real question is what device is it that sets these particles into their north/south pole positions?

Well, it’s actually the same technology used in the card reading process. In fact, encoding onto a credit card is simply the card reading process in reverse.

The cardholder's information is entered into a computer, and then converted into digital binary code (0s and 1s) and sent to the microcontroller. The microcontroller then sends a strong magnetic current to the solenoid which then places the iron magnetic particles into their corresponding north/south pole positions.

Closing thoughts

The process by which credit cards contain and transfer customer information is amazing and makes use of magnetics and a converting informational converter belt. Each time we swipe these cards, information has to be relayed and changed various times before ending up securely in merchants’ computers.

Magstripes hold many advantages and also some drawbacks. First, they’re inexpensive and easy to replicate, replace, and send out to customers. They’re also easy to use in the purchasing process and makes for an extremely streamlined and simplified checkout as compared to having to dig out cash, write a check, or enter the card information manually.

Credit cards can easily fit into pockets, wallets, and purses, and in the event they (or similar cards, like gift cards, ID cards, and room key cards) are misplaced, a new card can easily be encoded and reissued.

On the downside, credit cards are susceptible to heavy wear and tear, and just one iron-magnetic particle off kilter can make a track unusable. Cardholders may be shocked to find them erased after cards are exposed to strong magnetic fields, and may at first mistake their inability to be run with not having sufficient funds in their account or having their account closed. Additionally, credit cards are open to informational theft, and this has led to new security measures over the past decade like chip cards and tap payments replacing magstripes.

Regardless, magstripes are still used today and are heavily relied upon; and whether or not they’ll be available in credit cards for many more years to come, they're an amazing innovation with a really cool encoding and informational transferring process.

Interested in teaming up with a payment processing provider?

Every day, America’s entrepreneurs wake up and grind away at the day-to-day operations that keep their businesses afloat. But Heartland customers get a head start because they trust us to deliver a complete technology solution that makes it easier to stay competitive, connect with customers, sell more, and even manage and pay their employees. With our POS, payments and payroll technologies in place, and our people passionately committed to their success, nearly 1 million businesses have peace of mind, a growing bottom line and more time to focus on leading their businesses into the future. Learn more at heartland.us.