Cloud Computing · KSEF

Poland’s KSeF does not cover everything: how to automate documents outside KSeF

Remote Admin SysOps Team·November 23, 2026·21 min read

KSeF, Poland’s National e-Invoicing System, has put one stream of documents in order: domestic invoices between businesses arrive as structured XML and no longer have to be read from an image. Invoices from foreign suppliers, pro forma invoices, accounting notes, contracts, purchase orders, warehouse documents, bank statements and the whole archive from before the obligation stay outside the system. Full automation comes only from an application that takes both streams into one register, reads and verifies the documents from outside KSeF, and matches KSeF invoices against the order, the delivery and the contract.

If you look after finance or IT for a group with a Polish subsidiary, here is the short version. KSeF (Krajowy System e-Faktur) is the state system through which companies in Poland issue and receive invoices. It has been mandatory in stages since 1 February 2026, and an invoice in KSeF is a structured XML file, not a PDF.

“KSeF automation” is therefore often understood in a simple way: the invoices sit in a state system, so the finance department stops retyping data. That is true for only part of the work. In this article we show, from the point of view of a CFO and a chief accountant, what KSeF has actually taken care of, which documents still reach a company by e-mail, on paper and as PDF files, and how to design one workflow for all of them. We build such systems as custom web and mobile applications, so we describe them from the practical side: what the software does and what remains a human decision.

Legal status as of November 2026. This article is for information only and is not legal or tax advice. Detailed rules, including exemptions from the obligation and the provisions on sanctions, must be checked in the current communications of Poland’s Ministry of Finance.

What did KSeF change in the flow of accounting documents?

KSeF turned the domestic invoice from an image into data. An invoice in the system is a structured invoice, that is an XML file in the logical structure FA(3) (FA_RR for VAT RR invoices), and KSeF assigns each invoice a unique identifying number.

The obligation came in stages. From 1 February 2026 it covered taxpayers whose sales including tax exceeded PLN 200 million in 2024, and from 1 April 2026 the remaining taxpayers. Receiving invoices through KSeF has been mandatory since 1 February 2026. Until the end of 2026, taxpayers whose monthly invoiced sales do not exceed PLN 10,000 gross may still issue invoices outside the system. From 1 January 2027 the obligation covers them as well, including invoices previously issued from cash registers and receipts of up to PLN 450 that show the buyer’s NIP (the Polish tax identification number), which are treated as simplified invoices. The Ministry of Finance lists the legal acts and dates on its page Legal basis and key dates (in Polish), and describes the last stage in its notice on the changes from 1 January 2027 (in Polish).

For a finance department this has three practical consequences:

  • There is nothing to read. Seller, buyer, number, dates, line items and amounts are fields in a file, not characters in an image. The software does not have to decide whether an invoice number contains a zero or the letter “O”.
  • There is one identifier. The number assigned by KSeF works well as the key by which an application recognises that it already has a given invoice in its register.
  • There is one channel for domestic invoices between businesses. A document no longer waits in a sales representative’s inbox or on a site manager’s desk until someone passes it to accounting.

That is where the state system’s work for the company ends. The structure says what the issuer entered on the invoice. It does not say whether the goods arrived, whether the price matches the contract, who should approve the invoice, or which account and cost centre it should be posted to. That part of the work has stayed in the company.

Which documents stay outside KSeF?

Outside KSeF you will find invoices from entities with no seat or fixed establishment in Poland, invoices for private individuals who do not run a business (these may be issued in KSeF voluntarily) and documents from certain special procedures. A further group is never sent to the system at all: pro forma invoices, internal invoices, internal documents, and debit and credit notes (in Polish: noty obciążeniowe and noty uznaniowe). On top of that comes a large group of documents that are not invoices at all, but without which an invoice cannot be checked properly.

According to the Ministry’s page Scope of mandatory KSeF (in Polish), the special procedures concerned are the non-EU OSS scheme and IOSS, and the obligation also does not cover some exempt services, tickets and motorway tolls. Since 1 February 2026 invoices with attachments may be sent to KSeF. This mainly concerns energy, gas, telecommunications and fuel, and it is optional. The table below collects what matters most for a document workflow.

