Skip to main content
This flow requires a party that has completed registration. The same workflow handles both models. Invopop picks clearance or reporting from the invoice itself.
Saudi Arabia runs two e-invoicing flows, and both are driven by the same GOBL invoice with the ZATCA add-on. A single send workflow converts the document to UBL 2.1, chains it, signs it, and submits it to the right ZATCA endpoint:
FlowInvoices
ClearanceStandard tax invoices (B2B, B2G)
ReportingSimplified tax invoices (B2C)

Sending

The send workflow claims the next ICV, builds and hashes the UBL document, signs it and generates the QR (for simplified invoices), submits to ZATCA and then stores the final XML and QR back on the silo entry.

How it works

1

Set State → processing

Moves the invoice into a visible “in progress” state for operator dashboards.
2

Send to ZATCA

Converts the GOBL invoice to UBL 2.1, adds the ICV and PIH chain values, hashes the document, and submits it to the clearance or reporting flows.
3

Set State → sent

Marks the invoice as successfully cleared or reported.

Saudi Arabia send invoice workflow

Clears standard invoices and reports simplified invoices to ZATCA.
An invoice that is already signed is skipped as “already sent”.

Credit and debit notes

Issued invoices cannot be cancelled or edited once cleared or reported. Corrections are made with credit notes (reduction) or debit notes (increase) that reference the original invoice. A note flows through the same clearance or reporting model as the document it corrects, using the same send workflow.

Example invoices

