M
M
mkone1122021-11-17 04:18:56
Payment systems
mkone112, 2021-11-17 04:18:56

How to reliably determine that both cards were issued by the same bank?

I have a database with card payments, which includes a field with the first six digits of bank cards. I wanted to group payments by bank, but after trying all the APIs I came across, to my surprise, I could not find a way to reliably determine that two cards were issued by the same bank.

For example, beacons 510621 and 044525444 correspond to YANDEX.MONEY NBCO LLC and YooMoney, NBCO LLC, although in fact both are Yandex money.

For bugs 413203 and 532356, the api returns the names 'RUSSIAN REGIONAL DEVELOPMENT BANK OJSC (CLOSED)' and 'JOINT-STOCK COMPANY RUSSIAN REGIONAL DEVELOPMENT BANK (RRDB)'.
At first, I decided to simply clean the returned strings from garbage like "LLC" or "JOINT STOCK COMPANY", and then compare the strings with some algorithm. The calculation of the Levenshtein distance turned out to be rather useless, as expected, after that I tried to use the Jaccard index - it got better, but it does not work 100%, because. the names of many banks may, for example, consist almost entirely of the names of the same geographical places. Some names apparently need to be translated back into Russian first, and only after comparing, for example - "POCHTA BANK" vs "POST BANK".

Those. the name comparison algorithm, if possible, will be extremely overcomplicated, and it’s not a fact that this whole construction will not start to fail in the end. Question - is there a consistent api or database with bank identifiers in nature, or some other way to easily determine that two cards were issued by the same bank?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
kisaa, 2021-11-17
@kisaa

Articles on Habré:
https://habr.com/ru/post/453672/ - CardInfo (does not work anymore)
https://habr.com/ru/post/527796/ - BinKing (more about using it in the frontend)
About your 6 digits:
https://habr.com/en/post/453672/#comment_20206912

P
Puma Thailand, 2021-11-17
@opium

These are two different companies, so then))) if about Yandex and Yuman
In general, there are not so many banks, and apparently you need to manually unify the names and then use this database for comparison
Well, you will have to unify new names once in a while

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question