ZATCA invoices in a Flutter app

By Matheel · Updated

The matheel_zatca package on pub.dev: a bilingual invoice card with the ZATCA QR drawn natively, the totals and VAT, and a button that opens the PDF.

ZATCA invoice card inside a Flutter app: the QR, totals, VAT and a View PDF button

Get it on pub.dev

1. Your server files the invoice

After a successful payment your server calls Matheel with the ready function (PHP, Laravel, Node.js, Python and more) and keeps qr and pdf with the order.

2. The app shows it

// flutter pub add matheel_zatca url_launcher
import 'package:matheel_zatca/matheel_zatca.dart';
import 'package:url_launcher/url_launcher.dart';

// invoice = what YOUR server returned after filing with Matheel: {"qr": "...", "pdf_url": "..."}
ZatcaInvoiceCard(
  qr: invoice['qr'],
  onOpenPdf: () => launchUrl(Uri.parse(invoice['pdf_url'])),
)

// Or just the fields: ZatcaQrData.decode(invoice['qr']).total

FAQ

Does the app call Matheel directly?

No. Your Matheel key stays on your server: the server files the invoice after payment, and the app gets qr and the PDF URL from it and shows them with the package.

Can ZATCA's app read the QR?

Yes. The package draws the exact TLV text Matheel returns, the same one inside the invoice, so any reader can verify it.

Can I use only the QR, without the card?

Yes: ZatcaQrImage draws the code alone, and ZatcaQrData.decode returns the seller, VAT number, time, total and VAT.

Try it now on the developer sandbox

No key, no signup: a real ZATCA answer, with the bilingual PDF and the QR.

Start Pricing