High Programmer > Blog Archive > Don't Be a Sucky Webmaster: Credit Card Numbers
Tuesday, January 25, 2005

Don't Be a Sucky Webmaster: Credit Card Numbers

Ever look at your credit cards? Ever notice that the number is broken into four group of four digits. Every wonder about that? It's broken up that way because it's 16 digits. Human beings are very bad at handling 16 digit numbers. Asking a human being to compare two similar 16 digit numbers by hand is a bad idea; we're likely to overlook small differences. This is why credit card numbers are broken into groups of four digits. Double-checking smaller groups is easier.

So why do most online stores require me to type my credit card number as a giant 16 digit number? Worse, if I put spaces in, I'll merrily type on, only to look up and discover that the last three digits where quietly thrown away; I'm hard limited to 16 characters. By not breaking the number into group, it's harder for me to double-check. Making it harder for me to check increases the likelihood of a problem processing my order. Problems processing my order will irritate me. Why do you want to irritate me?

My best guess is that the implementation wants the number as 16 plain digits. However, asking the user to do a stupid dance because your implementation asks for it is idiotic. This was a problem solved decades ago! It would be like the US Postal Service refusing to deliver mail unless it had the full Zip+Four. It would be like Microsoft refusing to let you visit their site because you typed "microsoft.com" instead of the more correct "http://www.microsoft.com/". If the user enters something reasonable, massage it into the specific form you need. Taking a "1234 5678 9012 3456" and turning into "1234567890123456" on your side is trivial. If you can't accomplish that you are unfit to run an electronic storefront.

Christ, please, think about your users.

(For more commentary from someone who actually makes usability a lifelong effort, see the section "Overly Restrictive Form Entry" in "Top Ten Web Mistakes of 2003." Does it really matter? "Usability for Senior Citizens" points out that people like your parents or grandparents run into exactly this problem. Both articles are from the very wise Jakob Nielsen.)

Contact webmaster