Sending invoices to ZATCA

Communication with the tax authorities or ZATCA is through the Web Services Gateway.

Cryptography is required for this service which is automatically set up in cloud. To set up the on-premise environment, see Localization cryptography service setup for on-premise.

The initial testing for eInvoicing is done through the ZATCA sandbox. You can perform this using your TST tenant and with the Web Services Gateway (WSG) connection in TEST mode.

ZATCA does not have a dedicated TEST portal to simulate the On-boarding process in full. The current TEST mode uses the sandbox API and uses the default OTPs and credentials allowed.

For this testing, you can use a TEST key. A script is available that you can use to generate the CSR and key for this testing. See Related Documents in About this guide.

After all validation testing is complete, you can start the Production on-boarding process.

Depending on the environment that is setup in the Web Services Gateway, the requirements may vary:

  • Onboarding (Test)/Onboarding - requires OTP, CSR (certificate) and Compliance Testing
  • Test/Production - requires Compliance CSID

This table shows the checklist you must perform to ensure a successful on-boarding:

Steps Complete
Create Accounting Entity in Maintenance form
Generate Key and Certificate using eInvoicing Generate CSR
Upload generated key in Certificate and Key Store
Set up Web Services Gateway using the uploaded key
Note: For production, set the environment to Onboarding
Generate OTP in Fatoora Portal
Ensure that Onboard is selected in Accounting Entity Maintenance
Enter OTP and upload certificate signing request. Click Submit in ZATCA Onboarding form. Download the compliance credentials. Your status should be Onboarding In Progress
Complete the Compliance Testing
After completing the Compliance Testing, update your environment to test or production in web services gateway, then submit compliance request ID from ZATCA Onboarding form in the Accounting Entity Maintenance Form.
You status should be Onboarded after completing the previous steps