Skip to content

QR

C signatures use the C API. See C and C++ bindings for ownership and build instructions. The declarations below come from the generated headers. C++ exposes the same types in namespace fatoora through fatoora/Type.hpp headers.

ZATCA QR payload generation and accessors.

SignedInvoice

qr_code

Read QR payload

Read the Base64 TLV QR payload from a signed invoice.

SignedInvoice::qr_code(&self) -> &str
SignedInvoice.qr_code() -> str
#include "fatoora.h"

FatooraStatus fatoora_signed_invoice_qr_code(const FatooraSignedInvoice *self,
    char **out,
    FatooraError **error);

Errors

Errors

  • QrCodeError covers missing fields, TLV length overflow, or XML extraction failures.

Behavior

Behavior

  • QR payloads use TLV tags 1-5 for seller + totals, and tags 6-9 for hash/signature data when present.
  • The Base64-encoded payload must be 700 characters or fewer.

See also: QR Guide