| Crates.io | creditcard-identifier |
| lib.rs | creditcard-identifier |
| version | 2.3.0 |
| created_at | 2026-01-12 10:33:34.202926+00 |
| updated_at | 2026-01-15 00:52:33.640967+00 |
| description | Credit Card BIN validation using bin-cc data. Identify card brands, validate CVV codes, and check Luhn algorithm. |
| homepage | https://github.com/renatovico/bin-cc/tree/master/libs/rust |
| repository | https://github.com/renatovico/bin-cc |
| max_upload_size | |
| id | 2037448 |
| size | 41,995,948 |
Credit Card BIN validation library using bin-cc data.
Add this to your Cargo.toml:
[dependencies]
creditcard-identifier = "2.1.0"
use creditcard_identifier::*;
fn main() {
// Find brand
let brand = find_brand("4012001037141112");
println!("{:?}", brand); // Some("visa")
// Check if supported
let supported = is_supported("4012001037141112");
println!("{}", supported); // true
// Validate CVV
let valid_cvv = validate_cvv("123", "visa");
println!("{}", valid_cvv); // true
// Luhn validation
let valid_luhn = luhn("4012001037141112");
println!("{}", valid_luhn); // true
}
cargo run --example example
# Run tests
cargo test
# Run tests with output
cargo test -- --nocapture
See data/compiled/BRANDS.md for the complete list.
MIT License