Document Does it go through KSeF? How it usually reaches the company What the application has to do
Domestic invoice from another business Yes, as XML in the FA(3) structure Download from KSeF Check the substance, match it to the purchase order, route it for approval
Invoice from a supplier with no seat or fixed establishment in Poland No PDF by e-mail, supplier portal, paper Read it, verify it, record it in the same register
Invoice from a taxpayer with monthly sales of up to PLN 10,000 gross May be issued outside KSeF until the end of 2026; covered by the obligation from 1 January 2027 Paper, PDF Read and verify it, and from 2027 handle it in the KSeF stream
Pro forma invoice Never PDF by e-mail Record it as the basis for a prepayment and link it to the later invoice
Debit note or credit note Never PDF, paper Read it, link it to the business partner and the case
Internal invoice, internal document Never Created inside the company Assign a number, record it, archive it
Contract, purchase order, goods issued note (WZ), goods received note (PZ) No, these are not invoices E-mail, scan, warehouse or purchasing system Index them and make them available for comparison with the invoice
Bank statement, customs document, employee expense receipt, payroll-related document, correspondence No, these are not invoices Online banking, e-mail, paper Classify, index, assign to a case

The list of exceptions is longer, so before you design the workflow it has to be compared with the types of transactions your company actually has. That is a task for the accounting team or a tax adviser, not for a software contractor.

Foreign invoices and KSeF: why they still arrive as files

Invoices issued by taxpayers that have neither their seat nor a fixed establishment in Poland do not pass through KSeF. For a company that buys goods, licences, transport services or subscriptions abroad, this stream looks the same as it did before 2026: a PDF in an e-mail, a document to download from a supplier portal, sometimes paper. For the Polish subsidiary of an international group, the same applies to invoices from group companies abroad, as long as the issuer has no seat or fixed establishment in Poland.

These documents are harder to automate than domestic ones, for several reasons:

  • Layout and language. Every supplier has its own template, and the field names are in the issuer’s language.
  • Number and date notation. The amounts 1,234.56 and 1.234,56 are the same value written in two conventions. The date 03/04/2026 means 3 April or 4 March, depending on the issuer’s country.
  • Currency. The document is in a foreign currency and sometimes states amounts in two currencies at once.
  • Identifiers. Tax numbers from other countries have different formats, so the check that works for the Polish NIP is not enough here.

What the application checks on an invoice from a foreign supplier

  • Arithmetic: whether the line items add up to the summary and whether the net amount plus tax gives the amount due.
  • Currency: whether it matches the purchase order or the contract with this supplier.
  • Date: the application settles the format on the basis of the issuer’s country and earlier documents, and sends an ambiguous notation to a person.
  • Bank account: the IBAN checksum and whether the account matches the one stored in the supplier’s master record. A changed bank account on an invoice should hold the document until it is explained, because it can be a trace of attempted payment fraud.
  • Duplicates: whether a document with the same number from the same supplier has already been recorded.

How such an invoice is treated in the company’s records depends on the type of transaction and is a decision for the accounting team. At most, the application can suggest the treatment on the basis of earlier documents from the same supplier. How a vision-language model reads such files, and where classic optical character recognition (OCR) goes wrong, is described in our article on the differences between OCR and AI on invoices.

What does a workflow with KSeF and non-KSeF documents look like in one department?

Since KSeF became mandatory, a finance department in Poland has been working on two streams at the same time: structured data from the state system, and documents that still arrive as files, scans and paper. The trouble is not that either of them is difficult. The trouble is that they run separately.

Here is an illustrative example that does not describe any specific client. In a single day, a mid-sized trading and services company receives:

  • domestic purchase invoices visible in KSeF,
  • an invoice from a carrier in another country, as a PDF, in a foreign currency,
  • a pro forma invoice from a supplier who is waiting for a prepayment,
  • a debit note from a business partner for damaged returnable packaging,
  • goods issued notes (WZ) signed in the warehouse and photographed with a phone,
  • the bank statement for the previous day,
  • expense receipts from an employee who has just returned from a business trip.

