How can we help?

Migrate from tokens to certificates

Complete these steps to migrate from Krajowy System e-Faktur (KSeF) tokens to certificates.

Understand the migration timeline:

  • Tokens and certificates are both supported KSeF authentication methods.
    Note:

    Tokens were previously scheduled for deprecation on January 1, 2027. Poland's Ministry of Finance has reversed this decision and confirmed that tokens have no planned end date. Migration to certificates is optional.

  • Migrate to certificates if you need offline invoice issuance, batch transmission, or prefer certificate-based authentication.

  • Certificates are available for download from the KSeF portal starting November 1, 2025.

  1. Download your Type 1 certificate from the KSeF portal.

    Access the KSeF certificate management section at https://ksef.podatki.gov.pl/ then go to Certyfikaty KSeF.

  2. Update your configuration, replacing your current token with the new certificate.
    1. Send a PUT request to the https://api-test.sovos.com/v2/configurations/organizations/{orgId}/settings endpoint.
      Environment URLs:
    2. Include the following information in your request:
      Before (token-based):
      curl --location --request PUT 'https://api-test.sovos.com/v2/configurations/organizations/{orgId}/settings' \
      --header Content-Type: application/json \
      --header Authorization: Bearer {accessToken} \
      --header x-correlationId: {uniqueValue} \
      --data-raw '[
          {
              "context": "transmission",
              "configurations": [
                  {
                      "name": "partner_credentials_KSEF_V2",
                      "value": {
                          "authorizationToken": "INSERT-TOKEN-HERE"
                      },
                      "scope": {
      		    		  "category": "PL_INV",
      		    		  "productId": "pl_Faktura__2.0",
                         "orgId": "YOUR-ORG-ID",
                  		  "taxId": "YOUR-COMPANY-TAXID"
                      }
                  }
                  {  
                        "name": "preferred_partner",  
                        "value": {  
                           "name": "KSEF-PRE-PROD"
                      },
                      "scope": {
                         "category": "PL_INV",
                         "productId": "pl_Faktura__2.0",
                         "orgId": "YOUR-ORG-ID",
                         "taxId": "YOUR-COMPANY-TAXID"
                      }
      		   }
              ]
          }
      ]'}

      After (certificate-based):

      curl --location --request PUT 'https://api-test.sovos.com/v2/configurations/organizations/{orgId}/settings' \
      --header Content-Type: application/json \
      --header Authorization: Bearer {accessToken} \
      --header x-correlationId: {uniqueValue} \
      --data-raw '[
          {
              "context": "transmission",
              "configurations": [
                  {
                      "name": "partner_credentials_KSEF_V2",
                      "value": {
                          "certificateCrtBase64": "Certificate .crt file encoded in Base64",
                          "certificateCrtKeyBase64": "Certificate .key file encoded in Base64",
      				   "certificateCrtPassword": "ENTER PASSWORD HERE"
      				},
                      "scope": {
                        "category": "PL_INV",
                        "productId": "pl_Faktura__2.0",
      				 "orgId": "YOUR-ORG-ID",
                  		 "taxId": "YOUR-COMPANY-TAXID"
                      }
                  }
                  {  
                        "name": "preferred_partner",  
                        "value": {  
                            "name": "KSEF-PRE-PROD"
                         },
                         "scope": {
                             "category": "PL_INV",
                             "productId": "pl_Faktura__2.0",
                             "orgId": "YOUR-ORG-ID",
                             "taxId": "YOUR-COMPANY-TAXID"
                         }
      		   }
              ]
          }
      ]'
  3. Deploy to production.

    Schedule your production deployment with enough time for validation and rollback if needed. Tokens continue to work after you migrate, so you can run both authentication methods in parallel during your transition.

    Monitor production traffic to guarantee certificate authentication works correctly across all your invoice submission patterns.
    Note:

    Verify that you are using the correct certificate for each environment (Test, Demo, or Production). For more details on certificates, go to Set up your credentials for Poland

After completing these steps, your system uses certificate-based authentication for all KSeF submissions.