emv_nfc_reader 1.0.0 copy "emv_nfc_reader: ^1.0.0" to clipboard
emv_nfc_reader: ^1.0.0 copied to clipboard

PlatformAndroid

A comprehensive Flutter plugin for reading and extracting advanced EMV data, bank details, and transaction history from NFC credit cards.

emv_nfc_reader #

A powerful Flutter plugin for reading and extracting comprehensive data from EMV (Europay, Mastercard, and Visa) NFC cards.

Features #

  • Standard Data Extraction: PAN (Card Number), Expiry Date.
  • Advanced Data Extraction:
    • Cardholder Name (from tags or Track 1 fallback).
    • Bank Details (IBAN, BIC).
    • PAN Sequence Number.
  • Usage & Security Counters:
    • Application Transaction Counter (ATC) in decimal.
    • PIN Try Counter in decimal.
    • Last Online ATC in decimal.
  • Transaction History: Extracts and parses the card's internal transaction log (Date, Time, Amount, Currency).
  • Proprietary Data: Fetches Issuer Application Data (IAD), Application Default Action (ADA), and Form Factor Indicator.
  • Robust Parsing: Handles PDOL (Processing Options Data Object List) and AFL (Application File Locator) logic automatically.

Getting Started #

Android Setup #

Add the following permission to your AndroidManifest.xml:

<uses-permission android:name="android.permission.NFC" />
<uses-feature android:name="android.hardware.nfc" android:required="false" />

Usage #

import 'package:emv_nfc_reader/emv_nfc_reader.dart';

final _emvNfcReader = EmvNfcReader();

// Start scanning for a card
try {
  final Map<String, String>? cardData = await _emvNfcReader.startReading();
  if (cardData != null) {
      print('PAN: ${cardData['pan']}');
      print('Expiry: ${cardData['expiry']}');
      print('Holder: ${cardData['cardholder']}');
      print('ATC: ${cardData['atc']}');
  }
} catch (e) {
  print('Error reading card: $e');
}

Data Fields #

The startReading() method returns a Map<String, String> containing:

Key Description
pan Formatted Card Number
expiry Expiry Date (MM/YY)
cardholder Cardholder Name
iban International Bank Account Number
atc Transaction Counter (Decimal)
pinTry PIN Attempts Remaining (Decimal)
transactions Historical transactions (formatted)
... And many more technical tags

Limitations #

  • Hardware Dependency: Requires an NFC-enabled Android device.
  • Issuer Privacy: Some banks opt-out of sharing certain fields (like IBAN or Name) via the contactless interface.
  • Security: This library cannot extract PINs or Private Keys.

License #

MIT License.

3
likes
160
points
0
downloads

Publisher

verified publisherabidiahmed.com

Weekly Downloads

A comprehensive Flutter plugin for reading and extracting advanced EMV data, bank details, and transaction history from NFC credit cards.

Repository (GitHub)
View/report issues

Topics

#nfc #emv #credit-card #payments #security

Documentation

API reference

License

MIT (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on emv_nfc_reader

Packages that implement emv_nfc_reader