ramoona / banks-db Goto Github PK
View Code? Open in Web Editor NEWCommunity driven database to get bank info (name, brand color etc.) by bankcard prefix (BIN)
Home Page: https://ramoona.github.io/banks-db-demo/
Community driven database to get bank info (name, brand color etc.) by bankcard prefix (BIN)
Home Page: https://ramoona.github.io/banks-db-demo/
Hi, I wrote a small tool here (just for fun), which parses bin codes of banks and allows you filter them by country and bank name.
Perhaps this will help you include more banks.
A little later I will do a pullback with a list of Ukrainian.
I'm getting 'Forked processes must have an IPC channel' (before making any changes) which make test fail. any idea what's this about?
After #12 we should update linter to check conformity of country folder name and bank country.
// banks/fr/lcl.json
{
"name": "LCL",
"prefixes": [
497203
],
"country": "fr",
"localTitle": "LCL",
"engTitle": "LCL",
"url": "https://particuliers.secure.lcl.fr/",
"color": "#263F92"
}
This is a pretty complete list. It doesn't have brand colors or anything, but you can probably start with this and add that stuff on. It'll help complete your JSON files better.
We need usage example for PostCSS (postcss-banks-db, postcss-contrast) and Inline CSS.
There are examples of banks that no longer issue cards to customers and banks with revoked licenses. I suggest adding some flag to json to mark those banks, for example "defunct: true"
New Rockebank card uses different backend bank, so we need to add new BIN: 5321 30
We need
module.exports = [
require('./alfabank'),
require('./citibank'),
require('./mdm'),
require('./raiffeisen'),
require('./rocketbank'),
require('./sberbank'),
require('./siab'),
require('./tinkoff'),
require('./vtb24'),
require('./yandex')
];
instead of:
module.exports = [
require('./alfabank'),
require('./citibank'),
require('./mdm'),
require('./raiffeisen'),
require('./rocketbank'),
require('./sberbank'),
require('./siab'),
require('./tinkoff'),
require('./vtb24'),
require('./yandex')
];
According to http://bins.pro/search?action=searchbins&bins=54690&bank=&country= bin 54690
is ambiguous (546900 is HOIUPANK bank). I found all sberbank bins by this search request http://bins.pro/search?action=searchbins&bins=&bank=SBERBANK&country=RU - except 5 first bins all others are sberbank. And from here we can find all 5 and 6-digit bins for sberbank. I'm ready to make pull request which will fix present ambiguous bins and add all known from this database.
First issue from in-the-wild usage on Amplifr.
Sometimes cardNumber
become to undefined
in app code. And when we send undefined
to banksDB
error raises: Undefined method toString in undefined
.
Of course, it is not a banksDB
issue and can be fixed by simple user.card || ''
code. But we should care about user. More love and peace =^_^=.
I suggest to add some something like cardNumber || ''
into findBank
function.
@ramoona Amplifr needs these Sberbank commits on npm :)
// banks/fr/caisseepargne.json
{
"name": "caisseepargne",
"prefixes": [
497874
],
"country": "fr",
"localTitle": "Caisse d'Épargne",
"engTitle": "Caisse d'Épargne",
"url": "https://www.caisse-epargne.fr/",
"color": "#E2001A"
}
The following is a UK natwest card
4751 30
4751 28
Project .editorconfig
tells that every file should contains \n
at the end. It is a good practice, because cat package.json
will have better output.
But autogerenerated banks/index.js
and banks/xx/index.js
miss this \n
. GitHub even highlight it in diff.
See index.js:
const banks = [
require('./banks/alfabank'),
require('./banks/raiffeisen'),
require('./banks/sberbank'),
require('./banks/tinkoff'),
require('./banks/vtb24'),
require('./banks/mdm'),
];
Those requires bloats the main file(and it will grow in future) and create unnecessary step when adding new banks. We can either move those requires to banks/index.js (1) or just import everything from /banks directory while iterating over its files(2). Either way will make at first lint test unnecessary(YAY).
Binlist service has open data on GitHub: https://github.com/binlist/data/blob/master/ranges.csv
440753 ČSOB
543463 ČSOB
510658 Fio banka
Hi there,
Two British additions here...
TSB (FYI, Lloyds TSB have split in to two separate banks)
476367
476368
Barclaycard
492910
Looks like db in demo is outdated. For example bin 424204 is already present in database, but shows as 'unknown'.
472345... (virtual card)
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"
}
}
}
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)
there is a microservice https://binlist.net/
and it has database stored on github https://github.com/binlist/data/blob/master/ranges.csv
perhaps, you can take it
https://www.belfius.be/retail/nl/Media/Blue_SPEC_tcm_86-87518.png
Bank called "Belfius" (from Belgium) card numbers start with 6703 05
Thanks
Seems like we need to add more popular USA banks by our self. Only in this case users will trust in us and contribute.
Reddit users expect that we have AmEx, Chase, BofA, and Capital One banks.
We need to find these BINs somehow.
if (bank) {
for (const el in bank) {
result[el] = bank[el];
}
}
const
can be used in for-in
loop, so this line broke Firefox.
This issue is really critical, because 0.7 can’t be used in any production build with Firefox.
528497
www.capitecbank.co.za
Not sure about this because I couldn't find a primary source, but Wikipedia seems to think that you need all 6 digits to uniquely identify a bank: https://en.wikipedia.org/wiki/Bank_card_number.
524825 is prefix for google wallet debit card
I think this repo shoud have “See Also” or “Other Best Practices” section with links:
Like Payoneer, Revolut, ePayments.
I could to add few Payoneer and Revolut numbers but it's not Banks right?
Right now banksDB
usage code is quite big:
let bank = banksDB(uuser.card);
if ( bank.name ) {
return 'is-' + bank.country + '-' + bank.name;
} else {
return 'is-other';
}
If in findBank
function we will generate code = bank.country + '-' + bank.name
and add it to result.code
we can simplify this usage code to:
return 'is-' + (banksDB(uuser.card).code || 'other');
please add AIB bank
Maxim Melnikov found a good list of BINs: http://www.stevemorse.org/ssn/List_of_Bank_Identification_Numbers.html
We need to find a colors and copy this data to DB.
0.10.5 release is broken in Safari, because const
doesn’t work in Safari strict mode.
There are many banks that work internationally, we need to have one bank-json for bank operating in each country.
For example, there are Sberbank in CZ in BY and in RU. There is VTB in RU and BY. There are Alfabank in RU and BY.
I suggest that we create directory for each country in banks folder and put ambigous jsons here.
Non-ambigous jsons may be left where they are. We also need to adjust build scripts?
What do you think? Will PR with those changes be welcome?
Simple cards start with the following six digits:
4811 71
// banks/fr/ingdirect.json
{
"name": "ING Direct",
"prefixes": [
513625
],
"country": "fr",
"localTitle": "ING Direct",
"engTitle": "ING Direct",
"url": "http://www.ingdirect.fr/",
"color": "#FF6200"
}
Some colors use upper #FFF
, some lower case #fff
. We should add it to linter and normallize current data.
Thanks for awesome project. I think it will be even better, if we write a web service to get bank data by AJAX request.
Some sites don't get updates of npm packages during a few years - development is stopped.
They don't receive updates (e.g. just added card prefix of bank from Russian TOP-10).
Just request with a BIN is not the best way. In future by mistake it can cause sending full card number. API for downloading full DB on page loading is better (gzip work everywhere now) and then search as now - with no requests.
@ramoona What do you think? Do you need help?
This page contains a list of issuer identification numbers and to which bank or institution they are assigned.
http://www.stevemorse.org/ssn/List_of_Bank_Identification_Numbers.html
We should sort prefixes in build script. It will increase readability and allow to faster check, that prefix is already in database.
Same as in ramoona/banks-db-demo#9
If I open some web shop and on payment it shows me that caption, I may stop payment, because it's NOT MY bank!
prefixes
to bin
or iin
?brandColorPrimary
and brandColorSecondary
?A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.