Every example pairs the minimal hand-authored GOBL input with the built version produced by gobl build. All carry the sa-zatca-v1 add-on. Standard invoices are cleared; simplified invoices are reported. Standard tax invoices (clearance)
A standard tax invoice between two VAT-registered parties, billed at the 15% standard rate. This is the baseline document cleared with ZATCA before it is shared with the buyer.
{
	"$schema": "https://gobl.org/draft-0/bill/invoice",
	"$addons": [
		"sa-zatca-v1"
	],
	"uuid": "3aea7b56-59d8-4beb-90bd-f8f280d852a0",
	"issue_date": "2022-02-01",
	"issue_time": "12:00:00",
	"code": "SAMPLE-001",
	"type": "standard",
	"regime": "SA",
	"supplier": {
		"tax_id": {
			"country": "SA",
			"code": "312345678912343"
		},
		"name": "Acme Corp Saudi",
		"identities": [
			{
				"type": "CRN",
				"code": "1234567890"
			}
		],
		"addresses": [
			{
				"street": "King Fahd Road",
				"street_extra": "Al Olaya",
				"num": "1234",
				"locality": "Riyadh",
				"region": "Riyadh",
				"code": "12345",
				"country": "SA"
			}
		]
	},
	"customer": {
		"identities": [
			{
				"type": "TIN",
				"code": "123456789012345"
			}
		],
		"name": "Sample Consumer LLC",
		"addresses": [
			{
				"street": "Olaya Street",
				"street_extra": "Al Malaz",
				"num": "5678",
				"locality": "Riyadh",
				"region": "Riyadh",
				"code": "54321",
				"country": "SA"
			}
		]
	},
	"delivery": {
		"date": "2022-02-01",
		"period": {
			"start": "2022-02-01",
			"end": "2022-02-28"
		}
	},
	"payment": {
		"instructions": {
			"key": "credit-transfer"
		},
		"terms": {
			"notes": "Payment due within 30 days"
		}
	},
	"lines": [
		{
			"quantity": 20,
			"item": {
				"name": "Development services",
				"price": "90.00",
				"unit": "h"
			},
			"taxes": [
				{
					"cat": "VAT",
					"rate": "standard"
				}
			]
		}
	]
}
A credit note that reduces a previously cleared standard invoice. The preceding block links it to the original document.
{
	"$schema": "https://gobl.org/draft-0/bill/invoice",
	"$addons": [
		"sa-zatca-v1"
	],
	"uuid": "a1b2c3d4-1111-4aaa-bbbb-000000000001",
	"type": "credit-note",
	"issue_date": "2022-03-01",
	"issue_time": "10:00:00",
	"series": "CN",
	"code": "CN-001",
	"regime": "SA",
	"preceding": [
		{
			"series": "",
			"code": "SAMPLE-001",
			"issue_date": "2022-02-01",
			"reason": "Return of development services"
		}
	],
	"supplier": {
		"tax_id": {
			"country": "SA",
			"code": "312345678912343"
		},
		"name": "Acme Corp Saudi",
		"identities": [
			{
				"type": "CRN",
				"code": "1234567890"
			}
		],
		"addresses": [
			{
				"street": "King Fahd Road",
				"street_extra": "Al Olaya",
				"num": "1234",
				"locality": "Riyadh",
				"region": "Riyadh",
				"code": "12345",
				"country": "SA"
			}
		]
	},
	"customer": {
		"identities": [
			{
				"type": "TIN",
				"code": "123456789012345"
			}
		],
		"name": "Sample Consumer LLC",
		"addresses": [
			{
				"street": "Olaya Street",
				"street_extra": "Al Malaz",
				"num": "5678",
				"locality": "Riyadh",
				"region": "Riyadh",
				"code": "54321",
				"country": "SA"
			}
		]
	},
	"delivery": {
		"date": "2022-03-01",
		"period": {
			"start": "2022-02-01",
			"end": "2022-02-28"
		}
	},
	"payment": {
		"instructions": {
			"key": "credit-transfer"
		},
		"terms": {
			"notes": "Refund within 14 days"
		}
	},
	"lines": [
		{
			"quantity": 5,
			"item": {
				"name": "Development services",
				"price": "90.00",
				"unit": "h"
			},
			"taxes": [
				{
					"cat": "VAT",
					"rate": "standard"
				}
			]
		}
	]
}
A debit note that increases the value of a previously cleared standard invoice, referencing the original in preceding.
{
	"$schema": "https://gobl.org/draft-0/bill/invoice",
	"$addons": [
		"sa-zatca-v1"
	],
	"uuid": "a1b2c3d4-2222-4aaa-bbbb-000000000002",
	"type": "debit-note",
	"issue_date": "2022-03-01",
	"issue_time": "10:00:00",
	"series": "DN",
	"code": "DN-001",
	"regime": "SA",
	"preceding": [
		{
			"series": "",
			"code": "SAMPLE-001",
			"issue_date": "2022-02-01",
			"reason": "Price adjustment for development services"
		}
	],
	"supplier": {
		"tax_id": {
			"country": "SA",
			"code": "312345678912343"
		},
		"name": "Acme Corp Saudi",
		"identities": [
			{
				"type": "CRN",
				"code": "1234567890"
			}
		],
		"addresses": [
			{
				"street": "King Fahd Road",
				"street_extra": "Al Olaya",
				"num": "1234",
				"locality": "Riyadh",
				"region": "Riyadh",
				"code": "12345",
				"country": "SA"
			}
		]
	},
	"customer": {
		"identities": [
			{
				"type": "TIN",
				"code": "123456789012345"
			}
		],
		"name": "Sample Consumer LLC",
		"addresses": [
			{
				"street": "Olaya Street",
				"street_extra": "Al Malaz",
				"num": "5678",
				"locality": "Riyadh",
				"region": "Riyadh",
				"code": "54321",
				"country": "SA"
			}
		]
	},
	"delivery": {
		"date": "2022-03-01",
		"period": {
			"start": "2022-02-01",
			"end": "2022-02-28"
		}
	},
	"payment": {
		"instructions": {
			"key": "credit-transfer"
		},
		"terms": {
			"notes": "Payment due within 30 days"
		}
	},
	"lines": [
		{
			"quantity": 5,
			"item": {
				"name": "Development services",
				"price": "90.00",
				"unit": "h"
			},
			"taxes": [
				{
					"cat": "VAT",
					"rate": "standard"
				}
			]
		}
	]
}
An export to a customer outside the GCC, taxed at the zero rate. Exports carry an exemption reason and are reported with the export tag.
{
	"$schema": "https://gobl.org/draft-0/bill/invoice",
	"$addons": [
		"sa-zatca-v1"
	],
	"uuid": "3aea7b56-59d8-4beb-90bd-f8f280d852d0",
	"issue_date": "2022-02-01",
	"issue_time": "12:00:00",
	"code": "SAMPLE-EX-001",
	"type": "standard",
	"regime": "SA",
	"$tags": [
		"export"
	],
	"supplier": {
		"tax_id": {
			"country": "SA",
			"code": "312345678912343"
		},
		"name": "Acme Corp Saudi",
		"identities": [
			{
				"type": "CRN",
				"code": "1234567890"
			}
		],
		"addresses": [
			{
				"street": "King Fahd Road",
				"street_extra": "Al Olaya",
				"num": "1234",
				"locality": "Riyadh",
				"region": "Riyadh",
				"code": "12345",
				"country": "SA"
			}
		]
	},
	"customer": {
		"name": "Global Importers Ltd",
		"identities": [
			{
				"type": "PAS",
				"code": "X1234567"
			}
		],
		"addresses": [
			{
				"street": "Sheikh Zayed Road",
				"num": "100",
				"locality": "Dubai",
				"code": "00000",
				"country": "AE"
			}
		]
	},
	"delivery": {
		"date": "2022-02-01",
		"period": {
			"start": "2022-02-01",
			"end": "2022-02-28"
		}
	},
	"payment": {
		"instructions": {
			"key": "credit-transfer"
		},
		"terms": {
			"notes": "Payment due within 30 days"
		}
	},
	"lines": [
		{
			"quantity": 20,
			"item": {
				"name": "Development services",
				"price": "90.00",
				"unit": "h"
			},
			"taxes": [
				{
					"cat": "VAT",
					"rate": "zero",
					"ext": {
						"untdid-tax-category": "Z",
						"cef-vatex": "VATEX-SA-32"
					}
				}
			]
		}
	]
}
A nominal (deemed) supply — goods or services provided without a monetary charge but still subject to VAT.
{
	"$schema": "https://gobl.org/draft-0/bill/invoice",
	"$addons": [
		"sa-zatca-v1"
	],
	"uuid": "3aea7b56-59d8-4beb-90bd-f8f280d852c0",
	"issue_date": "2022-02-01",
	"issue_time": "12:00:00",
	"code": "SAMPLE-NM-001",
	"type": "standard",
	"regime": "SA",
	"$tags": [
		"nominal"
	],
	"supplier": {
		"tax_id": {
			"country": "SA",
			"code": "312345678912343"
		},
		"name": "Acme Corp Saudi",
		"identities": [
			{
				"type": "CRN",
				"code": "1234567890"
			}
		],
		"addresses": [
			{
				"street": "King Fahd Road",
				"street_extra": "Al Olaya",
				"num": "1234",
				"locality": "Riyadh",
				"region": "Riyadh",
				"code": "12345",
				"country": "SA"
			}
		]
	},
	"customer": {
		"identities": [
			{
				"type": "TIN",
				"code": "123456789012345"
			}
		],
		"name": "Sample Consumer LLC",
		"addresses": [
			{
				"street": "Olaya Street",
				"street_extra": "Al Malaz",
				"num": "5678",
				"locality": "Riyadh",
				"region": "Riyadh",
				"code": "54321",
				"country": "SA"
			}
		]
	},
	"delivery": {
		"date": "2022-02-01",
		"period": {
			"start": "2022-02-01",
			"end": "2022-02-28"
		}
	},
	"payment": {
		"instructions": {
			"key": "credit-transfer"
		},
		"terms": {
			"notes": "Payment due within 30 days"
		}
	},
	"lines": [
		{
			"quantity": 20,
			"item": {
				"name": "Development services",
				"price": "90.00",
				"unit": "h"
			},
			"taxes": [
				{
					"cat": "VAT",
					"rate": "standard"
				}
			]
		}
	]
}
A self-billed invoice, where the customer issues the document on the supplier’s behalf under a self-billing agreement.
{
	"$schema": "https://gobl.org/draft-0/bill/invoice",
	"$addons": [
		"sa-zatca-v1"
	],
	"uuid": "3aea7b56-59d8-4beb-90bd-f8f280d853a1",
	"issue_date": "2024-06-15",
	"issue_time": "12:00:00",
	"code": "SAMPLE-SB-001",
	"type": "standard",
	"regime": "SA",
	"$tags": [
		"self-billed"
	],
	"supplier": {
		"tax_id": {
			"country": "SA",
			"code": "312345678912343"
		},
		"name": "Acme Corp Saudi",
		"identities": [
			{
				"type": "CRN",
				"code": "1234567890"
			}
		],
		"addresses": [
			{
				"street": "King Fahd Road",
				"street_extra": "Al Olaya",
				"num": "1234",
				"locality": "Riyadh",
				"region": "Riyadh",
				"code": "12345",
				"country": "SA"
			}
		]
	},
	"customer": {
		"tax_id": {
			"country": "SA",
			"code": "399999999900003"
		},
		"identities": [
			{
				"type": "CRN",
				"code": "123456789012345"
			}
		],
		"name": "Sample Consumer LLC",
		"addresses": [
			{
				"street": "Olaya Street",
				"street_extra": "Al Malaz",
				"num": "5678",
				"locality": "Riyadh",
				"region": "Riyadh",
				"code": "54321",
				"country": "SA"
			}
		]
	},
	"delivery": {
		"date": "2024-06-15",
		"period": {
			"start": "2024-06-01",
			"end": "2024-06-30"
		}
	},
	"payment": {
		"instructions": {
			"key": "credit-transfer"
		},
		"terms": {
			"notes": "Payment due within 30 days"
		}
	},
	"lines": [
		{
			"quantity": 20,
			"item": {
				"name": "Development services",
				"price": "90.00",
				"unit": "h"
			},
			"taxes": [
				{
					"cat": "VAT",
					"rate": "standard"
				}
			]
		}
	]
}
An invoice issued by an authorised third party on behalf of the supplier.
{
	"$schema": "https://gobl.org/draft-0/bill/invoice",
	"$addons": [
		"sa-zatca-v1"
	],
	"uuid": "3aea7b56-59d8-4beb-90bd-f8f280d852b0",
	"issue_date": "2022-02-01",
	"issue_time": "12:00:00",
	"code": "SAMPLE-TP-001",
	"type": "standard",
	"regime": "SA",
	"$tags": [
		"third-party"
	],
	"supplier": {
		"tax_id": {
			"country": "SA",
			"code": "312345678912343"
		},
		"name": "Acme Corp Saudi",
		"identities": [
			{
				"type": "CRN",
				"code": "1234567890"
			}
		],
		"addresses": [
			{
				"street": "King Fahd Road",
				"street_extra": "Al Olaya",
				"num": "1234",
				"locality": "Riyadh",
				"region": "Riyadh",
				"code": "12345",
				"country": "SA"
			}
		]
	},
	"customer": {
		"identities": [
			{
				"type": "TIN",
				"code": "123456789012345"
			}
		],
		"name": "Sample Consumer LLC",
		"addresses": [
			{
				"street": "Olaya Street",
				"street_extra": "Al Malaz",
				"num": "5678",
				"locality": "Riyadh",
				"region": "Riyadh",
				"code": "54321",
				"country": "SA"
			}
		]
	},
	"delivery": {
		"date": "2022-02-01",
		"period": {
			"start": "2022-02-01",
			"end": "2022-02-28"
		}
	},
	"payment": {
		"instructions": {
			"key": "credit-transfer"
		},
		"terms": {
			"notes": "Payment due within 30 days"
		}
	},
	"lines": [
		{
			"quantity": 20,
			"item": {
				"name": "Development services",
				"price": "90.00",
				"unit": "h"
			},
			"taxes": [
				{
					"cat": "VAT",
					"rate": "standard"
				}
			]
		}
	]
}
An invoice issued in USD. The VAT amount must also be expressed in SAR, converted at the SAMA rate on the supply date.
{
	"$schema": "https://gobl.org/draft-0/bill/invoice",
	"$addons": [
		"sa-zatca-v1"
	],
	"uuid": "3aea7b56-59d8-4beb-90bd-f8f280d852a0",
	"currency": "USD",
	"issue_date": "2022-02-01",
	"issue_time": "12:00:00",
	"code": "SAMPLE-001",
	"regime": "SA",
	"exchange_rates": [
		{
			"from": "USD",
			"to": "SAR",
			"amount": 3.75
		}
	],
	"supplier": {
		"tax_id": {
			"country": "SA",
			"code": "312345678912343"
		},
		"name": "Acme Corp Saudi",
		"identities": [
			{
				"type": "CRN",
				"code": "1234567890"
			}
		],
		"addresses": [
			{
				"street": "King Fahd Road",
				"street_extra": "Al Olaya",
				"num": "1234",
				"locality": "Riyadh",
				"region": "Riyadh",
				"code": "12345",
				"country": "SA"
			}
		]
	},
	"customer": {
		"identities": [
			{
				"type": "TIN",
				"code": "123456789012345"
			}
		],
		"name": "Sample Consumer LLC",
		"addresses": [
			{
				"street": "Olaya Street",
				"street_extra": "Al Malaz",
				"num": "5678",
				"locality": "Riyadh",
				"region": "Riyadh",
				"code": "54321",
				"country": "SA"
			}
		]
	},
	"delivery": {
		"date": "2022-02-01",
		"period": {
			"start": "2022-02-01",
			"end": "2022-02-28"
		}
	},
	"payment": {
		"instructions": {
			"key": "credit-transfer"
		},
		"terms": {
			"notes": "Payment due within 30 days"
		}
	},
	"lines": [
		{
			"quantity": 20,
			"item": {
				"name": "Development services",
				"price": "90.00",
				"unit": "h"
			},
			"taxes": [
				{
					"cat": "VAT",
					"rate": "standard"
				}
			]
		}
	]
}
A summary credit note that corrects one or more preceding invoices in a single document, tagged summary.
{
	"$schema": "https://gobl.org/draft-0/bill/invoice",
	"$addons": [
		"sa-zatca-v1"
	],
	"uuid": "8a51fd30-2a27-11ee-be56-0242ac120003",
	"issue_date": "2024-02-05",
	"issue_time": "09:30:00",
	"series": "CN",
	"code": "SAMPLE-CN-001",
	"regime": "SA",
	"type": "credit-note",
	"$tags": [
		"summary"
	],
	"preceding": [
		{
			"series": "INV",
			"code": "SAMPLE-001",
			"issue_date": "2024-01-31",
			"reason": "Partial return of services after monthly close — discount applied per agreement BR-2024-AC-12",
			"type": "standard"
		}
	],
	"notes": [
		{
			"key": "general",
			"text": "Monthly summary credit note covering January 2024 adjustments."
		},
		{
			"key": "reason",
			"text": "Customer returned 5 hours of consultancy and the office equipment delivered on 28 Jan."
		}
	],
	"supplier": {
		"name": "Acme Corp Saudi LLC",
		"alias": "Acme SA",
		"tax_id": {
			"country": "SA",
			"code": "312345678912343"
		},
		"identities": [
			{
				"type": "SAG",
				"code": "1010101010"
			}
		],
		"people": [
			{
				"name": {
					"given": "Yara",
					"surname": "Al-Harbi",
					"prefix": "Eng."
				},
				"role": "Billing Manager"
			}
		],
		"emails": [
			{
				"addr": "billing@acme.sa"
			}
		],
		"telephones": [
			{
				"num": "+966112345678",
				"label": "office"
			}
		],
		"addresses": [
			{
				"street": "King Fahd Road",
				"street_extra": "Al Olaya",
				"num": "1234",
				"locality": "Riyadh",
				"region": "Riyadh",
				"code": "12345",
				"country": "SA"
			}
		]
	},
	"customer": {
		"name": "Sample Consumer LLC",
		"identities": [
			{
				"type": "CRN",
				"code": "2020202020"
			}
		],
		"emails": [
			{
				"addr": "ap@sample-consumer.sa"
			}
		],
		"addresses": [
			{
				"street": "Olaya Street",
				"street_extra": "Al Malaz",
				"num": "5678",
				"locality": "Riyadh",
				"region": "Riyadh",
				"code": "54321",
				"country": "SA"
			}
		]
	},
	"delivery": {
		"date": "2024-01-31",
		"period": {
			"start": "2024-01-01",
			"end": "2024-01-31"
		}
	},
	"payment": {
		"instructions": {
			"key": "credit-transfer",
			"detail": "Refund via SEPA-equivalent local transfer",
			"credit_transfer": [
				{
					"iban": "SA4420000001234567891234",
					"bic": "RJHISARIXXX",
					"name": "Sample Consumer LLC — Refund Account"
				}
			]
		},
		"terms": {
			"notes": "Refund to be processed within 14 days of receipt."
		}
	},
	"lines": [
		{
			"i": 1,
			"quantity": 5,
			"item": {
				"name": "Development services",
				"ref": "SVC-DEV-01",
				"price": "120.00",
				"unit": "h"
			},
			"sum": "600.00",
			"discounts": [
				{
					"percent": "10%",
					"reason": "Loyalty discount adjustment"
				}
			],
			"taxes": [
				{
					"cat": "VAT",
					"rate": "standard"
				}
			],
			"total": "540.00"
		},
		{
			"i": 2,
			"quantity": 1,
			"item": {
				"name": "Office desk return",
				"ref": "ITM-DESK-01",
				"price": "850.00",
				"unit": "one"
			},
			"sum": "850.00",
			"taxes": [
				{
					"cat": "VAT",
					"rate": "standard"
				}
			],
			"total": "850.00"
		},
		{
			"i": 3,
			"quantity": 2,
			"item": {
				"name": "Domestic flights for cancelled visit",
				"ref": "TRV-FLT-01",
				"price": "300.00",
				"unit": "one"
			},
			"sum": "600.00",
			"taxes": [
				{
					"cat": "VAT",
					"rate": "zero",
					"ext": {
						"untdid-tax-category": "Z",
						"cef-vatex": "VATEX-SA-32"
					}
				}
			],
			"total": "600.00"
		}
	],
	"charges": [
		{
			"reason": "Restocking and handling fee",
			"amount": "50.00",
			"taxes": [
				{
					"cat": "VAT",
					"rate": "standard"
				}
			]
		}
	]
}
Simplified tax invoices (reporting)
A simplified tax invoice for a consumer sale. It is signed and stamped locally with the Production CSID, delivered immediately, and reported to ZATCA within 24 hours.
{
	"$schema": "https://gobl.org/draft-0/bill/invoice",
	"$addons": [
		"sa-zatca-v1"
	],
	"uuid": "3aea7b56-59d8-4beb-90bd-f8f280d852a0",
	"issue_date": "2022-02-01",
	"issue_time": "12:00:00",
	"code": "SAMPLE-001",
	"regime": "SA",
	"type": "standard",
	"$tags": [
		"simplified"
	],
	"supplier": {
		"tax_id": {
			"country": "SA",
			"code": "312345678912343"
		},
		"identities": [
			{
				"type": "MLS",
				"code": "1234567890"
			}
		],
		"name": "Acme Corp Saudi",
		"addresses": [
			{
				"street": "King Fahd Road",
				"street_extra": "Al Olaya",
				"num": "1234",
				"locality": "Riyadh",
				"region": "Riyadh",
				"code": "12345",
				"country": "SA"
			}
		]
	},
	"customer": {
		"name": "Sample Consumer LLC",
		"addresses": [
			{
				"street": "Olaya Street",
				"street_extra": "Al Malaz",
				"num": "5678",
				"locality": "Riyadh",
				"region": "Riyadh",
				"code": "54321",
				"country": "SA"
			}
		]
	},
	"delivery": {
		"date": "2022-02-01",
		"period": {
			"start": "2022-02-01",
			"end": "2022-02-28"
		}
	},
	"payment": {
		"instructions": {
			"key": "credit-transfer"
		},
		"terms": {
			"notes": "Payment due within 30 days"
		}
	},
	"lines": [
		{
			"quantity": 20,
			"item": {
				"name": "Development services",
				"price": "90.00",
				"unit": "h"
			},
			"taxes": [
				{
					"cat": "VAT",
					"rate": "standard"
				}
			]
		}
	]
}
A credit note reducing a previously reported simplified invoice.
{
	"$schema": "https://gobl.org/draft-0/bill/invoice",
	"$addons": [
		"sa-zatca-v1"
	],
	"uuid": "a1b2c3d4-3333-4aaa-bbbb-000000000003",
	"type": "credit-note",
	"issue_date": "2022-03-01",
	"issue_time": "10:00:00",
	"series": "CN",
	"code": "CN-001",
	"regime": "SA",
	"$tags": [
		"simplified"
	],
	"preceding": [
		{
			"series": "",
			"code": "SAMPLE-001",
			"issue_date": "2022-02-01",
			"reason": "Return of development services"
		}
	],
	"supplier": {
		"tax_id": {
			"country": "SA",
			"code": "312345678912343"
		},
		"identities": [
			{
				"type": "MLS",
				"code": "1234567890"
			}
		],
		"name": "Acme Corp Saudi",
		"addresses": [
			{
				"street": "King Fahd Road",
				"street_extra": "Al Olaya",
				"num": "1234",
				"locality": "Riyadh",
				"region": "Riyadh",
				"code": "12345",
				"country": "SA"
			}
		]
	},
	"customer": {
		"name": "Sample Consumer LLC",
		"addresses": [
			{
				"street": "Olaya Street",
				"street_extra": "Al Malaz",
				"num": "5678",
				"locality": "Riyadh",
				"region": "Riyadh",
				"code": "54321",
				"country": "SA"
			}
		]
	},
	"delivery": {
		"date": "2022-03-01",
		"period": {
			"start": "2022-02-01",
			"end": "2022-02-28"
		}
	},
	"payment": {
		"instructions": {
			"key": "credit-transfer"
		},
		"terms": {
			"notes": "Refund within 14 days"
		}
	},
	"lines": [
		{
			"quantity": 5,
			"item": {
				"name": "Development services",
				"price": "90.00",
				"unit": "h"
			},
			"taxes": [
				{
					"cat": "VAT",
					"rate": "standard"
				}
			]
		}
	]
}
A debit note increasing the value of a previously reported simplified invoice.
{
	"$schema": "https://gobl.org/draft-0/bill/invoice",
	"$addons": [
		"sa-zatca-v1"
	],
	"uuid": "a1b2c3d4-4444-4aaa-bbbb-000000000004",
	"type": "debit-note",
	"issue_date": "2022-03-01",
	"issue_time": "10:00:00",
	"series": "DN",
	"code": "DN-001",
	"regime": "SA",
	"$tags": [
		"simplified"
	],
	"preceding": [
		{
			"series": "",
			"code": "SAMPLE-001",
			"issue_date": "2022-02-01",
			"reason": "Price adjustment for development services"
		}
	],
	"supplier": {
		"tax_id": {
			"country": "SA",
			"code": "312345678912343"
		},
		"identities": [
			{
				"type": "MLS",
				"code": "1234567890"
			}
		],
		"name": "Acme Corp Saudi",
		"addresses": [
			{
				"street": "King Fahd Road",
				"street_extra": "Al Olaya",
				"num": "1234",
				"locality": "Riyadh",
				"region": "Riyadh",
				"code": "12345",
				"country": "SA"
			}
		]
	},
	"customer": {
		"name": "Sample Consumer LLC",
		"addresses": [
			{
				"street": "Olaya Street",
				"street_extra": "Al Malaz",
				"num": "5678",
				"locality": "Riyadh",
				"region": "Riyadh",
				"code": "54321",
				"country": "SA"
			}
		]
	},
	"delivery": {
		"date": "2022-03-01",
		"period": {
			"start": "2022-02-01",
			"end": "2022-02-28"
		}
	},
	"payment": {
		"instructions": {
			"key": "credit-transfer"
		},
		"terms": {
			"notes": "Payment due within 30 days"
		}
	},
	"lines": [
		{
			"quantity": 5,
			"item": {
				"name": "Development services",
				"price": "90.00",
				"unit": "h"
			},
			"taxes": [
				{
					"cat": "VAT",
					"rate": "standard"
				}
			]
		}
	]
}
A simplified invoice on zero-rated supplies, carrying explanatory tax notes for the applied rate.
{
	"$schema": "https://gobl.org/draft-0/bill/invoice",
	"$addons": [
		"sa-zatca-v1"
	],
	"uuid": "8d487816-70b8-4ade-a618-9d620b73814a",
	"issue_date": "2022-09-07",
	"issue_time": "12:21:28",
	"code": "123456",
	"regime": "SA",
	"type": "standard",
	"$tags": [
		"simplified"
	],
	"tax": {
		"rounding": "currency",
		"notes": [
			{
				"cat": "VAT",
				"key": "zero",
				"text": "Medicines",
				"ext": {
					"untdid-tax-category": "Z"
				}
			}
		]
	},
	"supplier": {
		"tax_id": {
			"country": "SA",
			"code": "399999999900003"
		},
		"name": "شركة توريد التكنولوجيا بأقصى سرعة المحدودة | Maximum Speed Tech Supply LTD",
		"identities": [
			{
				"type": "CRN",
				"code": "1010010000"
			}
		],
		"addresses": [
			{
				"street": "الامير سلطان | Prince Sultan",
				"street_extra": "المربع | Al-Murabba",
				"num": "2322",
				"locality": "الرياض | Riyadh",
				"code": "23333",
				"country": "SA"
			}
		]
	},
	"lines": [
		{
			"i": 1,
			"quantity": "1",
			"item": {
				"name": "Medicine | الدواء",
				"price": "50.00",
				"unit": "PCE"
			},
			"taxes": [
				{
					"cat": "VAT",
					"rate": "zero",
					"ext": {
						"cef-vatex": "VATEX-SA-35"
					}
				}
			]
		},
		{
			"i": 2,
			"quantity": "1",
			"item": {
				"name": "Shampoo | شامبو",
				"price": "21.74",
				"unit": "PCE"
			},
			"taxes": [
				{
					"cat": "VAT",
					"rate": "standard"
				}
			]
		}
	],
	"payment": {
		"instructions": {
			"key": "credit-transfer"
		},
		"terms": {
			"notes": "Payment due within 30 days"
		}
	}
}

