💳 BIN Checker

API Documentation

Tất cả endpoint prefix bằng /api. Bạn cũng có thể test trực tiếp trên Swagger UI.

Rate limit: 10 request/phút (lookup & validate), 20 (search), 30 (stats) — tính theo IP.
GET /api/bin/{bin_number}

Tra cứu thông tin 1 BIN. bin_number là 6-8 chữ số.

Ví dụ
curl https://binchecker-api.onrender.com/api/bin/411111

Response 200 → JSON BinResponse. 404 nếu không có. 400 nếu BIN không hợp lệ.

GET /api/bin/search

Tìm kiếm BIN với filter optional, có phân trang.

Query params:
  • brand — VISA, MASTERCARD...
  • country — ISO code (VN) hoặc tên (Vietnam)
  • bank — tìm trong tên ngân hàng
  • type — debit / credit / prepaid
  • page — mặc định 1
  • limit — mặc định 20, tối đa 100
Ví dụ
curl "https://binchecker-api.onrender.com/api/bin/search?country=VN&brand=VISA&page=1&limit=10"
POST /api/card/validate

Validate số thẻ đầy đủ qua Luhn checksum + lookup BIN.

Body: {"card_number": "4111 1111 1111 1111"}

Ví dụ
curl -X POST https://binchecker-api.onrender.com/api/card/validate \
  -H "Content-Type: application/json" \
  -d '{"card_number":"4111111111111111"}'

🔒 Số thẻ KHÔNG được lưu vào DB. Chỉ BIN (6 số đầu) được dùng để lookup.

GET /api/stats

Thống kê: tổng BIN, tổng quốc gia, top 10 ngân hàng.

Ví dụ
curl https://binchecker-api.onrender.com/api/stats
Mở Swagger UI (test interactive) →