How to renew expired PCSID?

What is the process of renewing the expired PCSID?
Should we perform the compliance check and resubmit the samples invoices while renewing the expired PCSID?
While renewing the expired PCSID, can we use the existing CSID or should we generate new?

simply by submitting you CSR to the same API of PCSID generation but with
body: CSR
header: renewal OTP from the portal
method: to be patch instead of post
and authorization: basic auth using CSID username and pass

I have tried the renew the PCSID as per the instruction provided in the comments. i received the following errors,
I tried basic auth using the CSID username and password - I received the response as 401
I tried basic auth using the PSCID username and password - I Received the response as 428 Error.
Can you please provide complete instruction steps.

Dear,

yes, you need to use the old PCSID in basic auth in order to renew it, once you got the 428 response code that means that your certificate is now renewed but not compliant yet. as you will get new request id, new token (renewed CSID) & secret key.

use these new data to submit your invoices to pre-compliance check API.

then as final step generate new PCSID using the returned credentials from the renewal API.
and you are ready now to submit your invoices to zatca using clearance & reporting APIs.

Regards,

1 Like

Dear @kiaziz ,
Can u explain that more be clarify, as i face same problem

Error 428: PreconditionRequired

Dear @kiaziz, @idaoud, @halrashidy , @eCloud

I recently sent a request to renew the PCSID and received the following response:

Error 428: PreconditionRequired - Error
Details: {“requestID”:1730365866069,“tokenType”
,“dispositionMessage”:“NOT_COMPLIANT”,“binarySecurityToken”:“TUlJQ01UQ0NBZGVnQXdJQkFnSUdBWkxoMThCVk1Bb0dDQ3FHU000OUJBTUNNQlV4RXpBUkJnTlZCQU1NQ21WSmJuWnZhV05wYm1jd0hoY05NalF4TURNeE1Ea3hNVEF4V2hjTk1qa3hNRE13TWpFd01EQXdXakJvTVFzd0NRWURWUVFHRXdKVFFURVdNQlFHQTFVRUN3d05VbWw1WVdSb0lFSnlZVzVqYURFWk1CY0dBMVVFQ2d3UVZHVmlZV3hwYm1zZ1EyOXRjR0Z1ZVRFbU1DUUdBMVVFQXd3ZFZGTlVMVEV3TVRBMk5qQTJOeTB6TVRFMU9UUTJPRFk1TURBd01ETXdWakFRQmdjcWhrak9QUUlCQmdVcmdRUUFDZ05DQUFSeldMMjNXVm9Nak5WYnlsdVF3bjI5M1hQSkpMZ3dDY254cW9XOUNpYU1KWjVlVXRnRldadkxZS0k4cFBzRG1KbUJsTDRidnE2SW1FSjV4MGtjWngzYW80SENNSUcvTUF3R0ExVWRFd0VCL3dRQ01BQXdnYTRHQTFVZEVRU0JwakNCbzZTQm9EQ0JuVEUvTUQwR0ExVUVCQXcyTVMxQmNIQnNaWHd5TFVVMU5UY3dmRE10V2xvMFF6UTFORFF0TURBek9DMDFNekV3TFRnd016Y3RRalZETURSR05UZzBOVFV5TVI4d0hRWUtDWkltaVpQeUxHUUJBUXdQTXpFeE5UazBOamcyT1RBd01EQXpNUTB3Q3dZRFZRUU1EQVF4TVRBd01SRXdEd1lEVlFRYURBaFNSRXhDTkRVNU9URVhNQlVHQTFVRUR3d09TVlFnUkdWMlpXeHZjRzFsYm5Rd0NnWUlLb1pJemowRUF3SURTQUF3UlFJaEFJcktSQzFmK1RZZ051TjhrUmlkR0l2WmFPNE5DRkJhNW5hVEp1Wk5HWStvQWlCSU9yVFBTY01xaFozd2FWamlOUUdVSnlwcHNWcUgvcWZ0ZTJnYUZHS2g0Zz09”,“secret”:“sed9CDvwi4rFiJsG1fKbh3jFgYusOZCmSpoi1lnEy74=”}

Based on my understanding, I would like to confirm the following steps:

  1. Use the binarySecurityToken and secret as the username and password in the Compliance invoice.
  2. Generate the PCSID using the binarySecurityToken and secret as the username and password for the Clearance/Reporting invoice.
  3. Decode the binarySecurityToken and save it as my cert.pem file.

Could you please confirm if this interpretation is correct?

Thank you for your assistance.

Dear @Madleen

Please see the below answer

Renew PCSID (Simulation Env) - XML and business rules - Fatoora Developer Community

Thanks,
Ibrahem Daoud.

Dear @idaoud ,
1- I generated PCSID foe SIM.
2- I want to renew on SIM.

when used that:

give this response :

SO I am asking what should do ?AND the binarySecurityToken as user name and the secret as password, when compilance invoice again? IF yes , How can get the binarySecurityToken as user name and the secret as password when clear/report invoice?

Dear @eCloud ,
Here are the steps I have taken so far in my project:

  1. Created a csr.config (configuration file).
  2. Generated the CSR.
  3. Submitted six simplified-standard invoices for compliance to obtain the CSID.
  4. Acquired the PCSID through the production onboarding process.
  5. Sent invoices for clearance/reporting, categorized by invoice type (depending on invoice type).
  6. However, when attempting to renew the PCSID, I encounter an error related to my inquiry.

Please note that I have been using the Simulation Environment for all the steps up to this point.

Dear @Madleen

Thanks for reaching out,

Please ensure to follow the below steps and let me know if it works:

1-use (https://gw-fatoora.zatca.gov.sa/e-invoicing/simulation/production/csids)
2- You need to choose the HTTP as PATCH.
3-In the Authorization you need to use the PCSID binarySecurityToken as username and secret as password.
4- In the body you will use the new CSR that you want to use.

The response will be the CCSID for the new CSR, after that you need to repeat the onboarding steps as usual,
Complete the compliance checks with the new CCSID, generate PCSID, use the binarySecurityToken from the New PCSID as userName and the secret as Password with the reporting and Clerance API to send the actual invoices>

I hope it’s clear enough now,
If it did not work, please do not hesitate to reach out our support team via email to schedule meeting if needed:

SP email: sp_support@zatca.gov.sa

Thanks,
Ibrahem Daoud.

1 Like

Thank you for the information, what I previously understood was using the old CSR as payload.