If each of these documents lives in a different place, the same problems keep coming back:

  • No links. The invoice is in one system, the purchase order is in the buyer’s mailbox, and the goods issued note is in a binder in the warehouse. Checking a single line item takes three conversations.
  • Double documents. A supplier sometimes sends a PDF image of the invoice by e-mail out of habit, although the same invoice is already in KSeF. Without duplicate control it is easy to enter it twice.
  • No single view. Nobody can quickly say what is waiting for approval, what is waiting for delivery and what is waiting for payment.

KSeF automation: two streams, one application

The answer is one document register with two entrances. At the entrance, the streams differ in how the data is obtained. From the moment the data is confirmed, a KSeF document and a non-KSeF document follow the same path: approval under the same thresholds and permissions, account coding, export to the ERP system or accounting software, and an archive with a single search. KSeF automation is therefore not a separate project next to “the rest of the documents”. It is one of two gates into the same process.

Stage Invoice from KSeF Document from outside KSeF
Intake Download of the XML file from the system E-mail inbox, scanner, file upload, photo from a phone
Recognising the type The type is known in advance Classification: invoice, pro forma, note, goods issued note, contract, other
Obtaining the data Fields are read from the structure, with no image recognition An AI model reads the document and every field is verified
Identifier The number assigned by KSeF Business partner, document number and date, plus the internal register number
Checks Business partner in the master data, duplicate, consistency with the order, the delivery and the contract The same checks plus reading checks: checksums, arithmetic, dictionaries
Doubts A discrepancy in substance goes to the person responsible for the purchase An uncertain field or a discrepancy goes to the verification queue

For the user, the most important thing is a shared document card. On one screen the accountant sees the invoice data, the original (the XML file or the image), the linked purchase order, the delivery document, the approval history and the comments. A department manager approves the cost in a browser or on a phone and sees the same thing. An auditor gets the full history: who approved the document, when, and on what basis.

Downloading invoices from KSeF, queues, retries and reconciling data with the finance and accounting system is an engineering subject that we cover separately in the article on integrating an application with ERP, accounting software and KSeF. The technical details of the KSeF interface must always be taken from the current documentation of the Ministry of Finance.

How do you match a KSeF invoice with the purchase order, delivery note and contract?

An invoice is matched by business partner, order number, line items, quantities and prices, and the result of the match decides whether the document goes straight to approval or to clarification. Nobody retyped the KSeF data, but that does not mean the invoice is justified. The application carries out the match in a fixed order:

  1. Identifying the business partner. The seller’s NIP on the invoice points to an entry in the master data. A missing business partner starts the process of setting one up. It does not lead to a new entry being created quietly.
  2. Finding the order. If the issuer put the order number on the invoice, the application searches by that number. If not, it goes through this partner’s open orders with a similar value and date and leaves the choice to a person.
  3. Comparing line items. Goods or services, quantities, unit prices and currency on the invoice are set against the lines of the order.
  4. Comparing with the delivery. Quantities on the invoice are compared with the goods received note (PZ) or with the confirmation that the service was performed.
  5. Comparing with the contract. The application checks the price list, the term of validity, the value limit and the payment term recorded with the contract.
  6. Decision. A document that agrees within the tolerance limits takes a simplified approval path. Where there is a discrepancy, a specific person receives a task describing the difference, for example “quantity on the invoice greater than the quantity received into the warehouse”.

Tolerance thresholds, for example the permitted difference that results from rounding, are set by the company, and every use of an exception is saved in the document history together with the reason. Which fields of the FA(3) structure are mandatory and which the issuer fills in optionally has to be checked in the documentation of the structure. This determines which data automatic matching can rely on and what you need to ask suppliers for, for example to state the order number consistently.

Invoices without a purchase order

Utilities, subscriptions, rent and recurring services rarely have a purchase order. The application compares such invoices with the contract and with the pattern from earlier periods: the same business partner, a similar amount, the same account and cost centre. A deviation from the pattern does not block the document, but the approver can see it. Contract terms can be indexed in advance, and with longer documents AI helps, as we explain in the article on analysing contracts and documents without sending them to the cloud.

How do you automate invoices and documents outside KSeF without retyping data?

Documents from outside KSeF are automated in three steps: reading the content, verifying every field with control rules, and handing over to a person only those fields the system could not confirm. Classic OCR is a mature technology and copes well with clean, repeatable documents. It weakens on low-quality scans, stamps, handwritten notes and new layouts, and there is no shortage of such files in the non-KSeF stream. AI models read them more freely, but they can return a value that looks plausible and is wrong. That is why reading alone, whatever the technology, is not enough.

