Technical Guidelines
We can consider the ID in the XML and JSON input as primary key (cbc:ID in XML and invoice_id in JSON). eg if an invoice is passed with id "1" then we sign and submit the invoice. If the reporting status is successful then we update our database and archive the invoice. If another invoice is passed with id "1" again. Then we return the reponse of the earlier API and do not report the invoice again to ZATCA.
Taking the above scenario further, if invoice id "1" is rejected by ZATCA. Then the API caller can fix the errors and pass the invoice with the same id again. In this scenario we resubmit the invoice to ZATCA with a new counter and QR code. This process can repeated until the invoice is succesfully reported to ZATCA.
Both XSL and XSD validation are done for the invoice prior to sending the request to ZATCA
Standard Documents if onboarded, will be processed in real time (as mandated by ZATCA)
Simplified Documents will be signed and returned back to the caller. Within 24hr window a sync job will be triggered to report the invoice to ZATCA
Invoices which are rejected from ZATCA will be visible in the utility dashboard and will be available to user to modify and update
We keep the records of invoices which have been reported successfully for 7 days. Post that any invoices with an id which was used earlier will be treated as a new invoice again. Our cloud service will return the saved response for the ID. This is done to save space within the device the utility is installed in
Last updated