6

This is a very simple question that isn't easily found on the internets.

Can a credit card cvv2 number start with a 0?

Example: 082

Common sense says no (since it's an integer and leading zeros don't change the value) but I have a report of an end-user with a 0 as the first digit.

Link to reputable documentation such as Visa or a payment processor please.

Che
  • 1,691
  • 1
  • 15
  • 8
  • I question that common sense. Even if 82 means the same as 082, they would probably print 082 to keep the number of digits fixed. A two-digit cvv2 would look more dubious to me than leading zeros. Either way, why do you care? The card issuer will validate it for you, no need to look at them yourself. – Thilo Mar 17 '11 at 01:18
  • Is it possible the end-user really has an 8 as the first digit, but part of the number has rubbed off? That happened to me once. – Charley Mar 17 '11 at 01:19
  • According to http://en.wikipedia.org/wiki/Card_Verification_Value#Generation_of_card_security_codes, various data are encrypted and then the result is converted to decimal in many cases. I'm not sure why a zero should be impossible in this case-- it just means some higher-order bits are zero. But I can't vouch for that being the case in all cards, or even any particular ones. – Platinum Azure Mar 17 '11 at 01:19
  • @Thilo I care because I want to do validation before sending to the payment processor. Regardless, its pretty clear you can have leading zeros but the lack of documentation is weird. Thanks for the feedback. – Che Mar 17 '11 at 01:44
  • I think the only you can check in the cvv2 is that the user entered all numbers. Other than that, just pass to payment processor as string. – Black Frog Mar 17 '11 at 01:51

2 Answers2

13

Yes, a credit card cvv2 number can include a zero. I do not have any documentation other than the fact that my Visa check card has the number "087". I hope this helps.

JLZenor
  • 1,460
  • 2
  • 14
  • 23
1

You're not the only person having this issue, http://forums.digitalpoint.com/showthread.php?t=152601

Although I've not found any card issuer documentation.

dotalchemy
  • 2,459
  • 19
  • 24
  • That links seems to show that people actually do have numbers starting with '0'. If those numbers are random, it should be quite frequent, too (10% of all cards). – Thilo Mar 17 '11 at 01:27
  • Yeah, well given that CVV2 expects three digits to check, and it's essentially a hash of account number / issue date etc then there's no reason why it wouldn't be a 0. OP - Bear in mind, for whatever you're coding, that Amex uses a four digit code as opposed to a three digit. You probably know this already, but just incase :) – dotalchemy Mar 17 '11 at 01:43