SimpleZatcaManager class

Manager for ZATCA Phase-1 (Generation) invoicing.

Use this for merchants that have not been onboarded to FATOORA integration yet. It produces a compliant basic TLV QR code (tags 1–5) for both simplified (B2C) and standard (B2B) invoices — the QR format is identical for both.

Phase-1 has no certificates, no signing, no UBL XML, and no ZATCA API calls. If you need any of those, use ZatcaManager (Phase-2) instead.

SimpleZatcaManager.instance.initialize(
  sellerName: 'My Shop',
  sellerTRN: '300000000000003',
);

final qr = SimpleZatcaManager.instance.generateQrString(
  issueDateTime: DateTime.now(),
  totalWithVat: 115.00,
  vatTotal: 15.00,
);

Properties

hashCode int
The hash code for this object.
no setterinherited
isInitialized bool
Whether initialize has been called successfully.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

generateQrString({required DateTime issueDateTime, required double totalWithVat, required double vatTotal}) String
Generates a Phase-1 QR string (base64 of TLV tags 1–5).
generateQrStringFromInvoice(BaseInvoice invoice) String
Convenience wrapper around generateQrString that pulls the date, total, and VAT out of a BaseInvoice.
initialize({required String sellerName, required String sellerTRN}) → void
Initializes the manager with the merchant's identity.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

instance SimpleZatcaManager
The single instance of SimpleZatcaManager.
final