FAQ

From the GOBL invoice type. Simplified invoices (B2C) are reported to ZATCA; all standard invoices (B2B and B2G) are cleared.
Before you share it with the buyer. Standard invoices follow the clearance model: Invopop submits the invoice to ZATCA in real time, ZATCA validates it and applies its cryptographic stamp, and the cleared document is returned. Only that cleared version is legally valid and shareable — so the invoice must go through Invopop before you send it on to the buyer.
Within 24 hours of issuing it. Simplified invoices follow the reporting model, so you can give the invoice to the customer straight away at the point of sale — it does not need ZATCA validation first, and you can share it before it ever reaches Invopop. You then have up to 24 hours from issuance to submit it to Invopop, which forwards it to ZATCA immediately when the workflow runs.
No. Invopop calculates the Invoice Counter Value (ICV) and Previous Invoice Hash (PIH) internally on every submission. You only see them reflected in the generated invoice XML.
ZATCA requires every document a party issues to form a single, unbroken cryptographic chain. Invopop maintains one chain per party and environment (sandbox simulation/developer vs. production are separate sequences), so each registered CSID has its own continuous counter. Two values link it together:
  • ICV starts at 1 for the first document and increments by exactly 1 for every document that follows.
  • PIH of the first document is the hash of the value 0 — the base case defined in ZATCA’s data dictionary. Every document after that sets its PIH to the hash of the immediately preceding document.
Each new document takes the hash of the immediately preceding document and increments ICV by 1, irrespective of type and status:
  • Document type does not split the chain. Standard invoices, simplified invoices, credit notes, and debit notes all share one sequence.
  • Rejected documents still occupy their slot. A document that ZATCA rejects keeps its ICV and hash; the next document chains off it, not off the last accepted one.
For example, if invoice 2 is rejected, invoice 3 still uses hash(invoice 2) as its PIH and ICV = 3:
DocumentICVPIH points toZATCA result
Invoice 11hash of 0 (base case)Accepted
Invoice 22hash(Invoice 1)Rejected
Invoice 33hash(Invoice 2)Accepted
Credit note 44hash(Invoice 3)Accepted
In the Files section of the silo entry. After a successful submission the final XML is attached as invoice.xml — for standard invoices this is the ZATCA-cleared, stamped document. The QR code is also stamped onto the document.
More available in our Saudi Arabia FAQ section.

Participate in our community

Ask and answer questions about invoicing in Saudi Arabia →