Skip to main content

apiverve_cardvalidator 1.2.4 copy "apiverve_cardvalidator: ^1.2.4" to clipboard
apiverve_cardvalidator: ^1.2.4 copied to clipboard

Card Validator is a credit card number validator API: it checks whether a card number is valid, identifies the card brand, and flags risk. It runs the Luhn checksum, detects the scheme (Visa, Masterca [...]

Card Validator API - Dart/Flutter Client #

Card Validator is a credit card number validator API: it checks whether a card number is valid, identifies the card brand, and flags risk. It runs the Luhn checksum, detects the scheme (Visa, Mastercard, Amex and more), returns the PCI-safe BIN and last 4 digits, flags known processor test cards, and returns a composite risk score.

pub package License: MIT

This is the Dart/Flutter client for the Card Validator API.

Installation #

Add this to your pubspec.yaml:

dependencies:
  apiverve_cardvalidator: ^1.2.4

Then run:

dart pub get
# or for Flutter
flutter pub get

Usage #

import 'package:apiverve_cardvalidator/apiverve_cardvalidator.dart';

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

  try {
    final response = await client.execute({
      'number': '4900264223817524'
    });

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

Response #

{
  "status": "ok",
  "error": null,
  "data": {
    "card": {
      "niceType": "Visa",
      "type": "visa",
      "patterns": [
        4
      ],
      "gaps": [
        4,
        8,
        12
      ],
      "lengths": [
        16,
        18,
        19
      ],
      "code": {
        "name": "CVV",
        "size": 3
      },
      "matchStrength": 1
    },
    "brand": "Visa",
    "cardNumber": "************7524",
    "bin": "490026",
    "last4": "7524",
    "isValid": true,
    "isPotentiallyValid": true,
    "isTestCard": false,
    "riskScore": 0,
    "riskLevel": "low"
  }
}

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

0
likes
120
points
138
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Card Validator is a credit card number validator API: it checks whether a card number is valid, identifies the card brand, and flags risk. It runs the Luhn checksum, detects the scheme (Visa, Mastercard, Amex and more), returns the PCI-safe BIN and last 4 digits, flags known processor test cards, and returns a composite risk score.

Homepage
Repository (GitHub)
View/report issues
Contributing

License

MIT (license)

Dependencies

http, http_parser

More

Packages that depend on apiverve_cardvalidator