Can credit card type be determined solely from the credit card number?
Is this recommended or should we always ask client for the type of credit card they\'re using?
https://binlist.net/ offers a free API. You only need to enter the first 6 or 8 digits of the card number - i.e. the Issuer Identification Numbers (IIN), previously known as Bank Identification Number (BIN).
curl -H "Accept-Version: 3" "https://lookup.binlist.net/45717360"
(cross-posted from a more specific question: How tell the difference between a Debit Card and a Credit Card )