Problem when trying to get PCSID (Passing compliance checks)

Dears ,

Many thanks for your continus support .

Now i was able to clear my standard invoices for complinance checks .

However , when i try to request PCSID , i get this message :

{"code":"Missing-ComplianceSteps","message":"The compliance certificate is not done with the following compliance steps yet [standard-credit-note-compliant,standard-debit-note-compliant,simplified-compliant,simplified-credit-note-compliant,simplified-debit-note-compliant]"}
Production CSID request failed with status code: BadRequest

I have 2 questions :
1- why i’m being ask to submit simplified invoices while i submit the code 1100 on the CSR request file for invoiceType .

2- how many invoices i should submit before i pass the compliance checks .

Thanks for your great support .

when u request a CSID from your CSR request … you will receive a certificate … On-Boarding …with …(CN=eInvoicing)
So using this CSID … you need to send (6 invoices …as u mentioned …1100 3 types of Standards + 3 types of Simplified)
if it approved …you will request for another CSID …so you will get Final CSID ( CN=PEZEINVOICESCA4-CA, DC=extgazt, DC=gov, DC=local) whitch you will used in your continuos send simulation test

Dear @Embro

Thanks for your reply .

We are only doing B2B invoices . What code should I write to submit only the standard invoice (other than 1100) .

Thank you

based on the invoice type in your configuration file if it’s 0100 that’s mean you will only send a simplified invoice, if it’s 1000 only for standard invoices and if it is 1100 you will send both standard and simplified.

Dear @Embro

i did all the compliance checks . but now i’m getting another error when trying to get the PCSID :

Sending request for Production CSID...
Response Status Code: BadRequest
API Response Body:
{"errorCode":"400","errorCategory":"Invalid-CSR","errorMessage":"The provided Certificate Signing Request (CSR) is invalid."}
Production CSID request failed with status code: BadRequest

Any idea

1- Confirm that u are using your required CSR
2- You have to finish your whole Cycle with 1 hour (calculated from the time you received rhe OTP)

Dear @Embro

Actually when generating the PCSID , I don’t submit any CSR .

we submit the binarytoken: secret key from CCSID encoded in Base64 as authorization .
And compliance request ID as body .

am I missing something here ?

1- Prepare you Config file
2- Create your Keys (Private key, Public Key)
3- Create you CSR
4- Take taxpayer OTP (VALID FOR 1 Hour) from ZATCA
5- To Obtain a test Compliance Cryptographic Stamp Identifier (CCSID) and test Request ID
Send a request (csr base64 encoded + OTP)
6- you must receive a Response by Code 200 & response body includes your CCSID
7- using this CCSID
send 3 Or 6 Invoices for Approval
'1 Standard invoice.
'2 Standard debit note.
'3 Standard credit note.

'4  Simplified Invoice.
'5  Simplified credit note.
'6  Simplified debit note.

8- You must receive responseCode = 200 for these invoices
9- If Approved these sample invoices … send a request for a final production CCSID
10- you must receive a Response by Code 200 & response body includes your CCSID

Note that these steps (for simulation and the same steps to be repeated for the core CCSID production))

I hope it helps

Dear @Embro ,

Many thanks for your reply .

Actually i found the problem .
My CSR Information is correct . just this parameter was worng . i chosen NoProduction on a simulatoin enviroment .

Anyway , thank you for your efforts

1 Like

For standard and simplified sample invoices, can the customer data, invoice serial number, ICV , and PIH be represented with non-real data ?

You can use anything for simulation and non Production environment .

But for production it should be real

“The compliance certificate is not done with the following compliance steps yet [simplified-debit-note-compliant]”

I am getting this error but all are my invoices returning 200.

do i have to test all invoices in particular time??

@sayedrahman you haven’t completed all the compliant steps

yes i know, Can you please tell me more about what is simplified debit note??

@sayedrahman

Simplified Debit Note

<cbc:InvoiceTypeCode name=“0200000”>383</cbc:InvoiceTypeCode>

Simplified Credit Note

<cbc:InvoiceTypeCode name=“0200000”>381</cbc:InvoiceTypeCode>

but what is debit simplified invoice?? when it need to create??

  1. When a customer was charged incorrectly on an invoice.
  2. If there were unexpected costs incurred (like shipping or handling fees) that were not included in the original invoice.
  3. If the price of goods or services has changed after the initial invoice was issued.
  4. If there’s a change in terms that requires an additional charge based on the agreement.
  5. If there were unexpected costs incurred (like shipping or handling fees) that were not included in the original invoice.

Thanks you so much,

will you give me one nice format where you done it, I am getting no error or warning when i doing compliance in simulation but when i try to get pcsid, it showing simplified debit not has been done compliance

Check the END Points correctly in that case, particularly for Simplified Debit Note

Do i have to test it within any particular time?? like after generate CSID i have to test it with one hour, or i can generate any time after test ??