Determine credit card type by number?

后端 未结 15 2033
旧巷少年郎
旧巷少年郎 2020-11-30 19:44

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?

15条回答
  •  日久生厌
    2020-11-30 19:57

    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"

    • NPM: https://www.npmjs.com/package/binlookup
    • Source: https://github.com/paylike/binlookup

    (cross-posted from a more specific question: How tell the difference between a Debit Card and a Credit Card )

提交回复
热议问题