Handling Invoice Rejections
When ZATCA rejects an invoice, it means the invoice didn't pass the compliance checks. Each rejection comes with a specific reason code and message. This guide explains how to understand, fix, and resubmit rejected invoices.
Step 1: Find the Rejection Reason
- Open the rejected Sales Invoice.
- Look at the ZATCA Status field โ it will show "Rejected".
- Check the ZATCA Additional Fields section for the rejection details.
- Alternatively, go to ZATCA > ZATCA Integration Log, find the invoice, and read the Error Message and Response XML.
Common Rejection Reasons & Fixes
Buyer VAT Number Issues
| Rejection | Cause | Fix |
|---|---|---|
| "Invalid Buyer VAT Number" | The customer's VAT number is wrong or doesn't match ZATCA records | 1. Open the Customer record. 2. Verify the Tax ID matches their ZATCA-registered VAT number (15 digits, starts with 3). 3. For B2C (simplified invoice), set Tax Category to "Consumer" so no VAT number is required. |
| "Buyer VAT not registered" | The VAT number exists but the buyer isn't registered for e-invoicing | The buyer may not be in Phase 2 yet. Check with the buyer. |
| "Missing Buyer VAT for B2B invoice" | Standard invoice submitted without buyer VAT | Add the buyer's VAT number to the Customer record and on the invoice. |
Invoice Data Issues
| Rejection | Cause | Fix |
|---|---|---|
| "Invalid invoice total" | Tax calculation or total doesn't match ZATCA's validation | 1. Verify the VAT amount is correct (15% of net total). 2. Check for rounding discrepancies. 3. Ensure the tax template is correctly applied. |
| "Missing required field" | A mandatory ZATCA field is empty | Common missing fields: Street address, City, Postal Code on Company or Customer. Fill in the missing information. |
| "Invoice date out of range" | Invoice date is too old or in the future | Ensure the posting date is within the allowed window (typically not older than a few days for real-time). |
| "Line item quantity issue" | Quantity or unit of measure doesn't validate | Check that quantities are positive, and UOM is recognized. |
Certificate & Authentication Issues
| Rejection | Cause | Fix |
|---|---|---|
| "Invalid certificate" | Your CSID or EGS certificate is expired or invalid | Re-run the Onboarding Wizard to generate a new certificate. |
| "Certificate not authorized for production" | Using sandbox certificate in production mode | Switch to correct environment or re-onboard with proper credentials. |
| "Unauthorized submission" | The EGS unit is not properly registered | Go to ZATCA > ZATCA EGS and verify the device is active. Re-onboard if needed. |
Invoice Format Issues
| Rejection | Cause | Fix |
|---|---|---|
| "Invalid XML structure" | The generated XML doesn't match ZATCA's expected format | This is usually a system issue โ contact YousrERP support. |
| "Duplicate invoice" | An invoice with the same reference was already submitted | Check if this invoice was already accepted. The rejection may be from a duplicate submission attempt. |
| "Invoice type mismatch" | Wrong invoice type for the transaction | Ensure B2B invoices use Standard format, B2C use Simplified format. |
Step 2: Fix the Issue
- Identify the root cause from the rejection reason.
- Amend the Sales Invoice:
- Click Amend on the rejected invoice.
- A new amended invoice is created.
- Fix the issue (correct VAT number, adjust amounts, update address, etc.).
- Submit the amended invoice.
- The amended invoice will be automatically submitted to ZATCA.
If the fix requires updating master data (Customer, Company, Item settings), update those records first, then correct the invoice.
Step 3: Verify the Fix
- After resubmitting, check the ZATCA Status on the new invoice.
- Go to Integration Logs to confirm the new submission was successful.
- Verify the invoice now shows Accepted with a ZATCA UUID.
- Check the printed invoice has the QR code.
Batch Rejections
If you have multiple rejected invoices with the same issue:
- Fix the root cause in master data (e.g., update the Customer's VAT number).
- Use ZATCA > ZATCA Integration Log to filter all failed invoices.
- Amend and resubmit each affected invoice.
- Or use the batch reprocessing option if available.
Preventing Future Rejections
- Validate customer VAT numbers before creating invoices โ check they're 15 digits starting with 3.
- Ensure company and customer addresses are complete (Street, City, Postal Code).
- Keep CSID certificates current โ monitor expiry dates on the ZATCA Dashboard.
- Test in sandbox before going live to production.
- Review the ZATCA Dashboard weekly for early warning signs.
When to Contact Support
Contact YousrERP support if:
- The same rejection persists after fixing the issue
- The error message is unclear or technical
- XML validation errors (system-level issue)
- Certificate issues that can't be resolved through re-onboarding
- Batch submission failures for multiple invoices