The control layer consists of rules that do not depend on who or what read the document:

  • checksums of the NIP and the bank account number,
  • arithmetic: the sum of the line items equals the summary, and net plus VAT equals gross,
  • the business partner dictionary: name, identifier and bank account agree with the master data,
  • duplicate detection, including across streams, when the same document arrived by e-mail and is also in KSeF,
  • comparison with the purchase order or with KSeF data, for example a pro forma invoice against the invoice that appeared later,
  • date rules: the payment due date is not earlier than the issue date, and the issue date is not in the future.

A field that fails a check or was read with low confidence goes to the verification queue. An employee sees the relevant fragment of the document next to the proposed value and confirms or corrects it. This way of working is called human-in-the-loop, and it is the condition for nothing unverified reaching the accounting system.

In one of our deployments, an AI application processes very large volumes of accounting documents and indexes them with 100% accuracy, where classic OCR still makes mistakes. This is possible because the application does not trust a single reading: it combines AI reading with the control rules described above and routes every uncertain field to a person, so nothing unverified enters the accounting system. The result depends on the documents and the rules, so in every project we measure accuracy on the client’s own documents in a pilot, before the system goes into production. We describe the whole architecture in the article on automated accounting document processing.

Accounting documents contain personal data: of sole traders, employees and the people who sign contracts. One of the first design decisions is therefore where the model runs. It can be a service available through an API, or an open model running on a GPU server in Poland, so that the documents do not leave the country. We have collected the selection criteria in the article AI model in the cloud or on your own server.

What should you do with the document archive from before KSeF?

The archive from before the obligation is best digitised and indexed with the same mechanism that handles current non-KSeF documents, starting with the years and document types the company actually reaches for. KSeF did not take over historical documents. Binders, scans on network drives and invoices issued before the obligation are still the only source of knowledge about past transactions.

People go back to the archive during an audit of the financial statements, an inspection, a dispute with a business partner, a complaint or a contract renewal. The order of work can be set using simple criteria:

  • How often documents are needed. Start with the documents someone looks for every month.
  • Connection with current matters. Multi-year contracts, warranties, fixed assets, open settlements.
  • Condition of the medium. Fading printouts and documents that exist in a single copy.
  • Retention period. It follows from the law and depends on the type of document, so it has to be confirmed with the accounting team or an adviser before anything is destroyed.

An indexed archive gives you search by business partner, number, amount, period and content, and it gives you links: next to a current KSeF invoice you can see the earlier documents from the same supplier and the contract the prices come from. On such a collection you can also build an assistant that answers questions and cites its source, which we describe in the article on a company knowledge base with AI. A digital archive needs the same discipline as the books: role-based permissions, an access history and backups with regularly tested restores.

Common mistakes when automating document workflow after KSeF

Before a pilot starts, it is a good idea to check your KSeF automation plan for a few recurring mistakes:

  • Assuming that KSeF closes the subject. The company sets up the download of invoices from the system and leaves the rest of the documents in e-mail. The result is two processes, two registers and two versions of the truth.
  • Automating approval without order data. If orders are placed in e-mails and phone calls, the application has nothing to compare the invoice with. The ordering process has to be sorted out first.
  • Trusting the reading without a control layer. A non-KSeF document that is read by any tool and posted straight away means errors that only come out at payment.
  • Leaving out notes, pro forma invoices and internal documents. There are fewer of them than invoices, but they get lost in correspondence easily.
  • Assuming the law will not change. From 1 January 2027 the obligation covers another group of taxpayers, so some paper documents will move into the KSeF stream. The application should allow rules to be changed without a rebuild.

Where should you start with automating documents outside KSeF?

