Validating credit card number length
Effective October 16, 2009, Diners Club cards beginning with 30, 36, 38 or 39 have been processed by Discover Card.On November 3, 2014, Master Card announced that they were introducing a new series of BIN ranges that begin with a “2” (222100–272099).In the United States, IINs are also used in NCPDP pharmacy claims to identify processors, and are printed on all pharmacy insurance cards.IINs are the primary routing mechanism for real-time claims.
ABA is the Registration Authority for this standard and is responsible for allocating IINs to issuers.
The card number is usually prominently embossed on the front of a payment card, and is encoded on the magnetic stripe and chip, but may be imprinted on the back of the card.
The payment card number differs from the Business Identifier Code (BIC/ISO 9362, a normalized code—also known as Business Identifier Code, Bank International Code or SWIFT code).
Also, similar to the Master Card/Diners agreement, China Union Pay cards are now treated as Discover cards and accepted on the Discover network.
While the vast majority of Visa's account ranges describe 16 digit card numbers there are still a few account ranges (forty as of 11 December 2013) dedicated to 13 digit PANs and several (439 as of 11 Dec.