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