Skip to main content

iris_payment 0.2.0 copy "iris_payment: ^0.2.0" to clipboard
iris_payment: ^0.2.0 copied to clipboard

Greek IRIS payment QR codes for Flutter. Validate AFM tax IDs, build and parse IRIS QR data, render styled QR widgets and export them as PNG.

iris_payment #

Greek IRIS payment QR code generator for Flutter. Validate AFM (Greek VAT/Tax ID), generate IRIS-standard QR data, render payment QR codes and export them as PNG.

IRIS is Greece's instant payment system managed by DIAS Interbanking Systems. Since 1 December 2025, Greek businesses must accept IRIS payments from consumers.

Features #

  • AFM Validation - Greek VAT number (AFM) checksum verification, plus a ready TextFormField validator
  • Static QR - IRISTIN{AFM} format for physical store checkout
  • Dynamic QR - IRISCOM{UUID} format for e-commerce transactions
  • QR Parser - Parse scanned IRIS QR strings back to structured data
  • IrisQrCode Widget - Customizable QR code with colors and logo overlay, for static or dynamic QR
  • IrisPaymentCard Widget - Ready-to-use payment card with business name, all labels can be changed (Greek or any language)
  • PNG Export - Turn any IRIS QR into PNG bytes for printing, saving or sharing
  • Cross-platform - Works on Android, iOS, Web, Windows, macOS, Linux

Installation #

dependencies:
  iris_payment: ^0.2.0

Requires Flutter 3.27 or newer.

Usage #

Validate an AFM #

import 'package:iris_payment/iris_payment.dart';

// Quick check
AfmValidator.isValid('090000045'); // true

// Detailed result
final result = AfmValidator.validate('123456789');
if (!result.isValid) {
  print(result.message); // "Invalid AFM checksum"
}

// Format (strip whitespace/dashes)
AfmValidator.format('090-000-045'); // "090000045"

// In a form
TextFormField(
  validator: AfmValidator.formValidator,
)

Generate IRIS QR Data #

// Static QR for physical store (customer enters amount in bank app)
final data = IrisData.fromAfm('090000045');
print(data.qrString); // "IRISTIN090000045"

// Dynamic QR for e-commerce (amount set by payment gateway)
final tx = IrisData.fromTransactionId('52bb5e73-2ebd-4299-9ccf-e9714b9873fc');
print(tx.qrString); // "IRISCOM52bb5e73-2ebd-4299-9ccf-e9714b9873fc"

// Parse a scanned QR code
final parsed = IrisData.parse('IRISTIN090000045');
print(parsed?.type); // IrisQrType.tin
print(parsed?.afm);  // "090000045"

Display QR Code Widget #

// Simple QR code
IrisQrCode(
  afm: '090000045',
  size: 250,
)

// Customized QR code with logo
IrisQrCode(
  afm: '090000045',
  size: 300,
  foregroundColor: Colors.indigo,
  logo: Image.asset('assets/my_logo.png'),
  logoSize: 70,
)

// Dynamic QR from your payment gateway
IrisQrCode(
  data: IrisData.fromTransactionId(gatewayTransactionId),
)

// Full payment card
IrisPaymentCard(
  afm: '090000045',
  businessName: 'My Coffee Shop',
  qrSize: 200,
)

// Payment card in Greek
IrisPaymentCard(
  afm: '090000045',
  businessName: 'Καφέ Το Στέκι',
  title: 'Πληρωμή με IRIS',
  afmLabel: 'ΑΦΜ',
  scanLabel: 'Σκανάρετε για πληρωμή',
  invalidText: 'Μη έγκυρο ΑΦΜ',
)

Set scanLabel: null to hide the hint at the bottom of the card.

Export as PNG #

final bytes = await IrisData.fromAfm('090000045').toPngBytes(size: 1024);
// Save to a file, send to a receipt printer, share, etc.

toPngBytes draws a white background and a quiet zone (margin) around the code, so the image scans fine when printed.

IRIS QR Format Reference #

Type Format Use Case
Static IRISTIN{9-digit AFM} Physical store POS, printed QR
Dynamic IRISCOM{UUID} E-commerce, payment gateway generated

Static QR: The business displays a fixed QR code. Customers scan with their banking app and enter the amount themselves. Banks apply their own limits to payments to businesses (in 2026 this is usually up to 1,000 EUR per transaction).

Dynamic QR: Generated by payment gateways (Cardlink, Nexi, Viva, etc.) for each transaction. Contains a unique ID that maps to a specific amount on the gateway's backend.

AFM Checksum Algorithm #

The Greek AFM is a 9-digit number. The last digit is a check digit:

checksum = (d[0]*256 + d[1]*128 + d[2]*64 + d[3]*32 + d[4]*16 + d[5]*8 + d[6]*4 + d[7]*2) % 11 % 10

The check digit must equal d[8].

License #

MIT License - see LICENSE for details.

0
likes
160
points
14
downloads

Documentation

API reference

Publisher

verified publisherorestislef.gr

Weekly Downloads

Greek IRIS payment QR codes for Flutter. Validate AFM tax IDs, build and parse IRIS QR data, render styled QR widgets and export them as PNG.

Homepage
Repository (GitHub)
View/report issues

Topics

#payments #qrcode #greece #iris #fintech

License

MIT (license)

Dependencies

flutter, qr_flutter

More

Packages that depend on iris_payment