Announcing the launch of the Saudi Zatca-2 E-Invoicing app on FrappeCloud

**This is the working format** 
csr.common.name=TST-886431145-300970199900003
csr.serial.number=1-TST|2-TST|3-ed22f1d8-e6a2-1119-9b58-d9a9f11e874f
csr.organization.identifier=300990908800003   
csr.organization.unit.name=300990908800003   ( if 11th digit of above vat-id is 1 then this should be 10 digit TIN ) 
csr.organization.name=Your Company name
csr.country.name=SA
csr.invoice.type=1100
csr.location.address=RIYADH
csr.industry.business.category=Your company activities

can i copy and paste same csr.common.name and csr.serial.number

How you solve this error pls ??

@Support-at-ERPgulf

This is the issue I face, I have a single company and shared the Screenshots,
Error is during Generating Compliance CSID - Simulation.
Any fix?
CSR Conf



On CSR configution, use Full company name instead of ABBR.
ABBR used only on JSON

And put invoice_type 1100 on CSR configuration

@Support-at-ERPgulf
No, Still not working.
Tried with both Full Company, Abbr also with all invoice types,

The code is also accepting and checking it only based on Abbr of Company.
When using Full Company,
It throws → Error in creating csr: value argument must be a str

So, I don’t think these are the issue.

Any other fix?
Is the format of CSR Conf correct? Any other missing values to be added? Seems like Error is based on incompatible format of CSR or missing fields?
Or Is it supposed to be a GET Request instead of POST, Since the Error Says,

error in creating CSID: Error: Error in Certificate or OTP:
{“code”:“Invalid-Request”,“message”:“System failed to process your request”}

So, What are the possibilities now?
Thanks.

follow this thread 500Internal Server Error in Simulation (Invalid Request Code) - FATOORA portal and Simulation portal - Fatoora Developer Community

@Support-at-ERPgulf


could you please help me in getting or understanding how the field of pih works ??

I have already followed along those threads fully and it doesn’t provide the apt solution.
Is the latest version of zatca_erpgulf working perfectly,
If yes, Can you please share the exact format of data to be configured in order to integrate properly,
More like a Tutorial or Documentation of how to get things done with the app.
Because, I believe the YouTube tutorial of the app is also a little outdated compared with latest version of the app.

It’ll greatly help!
Thanks! :slight_smile:

Someone from our team will help you on remote. Please send email to support@ERPGulf.com

You need to put that in Json format. With ABBR field from Company doc.
Like this
{“data”: [{“company”: “ABBR”, “pih”: “QdsFjxXtySaaZzk11h/Xj1m258XigIGF6vZ6appyS8Q=”}]}

1 Like


is this data format in csr_config and csr_data is in the right format ?, i tried the sandbox data and the app is working like charm , but when i try my data and creat the csr and private key , it gives me that the otp is invalid , and it was in the hour duration usage , any help in this ? @Support-at-ERPgulf

Use ABBR in Json ( Instead of company name )

This is the working format
csr.common.name=TST-886431145-300970199900003
csr.serial.number=1-TST|2-TST|3-ed22f1d8-e6a2-1119-9b58-d9a9f11e874f
csr.organization.identifier=300990908800003
csr.organization.unit.name=300990908800003 ( if 11th digit of above vat-id is 1 then this should be 10 digit TIN )
csr.organization.name=Your Company name
csr.country.name=SA
csr.invoice.type=1100
csr.location.address=RIYADH
csr.industry.business.category=Your company activities

1 Like

CSR data also should be in JSON format

{“companies”: [{“company”: “PD”, “csr”: “LS0tLS1CRUdJTiBDRVJUSUZJQ0FURSBSRVFVRVNULS0tLS0KTUlJQ0V6Q0NBYmtDQVFBd1lERW5NQ1VHQTFVRUF3d2VWRlJUVkMwNE9EWTBNekV4TkRVdE16azVPVGs1T1RrNQpPVEF3TURBek1Rc3dDUVlEVlFRR0V3SlRRVEVUTUJFR0ExVUVDZ3dLTWpBMU1EQXdNalkzTnpFVE1CRUdBMVVFCkN3d0tNakExTURBd01qWTNOekJXTUJBR0J5cUdTTTQ5QWdFR0JTdUJCQUFLQTBJQUJDZlBEODJVUmhnOVVVTHEKdWhBcnNiQlZUT00xR05FVWp4YTRpRmtRaVk3K0VzSWdOdFBzUEQvb2ZaTkMyQjBUY1JxRmtSYTY5NU16WjRlUQo1ZVZaenRXZ2dma3dnZllHQ1NxR1NJYjNEUUVKRGpHQjZEQ0I1VEFsQmdsVkNRTUhBWWRXRkFJRUdDNHVWRVZUClZGcEJWRU5CTFVOdlpHVXRVMmxuYm1sdVp6Q0J1d1lEVlIwUkJJR3pNSUd3cElHdE1JR3FNVHN3T1FZRFZRUUUKRERJeExWUlRWSHd5TFZSVFZId3pMV1ZrTWpKbU1XUTRMV1UyWVRJdE1URXhPQzA1WWpVNExXUTVZVGhtTVRGbApaRFU0T0RFZk1CMEdDZ21TSm9tVDhpeGtBUUVNRHpNd01URXpPRFUyT1RNeE1EQXdNekVOTUFzR0ExVUVEQXdFCk1URXdNREU3TURrR0ExVUVEd3d5YkdsdGFYUmxaQ0JzYVdGaWFXeHBkSGtnWTI5dGNHRnVlUzl5WldkcGMzUmwKY21Wa1FXUmtjbVZ6Y3oxRVlXMXRZVzB3Q2dZSUtvWkl6ajBFQXdJRFNBQXdSUUloQUswS1p1MGhVTFA2RXNOUApDVDh4VjRkU0pWV1Axd2liSG9jMldXdGo4N0QrQWlCTEUrQmVaREY2a2E5QU9jVTlaSWREWnE0WjR2bnFSUklICjZDbTNkUUxEbUE9PQotLS0tLUVORCBDRVJUSUZJQ0FURSBSRVFVRVNULS0tLS0K”}]}

1 Like

Also, make sure your pulled the latest update.

@Support-at-ERPgulf hello guys, first need to thank you for your efforts to the community , second i need you if you can to explain how the pih created please , i created the Csr and Private key , and need to know if the public key should created or not please ?? , and thanks in advance.

Use this format
{“data”: [{“company”: “ABBR”, “pih”: “QdsFjxXtySaaZzk11h/Xj1m258XigIGF6vZ6appyS8Q=”}]}

Use this format for PIH
{“data”: [{“company”: “ABBR”, “pih”: “QdsFjxXtySaaZzk11h/Xj1m258XigIGF6vZ6appyS8Q=”}]}

@Support-at-ERPgulf okay , so in my case i will change the “abbr” only and use the rest of format ???