Build a ZATCA QR (TLV) payload
zatca_qr_encodeEncode the five phase-1 fields (plus optional phase-2 hash/signature/key tags) into the base64 TLV string that goes into the QR image and the UBL QR reference. Free. Response: result with verdict (ACCEPTED | ACCEPTED_WITH_WARNINGS | REJECTED), findings[] (id, severity, message, fields, location, fix_hint, source = xsd | schematron | preflight), counts, ruleset version and timings, plus data_confidence, estimated_items[], sources[], data_version, warnings[] and a disclaimer. Documents are validated in memory and never stored or logged.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| timestamp | Yes | ISO 8601, e.g. 2026-10-31T14:05:00Z | |
| vat_total | Yes | e.g. '150.00' | |
| public_key | No | Base64 (phase 2). | |
| vat_number | Yes | KSA VAT number: 15 digits, starts and ends with 3. | |
| seller_name | Yes | ||
| invoice_hash | No | Base64 SHA-256 of the invoice (phase 2). | |
| total_with_vat | Yes | e.g. '1150.00' | |
| ecdsa_signature | No | Base64 (phase 2). | |
| certificate_signature | No | Base64 (phase 2, simplified invoices). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||