ZATCA Phase 2

E-Invoice Onboarding & Submission Portal

Test CSR Generation, Compliance CSID, and Real-time XML Submission to ZATCA.

Target Endpoint: /Zatca/SubmitInvoicetoZatca
1

Onboarding & API Settings

Must be exactly 15 digits starting with 3.
OTP generated from Fatoora Portal.
2

Sequence & Time Metadata

3

Seller Party Details (KSA Entity)

4

Buyer Party Details (Customer)

5

Invoice Line Items

ID Item Description Qty Unit Unit Price VAT % Action
Endpoint Response Console
// Submit the form on the left to see the direct response from your API...

ℹ️ ZATCA Parameter Reference Guide

A breakdown of required fields and types for third-party developers calling this API.

OnboardRequest.Otp

The 6-digit One-Time Password requested from the Fatoora portal. Required to issue the initial Compliance CSID.

icv (Invoice Counter Value)

Sequential index integer tracking invoices per device. Must match your sequence sequence database counter.

pih (Previous Invoice Hash)

Base64 SHA-256 hash of the preceding invoice XML. For icv = 1, use the default PIH: NWZlY2ViNjZmZmM4NmYzOGQ5NTI3ODZjNmQ2OTZjNzljMmRiYzIzOWRkNGU5MWI0NjcyOWQ3M2EyN2ZiNTdlOQ==

InvoiceSubmissionModel.APIType

Values: "clearance" (B2B invoices subjected to upfront verification) or "reporting" (B2C invoices reported within 24h).

LineItem.TaxPercent

Standard rate in KSA is 15.00%. Must be formatted to two decimal points in the generated XML structure.