ramoona / banks-db

Community driven database to get bank info (name, brand color etc.) by bankcard prefix (BIN)
https://ramoona.github.io/banks-db-demo/
721 stars 109 forks source link

Suggest the card type within the card number prefix data. #104

Closed hotoo closed 6 years ago

hotoo commented 8 years ago

I have a China Merchants Bank - Dual-Currency Credit Card, prefix is 5187 10, the card type is UnionPay AND MasterCard.

I find the code, types rule is write in type.js, and one card number just have one type.

So, I suggest the card type write in the card number prefix data, like:

banks/%country%/bankName.json

{
  ...,
  "prefixes": {
    "518710": {
      "types": ["UnionPay", "MasterCard"]
    },
    "622609": {
      "types": "UnionPay"
    }
  }
}

Credit Card, Savings Deposit Card, Prepaid card ...

How about to detect this?

Usually, One card is the one category of Credit Card(CC), Savings Deposit Card(DC), Prepaid Card(PC), Semi Credit Card(SCC)

ai commented 8 years ago

We already detects bank card in type.js (we don't need database for visa/mastercard detection, they have different first number)

ramoona commented 8 years ago

@hotoo according to www.bindb.com your card's type is MasterCard

hotoo commented 8 years ago

Yes, it's UnionPay AND MasterCard.

hotoo commented 8 years ago

In China, one bank card with two type is very usual.

ai commented 8 years ago

@hotoo strange. Thanks for info. Do you have any information how it works?

hotoo commented 8 years ago

As I know, it's China UnionPay cooperation with MasterCard or VISA organization.

In China, most of bank card must be type of UnionPay, but many people need MasterCard or VISA card. usually, this situation is happen to a Credit Card.

I will be read more infomation about this.

ai commented 8 years ago

@hotoo as I know bank card could have only one card number. Union Pay cards start from 62 or 88. Maybe this card numbers is only MasterCard, but Union Pay different number is encoded to chip?

ramoona commented 6 years ago

It looks like we can't detect this case. And about Credit Card, Savings Deposit Card, Prepaid card - I don't think it can be used in UI so there is no need to have it in bank data. Thanks for proposal.