Handling Multiple Legal Entities: CSR and Private Key File Management in ZATCA SDK

We manage multiple legal entities in our cloud-based system.

When onboarding a new legal entity, we generate their CSR and private key using the fatoora -csr -csrConfig … command. The output CSR and private key are stored as cert.pem and ec-secp256k1-priv-key.pem in the zatca-einvoicing-sdk/Data/Certificate/ directory.

Question 1: Can we directly copy the content of the generated CSR and private key into the cert.pem and ec-secp256k1-priv-key.pem files, or are there any modifications required?

Question 2: Is it possible to use the same CSR and private key files for all legal entities? If separate files are needed for each entity, how can we handle this in a single Zatca SDK effectively?

Dear @Saud

You need to copy the CSID (binaryToken) from the compliance API and replace it in the cert.pem file.

Also, kindly note that each device generates invoices should be onboarded.

Thanks

Thanks for the reply.
I understand that I need to set the binary token from compliance API in the cert.pem file.

Can you let me know about the ec-secp256k1-priv-key.pem file? What content will be put in that file?

Also, is it possible to use the same cert and private key file for multiple legal entity?