BINs (Bank Identification Number) are the first 6 digits of a credit card. these are being distributed around the world all the time, this gist tries to list all possible ranges for the most common brazilian credit cards. Please help me keep it updated 😄
note: All length
fields refer to the max length
- https://www.bincodes.com/bin-list/
- https://gist.github.com/erikhenrique/5931368
- https://www.getnewidentity.com/diners-club-credit-card.php
- https://www.bincodes.com/bank-creditcard-generator/
- Special thanks to @casadogg for compiling the regex
- Regex:
^4\d{5}
- Card Number Length: 13, 16, 19
- Security Length: 3
- Range: 4xxxxx
- Regex:
^(5[1-5]\d{4}|2(2(2[1-9]\d{2}|[3-9]\d{3})|[3-6]\d{4}|7([01]\d{3}|20\d{2})))
- Card Number Length: 16
- Security Length: 3
- Range: 51xxxx ~ 55xxxx, 2221xx ~ 2720xx
- Regex:
^3[47]\d{4}
- Card Number Length: 15
- Security Length: 4
- Range: 34xxxx, 37xxxx
- Regex:
^(?:3841[046]0|6(?:06282|37(?:095|5(?:68|99)|6(?:09|12))))
- Card Number Length: 14, 16
- Security Length: 3
- Range: 384100, 384140, 384160, 606282, 637095, 637568, 637599, 637609, 637612
- Regex:
^3[689]\d{4}
- Card Number Length: 14
- Security Length: 3
- Range: 36xxxx, 38xxxx, 39xxxx
- Regex:
^(4(0117[89]|3(1274|8935)|5(1416|7(393|63[12])))|50(4175|6(699|7([0-6]\d|7[0-8]))|9\d{3})|6(27780|36(297|368)|5(0(0(3[1-35-9]|4\d|5[01])|4(0[5-9]|([1-3]\d|8[5-9]|9\d))|5([0-2]\d|3[0-8]|4[1-9]|[5-8]\d|9[0-8])|7(0\d|1[0-8]|2[0-7])|9(0[1-9]|[1-6]\d|7[0-8]))|16(5[2-9]|[67]\d)|50([01]\d|2[1-9]|[34]\d|5[0-8]))))
- Card Number Length: 16
- Security Length: 3
- Range: 401178, 401179, 431274, 438935, 451416, 457393, 457631, 457632, 504175, 506699 ~ 506778, 509000 ~ 509999, 627780, 636297, 636368, 650031 ~ 650033, 650035 ~ 650051, 650405 ~ 650439, 650485 ~ 650538, 650541 ~ 650598, 650700 ~ 650718, 650720 ~ 650727, 650901 ~ 650978, 651652 ~ 651679, 655000 ~ 655019, 655021 ~ 655058
Bro you saved me, thanks