Carta Docente for Shopify

Home > Documentation > Carta Docente for Shopify > .pem Certificate Configuration (Production)

.pem Certificate Configuration (Production)

.pem Certificate Configuration (Production)

To use the app in production mode and validate real Carta del Docente vouchers, you need to generate and upload a .pem certificate. This certificate is obtained from the official portal cartadeldocente.istruzione.it and is used to authenticate the app’s calls to the ministerial APIs.

The process involves three main phases:

  1. Generate a certificate request (.der) and a private key from the app.
  2. Upload the .der file to the Carta del Docente portal to obtain the signed certificate (.cer).
  3. Combine the received .cer file with the private key to generate the final .pem certificate to be uploaded to the app.

Phase 1: Generate the certificate request (.der)

  1. In the app’s dashboard, go to the Certificate section.
  2. Click the Generate new certificate request button.
  3. Fill in all the form fields with your business details (Country, Province, Municipality, Company Name, etc.).
  4. Note: The Password field is mandatory. Choose and remember a strong password; you will need it in subsequent steps.
  5. Click on Generate .der. The app will create two files:
    • A certificate-request-XXXXX.der file to download.
    • An associated encrypted private key, securely saved on the server.
  6. Save the .der file to your computer.

Note: The entered password is securely saved in the app’s database and will be required to create the final certificate.

Phase 2: Obtain the signed certificate (.cer) from the portal

  1. Access the portal cartadeldocente.istruzione.it with your business credentials.
  2. Go to the certificate upload section (the exact path may vary on the ministerial portal).
  3. Upload the .der file you downloaded in the previous step.
  4. Complete the procedure on the portal to obtain the certificate signed by the Ministry.
  5. Download the .cer file provided to you. This is your signed certificate.

Phase 3: Generate and upload the final .pem certificate

  1. Return to the Certificate section in the app’s dashboard.
  2. Click the Generate .pem certificate from .cer button.
  3. In the form that appears, upload the .cer file you downloaded from the ministerial portal.
  4. The app will automatically search the system for the private key you generated in Phase 1 that corresponds to the .cer certificate.
  5. Click on Generate .pem.

Note: If the app does not find a corresponding private key, it will display an error. This happens if the .cer file you are uploading was not obtained from a .der file generated by this specific app installation. In this case, you will need to repeat Phase 1.

  1. If the corresponding private key is found, the app will automatically combine the .cer certificate and the key to generate a final .pem file.
  2. This .pem certificate is automatically saved and configured for use in production mode. The “Sandbox Mode” setting will be deactivated.

Final Note: Once the .pem certificate is successfully uploaded, the Carta del Docente widget will become active in your store’s checkout for the validation of real vouchers. You can check the status in the main section of the app’s dashboard.

Need more help?

Please open a support ticket using the links below.