The best way to start with KSeF automation and with documents outside the system is to count your own documents and choose one stream for a pilot, and only then to talk about technology. This order works well:

  1. Inventory. List the document types from recent months: where they come from, in what form, how many there are, and who enters and approves them today.
  2. Split into streams. Separate what comes from KSeF from what stays outside it, and check with the accounting team what will change from 1 January 2027.
  3. Choice of pilot. Pick a stream with a high volume and clear rules, for example foreign invoices or delivery documents.
  4. Rules and dictionaries. Agree the checks, tolerances, approval paths and the scope of data that should go into the index.
  5. Pilot with measurement. Run the application on real documents in parallel with the existing process and compare the results field by field.
  6. Integration and extension. Once the pilot is accepted, connect the application to the accounting system and then add further document types.

Not every company needs a large system from day one. Simple forwarding of attachments from a mailbox to a register, or notifications about new documents, can be built with a workflow automation tool such as n8n. A custom application starts to pay off when there are many documents, the rules are specific to the company, and mistakes are expensive. How to approach the calculation is covered in our article on how to calculate the return on an AI project.

Who is responsible for what in an automated workflow

Responsibility for content and decisions stays with the company, while the application takes over the repetitive activities: intake, reading, checks, reminders and passing data on. The roles have to be agreed before the pilot.

Role Responsible for
CFO, management board Scope of automation, approval thresholds, tolerances, priorities
Chief accountant Account coding rules, dictionaries, tax decisions, sign-off of the pilot
Accounts payable team The verification queue, clarifying discrepancies with suppliers
Purchasing and department managers Orders recorded in the system, approval of costs on their merits
Warehouse Confirming receipts and issues as they happen, sending in goods issued and goods received notes
IT department Accounts, permissions, integrations, backups
Application contractor Development, testing, measuring accuracy in the pilot, maintenance

FAQ: frequently asked questions

Does KSeF cover invoices from foreign suppliers?

Invoices issued by taxpayers that have neither their seat nor a fixed establishment in Poland do not go to KSeF. The company receives them as before: as PDF files, through a supplier portal or on paper. They therefore need to be read, verified and recorded outside the structured stream.

Which documents are not sent to KSeF?

Pro forma invoices, internal invoices, internal documents, and debit and credit notes are never sent to KSeF. The system also does not carry contracts, purchase orders, goods issued and goods received notes, bank statements, customs documents or correspondence. The current scope of the obligation and the exceptions are published by Poland’s Ministry of Finance.

Does a company in Poland still need to read invoices from files and scans after implementing KSeF?

Yes, if it receives documents from outside KSeF: foreign invoices, notes, pro forma invoices or delivery documents. KSeF invoices do not have to be read from an image, because they are XML files. The remaining documents still need reading and checking before they reach accounting.

Does an invoice downloaded from KSeF still need to be checked?

Yes. KSeF data does not need to be retyped, but the system does not know whether the goods arrived, whether the price matches the contract, or whether the purchase was ordered. The company performs these checks, and an application can automate them by comparing the invoice with the purchase order, the delivery document and the contract.

How do you link KSeF invoices with purchase orders and delivery notes?

You need a shared register that holds invoices, orders and warehouse documents. The application finds the order by business partner and number, compares line items, quantities and prices, and passes any discrepancy to a specific person. The condition is that orders and goods receipts are recorded in a system, not only in e-mails.

What changes in KSeF from 1 January 2027?

From 1 January 2027 the obligation also covers taxpayers who, until the end of 2026, could issue invoices outside KSeF because their monthly sales did not exceed PLN 10,000 gross. It also applies to invoices previously issued from cash registers and to receipts of up to PLN 450 that show the buyer’s NIP, which are treated as simplified invoices. The details are in the Ministry of Finance notice on the last stage of the rollout.

Is automating documents outside KSeF worth it for a small company?

It depends on the number of documents, how varied they are and what mistakes cost. With a small volume, an orderly register and simple workflows are usually enough. A custom application is justified when there are many documents, they come from many sources, and they need to be matched to orders or contracts.

A free quote for a document workflow application

We design and build applications that bring KSeF invoices together with documents from outside the system: they take in files from e-mail, a scanner and a phone, read them with AI, verify them with rules, match them to purchase orders and pass the data to the accounting system. We choose the technology to fit the project, and we can host and maintain the application in Polish data centres or on the client’s infrastructure.

The quote is free and without obligation. We start with a conversation about which documents reach your company and what happens to them manually today, and then we present the scope, schedule and budget. See our offer for web and mobile app development or write to us and describe your document workflow.