BIN Lookup API - Dart/Flutter Client

BIN Lookup is a BIN checker API: send the first 6 to 8 digits of a payment card and get the card brand, type (debit or credit), issuing bank and country of issuance back as JSON. Check incoming cards at checkout before you charge them.

pub package License: MIT

This is the Dart/Flutter client for the BIN Lookup API.

Installation

Add this to your pubspec.yaml:

dependencies:
  apiverve_binlookup: ^1.2.3

Then run:

dart pub get
# or for Flutter
flutter pub get

Usage

import 'package:apiverve_binlookup/apiverve_binlookup.dart';

void main() async {
  final client = BinlookupClient('YOUR_API_KEY');

  try {
    final response = await client.execute({
      'bin': '448590'
    });

    print('Status: ${response.status}');
    print('Data: ${response.data}');
  } catch (e) {
    print('Error: $e');
  }
}

Response

{
  "status": "ok",
  "error": null,
  "data": {
    "bin": "448590",
    "brand": "VISA",
    "type": "CREDIT",
    "category": "PURCHASING",
    "country": "United States",
    "issuer": {
      "name": "JPMORGAN CHASE BANK, N.A.",
      "country": "United States",
      "phone": "1-800-432-3117",
      "website": "www.chase.com"
    },
    "location": {
      "latitude": "37.0902",
      "longitude": "-95.7129",
      "alpha2": "US",
      "alpha3": "USA",
      "numeric": "840",
      "currency": "USD",
      "currencies": [
        "USD"
      ],
      "flag": "🇺🇸"
    },
    "number": {
      "scheme": "visa",
      "lengths": [
        16,
        18,
        19
      ],
      "luhn": true,
      "code": {
        "name": "CVV",
        "size": 3
      }
    }
  }
}

API Reference

Authentication

All requests require an API key. Get yours at apiverve.com.

License

MIT License - see LICENSE for details.


Built with Dart for APIVerve

Libraries

apiverve_binlookup
BIN Lookup API client for Dart/Flutter