Skip to content
العربية
Invoices and support

ZatcaQr

The ZATCA QR code of a simplified tax invoice: seller, VAT number, time, total and VAT in TLV, base64 encoded. An empty seller, VAT number or time is an error. An Invoice with a QR code needs the real time of issue (timestamp).

import { ZatcaQr, zatcaTlv } from "@percentsa/ui";

Examples

AQ5QZXJjZW50IENvZmZlZQIPMzEwMTIzNDU2NzAwMDAzAxQyMDI2LTAyLTE4VDA5OjMwOjAwWgQFNjkuMDAFBDguNzQ=

Code
export function ZatcaQrExample() {
  const t = useT();
  const fields = { seller: t("Percent Coffee", "قهوة برسنت"), vatNumber: SELLER_VAT, timestamp: "2026-02-18T09:30:00Z", total: 69, vat: 8.74 };
  return (
    <Stack gap={4} align="center" className="w-full max-w-md">
      <ZatcaQr {...fields} label={t("Invoice QR code", "رمز الاستجابة السريعة للفاتورة")} size={160} className="rounded-field" />
      <Text size="xs" tone="subtle" dir="ltr" className="w-full font-mono break-all">
        {zatcaTlv(fields)}
      </Text>
    </Stack>
  );
}