
Functional Consultant
Subscribe to the newsletter
With the increasing push for digital transformation in taxation, businesses operating in Saudi Arabia must comply with the Zakat, Tax, and Customs Authority (ZATCA) e-invoicing regulations.
ZATCA e-invoicing integration with Microsoft Dynamics 365 ERP, especially for B2C scenarios, requires aligning your system with Saudi Arabia’s e-invoicing regulations, known as FATOORAH. This is achievable through ZATCA API integration.
This blog will walk you through all the steps required to perform B2B C integration using a third-party API.
Understanding ZATCA e-invoicing compliance
ZATCA has introduced e-invoicing (FATOORAH) regulations in two phases:
- Generation Phase (December 4, 2021): Businesses must issue electronic tax invoices with QR codes, ensuring accuracy and compliance with the basic standards.
- Integration and Reporting (Advanced Stage) (January 1, 2023): During this phase, businesses must interface their systems with ZATCA’s platform to validate invoices and report in real-time.
To achieve compliance, organisations must ensure their ERP systems support XML formats, digital signatures, QR codes, and API integration with ZATCA’s platform.
More insights: Understand the ZATCA e-invoicing journey and its compliance stages.
Why is ZATCA compliance mandatory?
ZATCA compliance is mandatory because it’s part of Saudi Arabia’s broader push toward digital transformation, tax transparency, and economic accountability.
- Secure e-invoicing: Ensures invoices are tamper-proof and meet security standards.
- QR code implementation: Adds a QR code to invoices for quick verification and compliance.
- Integration with ZATCA’s portal: Enables real-time submission and validation of invoices via APIs.
- Tamper-proof invoices: Ensures data integrity and prevents unauthorised changes to invoices.
- Global alignment: Many countries are adopting similar e-invoicing mandates. ZATCA’s system helps Saudi Arabia align with international standards and attract foreign investment.
These requirements push businesses to adopt robust digital systems that seamlessly manage compliance.
Read further: Explore the steps to generate ZATCA-compliant e-invoices for both B2B and e-commerce customers.
ZATCA integration with Dynamics 365 using ClearTax
ClearTax functions as a third-party API provider, specifically, a Government-Approved Service Provider (GSP) and Application Service Provider (ASP). That means it acts as an intermediary between your ERP or POS system (like Microsoft Dynamics 365) and the ZATCA platform.
Instead of building a direct integration with ZATCA’s APIs yourself—which can be complex and time-consuming—you can use ClearTax’s APIs to handle:
- Invoice formatting and validation
- Cryptographic stamping and QR code generation
- Real-time or batch submission to ZATCA
- Response handling and error management
So while ClearTax is technically a third-party API, it’s a trusted and certified one that simplifies compliance and reduces the burden on your internal IT team.
Before getting started, let’s walk through the key alignment steps.
Note: This is the approach we follow at Confiz.
1. Requirement analysis & system assessment
At Confiz, we analyze the clients’ specific e-invoicing obligations under ZATCA regulations.
Our team assesses Dynamics 365 Finance and Operations’ current capabilities to identify gaps and opportunities for alignment with ZATCA’s Phase 2 (Integration Phase) requirements.
2. Integration of ZATCA with Dynamics 365 using APIs
We configure Dynamics 365 to generate invoice data in the mandated XML format. Using secure APIs, we automate the invoice validation and submission process. Our integration ensures QR code generation and digital signatures are embedded according to ZATCA’s technical standards.
3. API communication with ZATCA via ClearTax
Confiz establishes a secure API connection between Dynamics 365 and ZATCA using trusted intermediaries such as ClearTax. We enable real-time invoice transmission through the ZATCA compliance gateway and implement full encryption to meet regulatory security requirements.
4. Testing and validation
Our experts perform rigorous end-to-end testing to verify the integration.
We ensure all invoice submissions meet ZATCA’s compliance standards and address any integration issues proactively to support smooth processing.
5. Deployment and user training
Once the integration is finalized, we deploy the solution within Dynamics 365 across the client’s finance operations. Confiz provides tailored training sessions to finance and IT teams, ensuring they are equipped to manage, monitor, and maintain ZATCA compliance confidently.
Getting started with B2C e-invoicing: Steps for integrating Dynamics 365 with ZATCA
ZATCA provides integration for two types of businesses: B2B and B2C. For B2C businesses, it was mandatory for all invoices to be synced with the ZATCA, for which we have developed a solution to streamline this process and make it user-friendly.
Process Flow
Now let’s get into the steps:
Step 1: B2C offline\online POS transactions syncing
- Offline transactions: Confiz will store offline transactions in XML format within a designated folder. The ZATCA SDK will then sign these invoices. A Windows service will synchronize these transactions via the ClearTax reporting API.
- Online transactions: These will be synced to ZATCA in real time using the ClearTax API. We don’t need to sign an XML; we just need to send the XML/JSON directly with the required data. ClearTax will sign and report to ZATCA, and give you the QR code and invoice status.
Supported transaction types:
- B2C Store Commerce transactions
- B2C E-commerce orders
Additional feature:
QR codes can be generated in advance for pre-orders to streamline fulfillment and reduce wait times during peak hours.
Step 2: Setup and configuration
We stored the VAT number on the POS registers, and all other field mapping was done according to the business’s requirements.
Step 3: E-invoice generation
This step involves generating the e-invoice.
Step 4: QR code generation
In this crucial step, customer invoice data is exchanged and authorized with ZATCA in real time to generate e-invoices after completing the integration setup. Confiz’s ZATCA add-on automatically connects Dynamics 365 Finance and Operations and ZATCA, using your chosen e-invoicing generation system, such as Cleartax.
Step 5: ZATCA e-invoice inquiry
At Confiz, we offer a ZATCA e-invoice response inquiry, which provides visibility into the ZATCA e-invoice ID, UUID, PIH, QR status, Request, and Response. This feature allows you to address and rectify integration issues for seamless compliance.
Step 6: Validations
Confiz’s ZATCA add-on ensures that invoices generated in Dynamics 365 Finance and Operations meet all mandatory field requirements and are formatted in XML. It then submits these invoices to the e-invoice generation system, which interacts with ZATCA’s e-invoicing platform for approval and clearance. Upon successful verification, the e-invoice is generated in real time, and a QR code is printed on the customer invoice.
Potential Key considerations before implementation
1. Customization needs
Some industries may require additional localization or custom features in Dynamics 365 to fully meet ZATCA’s requirements, especially for unique business processes.
2. Implementation costs
Businesses new to Dynamics 365 may need to invest in setup, customization, and training, which can increase initial costs.
2. Vendor and partner selection
Choosing the right Microsoft partner is crucial. Experienced partners, like Confiz, ensure smooth implementation and full ZATCA compliance, minimizing risks.
3. Use trusted third-party solutions
Leverage third-party platforms with pre-built integration capabilities to simplify and accelerate ZATCA compliance within Dynamics 365.
4. Validate API communication early
Ensure stable and secure API connectivity between Dynamics 365, the third-party provider, and ZATCA before moving to production.
5. Prioritize thorough testing
Conduct multiple testing cycles to identify and resolve compliance issues early, reducing the risk of disruptions during go-live.
6. Train end users with clear guidance
Provide comprehensive documentation and hands-on training to finance and IT teams to support smooth adoption and ongoing compliance.
Conclusion
Successfully integrating ZATCA with Microsoft Dynamics 365 using a third-party solution ensures regulatory compliance and streamlines financial operations. At Confiz, our experience has proven that a structured approach, strong technical expertise, and user engagement are key to a smooth implementation. With ongoing changes to regulatory requirements, staying proactive is essential for businesses aiming to maintain compliance and operational continuity.
Planning your e-invoicing integration? Start with our free readiness assessment. It helps you evaluate your current system’s alignment with ZATCA Phase 2 (Integration Phase) requirements and identifies critical areas that may need attention.
For personalized support or to discuss your integration needs, contact us at marketing@confiz.com.