KSA E-Invoicing Compliant

E-invoicing.
Clearly connected.

The most reliable API for Phase 2 E-Invoicing in Saudi Arabia. Fully compliant, developer-friendly, and ready for production.

Seamless ZATCA Integration for Developers

JSON Validation Signed XML
Phase 2 Ready 99.99% Uptime Bank-Grade Security Explore the platform

Complete ZATCA Compliance

AVTAX Zatca Integration bridges the gap between your ERP and ZATCA.

See the four steps

100+ Validation Steps

We automatically validate your invoice against over 100 ZATCA rules before submission, ensuring high acceptance rates.

Partner Dashboard

Manage multiple EGS Units effortlessly. Create, onboard, and monitor EGS units directly via our Partners Dashboard API.

Full Cryptography

We handle the complex XML signing, SHA-256 hashing, and ECDSA signature generation required for Phase 2.

Automatic PDF/A-3

Generate ZATCA-compliant PDF/A-3 files with embedded XML directly from our API. No external tools needed.

For Developers

Powerful API Suite

Invoice APIs for submission, plus a separate API for managing partners and EGS units.

Invoice API V2

Issue B2C invoices with background reporting, clear B2B invoices before returning printable documents, and retry safely with idempotency keys. Invoice-level payable rounding and operation-status lookup are included.

Invoice API V1

The core engine. Send simple JSON, get compliant XML. Handles SubmitInvoice, validation, and reporting.

Partners Dashboard API

For platforms and ERPs. Use CreateNewEgsUnit to onboard your customers and manage their credentials programmatically.

Explore the API Reference
Invoice request

POST /api/Invoice/SubmitInvoice

Api-Version: 2.0
Idempotency-Key: example-pos-2026-000184
Authorization: Bearer YOUR_EGS_UNIT_TOKEN
Content-Type: application/json
{
  "payableRoundingAmount": 0,
  "validateWarnings": true,
  "documentType": "SimplifiedTaxInvoice",
  "invoiceIndicator": "None",
  "currency": "SAR",
  "exchangeRate": null,
  "documentIssueDateTime": "2026-07-26T19:15:00",
  "supplyDate": null,
  "buyer": null,
  "documentLineItems": [
    {
      "lineItemName": "Restaurant order",
      "lineItemPrice": 100,
      "lineItemQty": 1,
      "discountOnLineItem": 0,
      "allowanceCode": null,
      "taxCategoryCode": "S",
      "taxReasonCode": "None",
      "taxReasonDescription": null,
      "vatRateOnLineItem": 15
    }
  ],
  "referenceId": null,
  "documentId": "POS-2026-000184",
  "notes": null,
  "orderReferenceId": null,
  "documentAllowanceOrChange": null,
  "invoiceTypeReason": null,
  "payment": {
    "paymentMethod": "InCash",
    "paymentAccountIdentifier": null,
    "paymentNote": null
  },
  "prepaymentDetails": null
}

Published Swagger example. Replace the invoice number, issue date, and business values before use.

JSON request · SARRead the integration guide

Simple Authentication
Bearer Token flow
Swagger Documentation
Full OpenAPI specs available
Simulation & Production
1 Free Simulation Env per partner
PDF/A-3 Support
/PrintA3 endpoint included for Invoice V1. Invoice V2 uses /api/Invoice/{invoiceUuid}/pdf-a3.
Invoice V2 integration details

Choose your authentication

Use an EGS-unit bearer token from POST /api/UserAuthentication/LoginAsEgsUnit, or a partner bearer token from POST /api/Partner/Login. Partner-mode invoice requests also require EgsUnitClientId and EgsUnitClientSecret; omit those headers with an EGS-unit token.

Submit and retry safely

Send Api-Version: 2.0 and an 8–128 character Idempotency-Key. Retry an uncertain request with the identical JSON body and the same key. Invoice V1 remains a separate, unchanged contract.

Distinguish issuance from reporting

B2C defaults to background reporting. Set X-AVTax-Submission-Mode to wait-for-zatca to wait for the first reporting result. B2B always waits for clearance. HTTP 200 does not by itself mean B2C reporting is complete; inspect zatcaSubmissionStatus.

Keep the issued documents

Persist signedInvoiceXmlBase64, qrCodeString, invoiceUuid, and invoiceHashBase64 when returned. The API's temporary delivery copy can expire.

Operation statusGET /api/Invoice/operations/{idempotencyKey}

PDF/A-3POST /api/Invoice/{invoiceUuid}/pdf-a3

Both endpoints use Api-Version: 2.0. PDF/A-3 generation uses the exact issued XML; its UUID and hash must match the stored operation.

From JSON to ZATCA.

Submission, validation, clearance, and an optional PDF/A-3.

  1. You send a simple JSON payload to our API. No complex XML or crypto knowledge needed.

  2. We convert your JSON to UBL 2.1 XML and run 100+ ZATCA validation rules to ensure compliance.

  3. Invoice V2 returns Signed XML and QR after B2C issuance while reporting continues. B2B receives printable documents only after ZATCA clearance. Check zatcaSubmissionStatus for the authority result.

  4. Request a compliant PDF/A-3 invoice. Use our templates or send your own custom template, and we'll embed the XML for you.

Select a step to explore the workflow. This illustration does not send invoice data.

Simple, Transparent Pricing

Purchase EGS Units to scale your e-invoicing capacity.

Create your partner account

Starter

Perfect for testing and small businesses.

Free

  • 1 EGS Unit (Simulation Only)
  • 10,000 Invoices / month
  • Basic Support
  • Free Simulation Environment
Get Started

Growth

Most Popular

For growing businesses.

$300/year

  • 1 Production EGS Unit
  • 1,000 Invoices / month
  • Priority Support
  • 99.9% SLA
  • One-time consultation fee for first unit
Start Free Trial

Enterprise

For high-volume needs.

Custom

  • Multiple EGS Units
  • 10,000 Invoices / unit / month
  • Dedicated Account Manager
  • Custom SLA

Note: Each EGS Unit can process up to 10,000 standard invoices per month. Need more capacity? Purchase additional EGS Units.

Sales chat is connecting

The chat widget is still loading. Allow it in your browser, then try again.

Email info@apps-valley.net