Skip to content

Installation

  • CS-Cart or CS-Cart Multi-Vendor 4.17.2 – 4.22.x.
  • PHP 7.2.5 – 8.3 with the OpenSSL, cURL and DOM extensions (standard on CS-Cart hosting). The server must reach api.ksef.mf.gov.pl (and api-test / api-demo for testing) over HTTPS.
  • A KSeF token or a KSeF certificate / qualified electronic seal for your NIP. You create the token yourself in the KSeF taxpayer application of the Ministry of Finance. Using KSeF is free of charge.
  • A server cron job is recommended for the send queue (see below).
  1. In the admin panel open Add-ons → Manage add-ons, click the + button and upload the add-on archive.
  2. Click Install next to KSeF e-Invoicing for Poland.
  3. Enter your license key on the License tab of the add-on settings (or the CS-Cart Marketplace license number in Add-ons → Manage).
  4. Open Orders → KSeF invoices → KSeF connection, enter your NIP, choose the environment (start with Test) and paste your KSeF token. Click Save and test connection.
  5. Check Tax & payment mapping. Polish VAT rates (23, 8, 5 %) are recognised automatically.

On install the add-on adds an optional customer field Company tax ID (NIP / VAT ID) to the checkout and the profile. When the Kavio Labs EU VAT Number Validation or EU e-Invoicing add-on is installed, its VAT ID field is used instead and no second field is added.

Invoices created in the admin panel are sent at once. Invoices created by storefront orders (for example when a payment gateway sets the order to Processed) wait in the queue so checkout is never slowed down. Run the queue every 5 minutes with either line from Settings → General → Send queue:

php /path/to/store/admin.php --dispatch=kv_ksef.cron

or the cron URL with its secret key (index.php?dispatch=kv_ksef.cron&key=...). You can also click Send queue now on the KSeF invoices page.

KSeF invoices belong to orders: viewing needs View orders, creating and sending needs Edit order details. The KSeF connection and the mapping need Manage settings. In Multi-Vendor, vendors see the KSeF invoices of their own orders and, when vendors issue their own invoices, manage their own KSeF connection.

Upload the new version over the installed one (Add-ons → Manage → upload) or install the Upgrade Center package. The add-on completes the upgrade itself on the next admin page: missing tables, columns, settings and texts are added, your settings, connections and documents stay untouched.

  • Disable the add-on or switch off Create KSeF invoices to stop creating new invoices. Queued invoices are not lost.
  • Uninstall keeps your KSeF records. Invoices must be kept for at least 5 years (Ordynacja podatkowa art. 70 and 86) and their numbers must never be reused, so uninstalling removes only the customer field; the KSeF invoices and corrections with their KSeF numbers and UPO receipts, the number series, the KSeF connection and the settings (including the license key) stay. Installing the add-on again continues the numbering without duplicates.
  • Delete everything: export what you need first, tick Permanently delete all invoice data on uninstall in the add-on settings, save, and uninstall. If the add-on is already uninstalled, install it, tick the setting and uninstall again. KSeF itself keeps your invoices: you can download them from the KSeF taxpayer application at any time.
  • Upgrading from 1.0.1 or earlier: upload the new zip over the installed add-on (or use the Upgrade Center), never “the safe way”: the uninstall step of the earlier version still deletes the data.