Start now for free
Free in Sandbox - pay only when you go live
ZATCA Phase 2 e-invoicing API

ZATCA Phase 2 for your business, or for every business on your platform

Report your own invoices from any ERP, or onboard your customers as connected accounts and issue invoices on their behalf. One REST API, with the XML, signing, clearance and QR codes handled.

  • Clearance and reporting for B2B and B2C invoices
  • Signed XML and PDF/A-3 with the ZATCA QR code
  • Connected Accounts API for platforms and white-label integrations
  • Works with any ERP, POS or billing system
  • Test in ZATCA's simulation environment before you go live

Free in Sandbox - pay only when you go live

Who it's for

For your own business, or every business on your platform

The same API whether you invoice under your own VAT number or issue invoices for your customers.

Your business

Invoice under your own VAT number

Connect your ERP, POS or billing system and report your own invoices. Wafeq registers your devices with ZATCA, signs every invoice, and clears or reports it.

  • Your company, its branches and VAT group members
  • Invoices straight from your ERP, POS or billing system
  • No extra setup: report from your own account
POST /v1/zatca/invoices/report/
Authorization: Api-Key $WAFEQ_API_KEY
Platforms

Issue invoices on your customers' behalf

POS, billing, marketplace and ERP platforms onboard each customer as a connected account through the Connected Accounts API, then report that customer’s invoices with one extra header.

  • Onboard taxpayers with their name, address and VAT number
  • Report on their behalf with the connected account header
  • White-labeled: your customers stay inside your product
POST /v1/zatca/connected-accounts/
X-ZATCA-Connected-Account-Id: 8f3c2a…

How it works

How your invoices reach ZATCA

Keep invoicing in your ERP. Wafeq sits between your system and ZATCA's Fatoora platform and handles every Phase 2 requirement.

Your ERP or platformSends the invoice data to the Wafeq API
WafeqValidates, builds the UBL 2.1 XML and signs it
ZATCA FatooraClears B2B invoices, receives reported B2C invoices
Your customerReceives the invoice with its QR code, by email if you want
B2B · Standard tax invoices

Cleared before they reach your buyer

Standard tax invoices go to ZATCA for clearance in real time. Wafeq returns the cleared invoice with its QR code in the same call.

B2C · Simplified invoices

Reported within 24 hours

Simplified invoices are signed and given their QR code straight away, then reported to ZATCA within the 24 hours the rules allow.

What's included

Everything Phase 2 asks for, handled

XML and PDF/A-3

UBL 2.1 XML signed with your device's certificate, embedded in a PDF/A-3 you can customize.

QR code on every invoice

The cryptographic stamp and QR code ZATCA requires, generated for every document.

Works with any ERP

NetSuite, Microsoft Dynamics, SAP, Odoo, Xero or your own system, through one REST API.

Bulk and at scale

Report invoices one by one or in bulk, scaling to millions of documents.

Sent to your customers

Email each invoice to your customer with the PDF attached, straight from the API.

Branches and Group VAT

Report from several branches or from each member of a VAT group.

For platforms

Onboard your customers as connected accounts and report on their behalf, white-labeled.

Simulation environment

Test against ZATCA's Fatoora simulation before you go live, with the same API.

For developers

Scalable, ZATCA-compliant Phase 2 e-invoicing API

Invoices, credit notes and debit notes, B2B and B2C, through one documented REST API.

1curl https://api.wafeq.com/v1/zatca/invoices/report/ \
2 -H "Authorization: Api-Key $WAFEQ_API_KEY" \
3 -H "Accept: application/json; version=v1" \
4 -H "X-ZATCA-Environment: production" \
5 -H "Content-Type: application/json" \
6 -d '{
7 "document": {
8 "document_number": "INV-10482",
9 "supply_date": "2026-10-16",
10 "currency": "SAR",
11 "customer": { "name": "Najd Trading Co.",
12 "tax_registration_number": "310245678900003" },
13 "line_items": [{ "item": "Cloud hosting", "quantity": 20,
14 "unit_price": 450,
15 "tax": { "type": "S", "percent": 15 } }]
16 }
17 }'

What comes back

The invoice's status, when ZATCA accepted it, and the QR code data to print on it.

{
"reference": "INV-10482",
"status": "REPORTED",
"reported_ts": "2026-10-16T10:42:07Z",
"qr_code_data": "AQ5OYWpkIFRyYWRpbmcgQ28u…",
"document": { "document_number": "INV-10482", … }
}
Read the API documentation

Pricing

Free in Sandbox. A plan built for you when you go live.

Build and test against ZATCA's simulation at no cost. When you go live, talk to our sales team and we'll agree a plan for the documents you report.

Enterprise

For platforms, groups and high volumes.

Custom

Annual contract

  • Many VAT numbers, VAT groups and connected accounts
  • A yearly document allowance set in your contract
  • Pricing agreed for your volume

How Wafeq's e-invoicing solution is helping Tabby with compliance?

Abdulaziz Saja,

KSA General Manager at Tabby

Customer image

Customer Story

Wafeq helps Tabby with e-invoicing compliance

As the leading BNPL player in Saudi Arabia with millions of customers and thousands of merchants, Tabby relies on Wafeq for compliance with e-invoicing Phase 1 and Phase 2 of ZATCA's e-invoicing law.

Trusted by more than 18,000+ companies in all industry sectors

4.8 average rating from our customers

Support & Product Help

Our local support is here to help you at any time

Give us a call, drop us a chat or email us. We are here to help you.

Free Training
Master Wafeq in less than an hour by registering in our free webinar led by Wafeq experts
Register For Free
Expert Support
Our support team is here to help with 24/7 support in English and Arabic. Reach us through live chat or a phone call
Call 800 111 0601
Help Center
Learn how to use Wafeq from our detailed help articles, whether you're an accounting expert or a beginner.
Help Center