KSeF incoming invoices: how to pull and match purchase invoices

To check KSeF incoming invoices, you pull the purchase invoices assigned to your company's tax number (NIP) from the national system, not from supplier emails. Each invoice carries a KSeF number. You match that number, the supplier's NIP, the gross amount and the date against your purchase orders and your bank lines. Invoices that match go straight to posting. Invoices that do not match go to a person. The receiving duty has applied since 1 February 2026, and under current law financial penalties start on 1 January 2027, although a bill to delay them to 2028 has passed the Sejm and is not yet law. The rest of this guide explains the steps, the tools, and where a person still has to check.
In short
- Receiving KSeF invoices has been mandatory since 1 February 2026, and the matching work starts there, not in 2027.
- Under current law penalties start 1 January 2027, but a bill to move them to 2028 has passed the Sejm and still needs signing.
- From 1 January 2027, the KSeF number belongs in the bank transfer title for payments between active VAT payers.
- Match on the KSeF number and supplier NIP first, then on amount and date, and send anything unclear to a person.
- Set the pull schedule against the API rate limits and the 10,000-record cap, and check for truncated results every time.
Why this matters before penalties start
Most KSeF guides focus on the sales side: how to issue an invoice in the system. The buying side is where the day-to-day work sits. Since 1 February 2026, companies have had to receive invoices through KSeF. The Ministry of Finance's own page on the rollout sets out the schedule, and the list of groups and dates is short enough to check in a minute. The penalty clock is the part most owners have not yet worked through.
Under current law, penalties for KSeF errors apply from 1 January 2027. Those penalties are set in article 106ni of the VAT Act. For an invoice issued outside the system, the tax office can impose a fine of up to 100% of the VAT shown on that invoice. For an invoice with no VAT shown, the cap is 18.7% of the gross amount. Those are the statutory caps, and the Ministry has said that sanctions from 2027 will be assessed case by case rather than applied automatically.
The penalty deadline is not settled yet. The Ministry of Finance announced in September 2026 that it wants to delay penalties to the end of 2027, and a draft bill was adopted by the Council of Ministers. The official ministry news page says the bill, still in the Sejm at that point, would extend the delay to the end of 2027. A later report from rp.pl says the Sejm has since passed the bill and sent it to the Senate. Until the bill is signed and published, the law as it stands says 1 January 2027. Plan for that date. If the bill becomes law, you gain a year, but the receiving duty itself does not move.
For a buyer, the fine is mostly not the main risk. The seller issues the invoice and faces the penalty. Your exposure comes from three other places. First, an invoice without a valid KSeF number is treated as a problem for input VAT deduction, so your VAT claim is at risk. Second, from 1 January 2027, the KSeF number has to appear in the bank transfer title for payments between active VAT payers. Third, your own books and your JPK_VAT filing need to agree with what is in KSeF. If they do not, the differences are visible to the tax authority.
What it costs when this goes wrong
The cost of this problem is mostly staff time and VAT timing, not a single fee. Each supplier invoice that arrives by email as a PDF has to be checked against what the system holds. Each one needs a matching purchase order, a receipt where you use one, and a bank line when it is paid. When these records are kept by hand, errors show up late, at month end, when the VAT return is due.
No public source gives a reliable average for how many staff hours this takes in a given firm, so this guide does not give a total. The figures that matter for your own estimate are the number of supplier invoices per month, the share that come through a supplier portal or email, and the share that do not match an order on the first try. Count those three numbers for one month. The free audit measures them for your business.
The cost also rises if you wait. Invoices that come in during 2026 with no KSeF number will still need a decision in 2027, when the bank transfer rule applies. Suppliers who are slow to move will create a backlog of paper or PDF invoices that someone must re-key.
The manual way and the automated way
The table below compares the two approaches on the points that matter for a receiving process. The automated column assumes a KSeF connection through your ERP or an integrator, with a person still approving exceptions.
| Step | Manual way | Automated way |
|---|---|---|
| Getting the invoices | Someone logs into the KSeF web application and downloads files, or waits for PDFs in email | A scheduled job calls the KSeF API for purchase invoices by date range and stores the XML and metadata |
| Recording the KSeF number | Typed into a spreadsheet, often with errors | Read from the invoice metadata and checked for format before it is saved |
| Matching to orders | Someone compares supplier, number and amount by eye | Matched by supplier NIP, amount, date and order reference; unmatched items go to a queue |
| Matching to bank lines | Done at month end from the bank statement | Bank statement lines are matched by amount, date and the KSeF number in the transfer title |
| Exceptions | Found when the VAT return or the supplier calls | Listed the same day with a reason, such as a missing order or a wrong NIP |
| Who signs off | The bookkeeper, after the fact | A named person approves each exception before posting or payment |
The automated way does not remove the bookkeeper's judgement. It moves the routine matching to a machine and leaves the unusual cases in front of a person, on the same day they arrive.
Step by step: setting up the receiving process
Step 1: Confirm access and permissions
Start with the access you have. The Ministry provides a free web application for issuing and retrieving invoices, which suits a low volume of purchase invoices. For a higher volume, the KSeF 2.0 API is the route. It needs authentication with a qualified electronic signature, a trusted profile, or an authorisation token that is linked to your NIP. Ask your ERP vendor or accountant which of these your company already holds. If nobody holds one, the first task is to create it, not to build a matching rule.
Step 2: Pull purchase invoices on a schedule
The API supports searching purchase invoices by date range and downloading the XML. The Ministry's API documentation sets a technical cap of 10,000 records per filter set, and the date range for a single query has been extended to 100 days, calculated in UTC, according to a September 2026 release note. When a result is truncated, you narrow the date range and continue from the last date returned. For larger volumes, the export endpoint packages invoices into a file, and this is the better choice than fetching invoices one by one.
Set the schedule against the rate limits. The API publishes its limits through a rate-limits endpoint, so the job should read them and back off when it receives a throttling response. Run one daily pull for purchase invoices and a second, shorter pull on the days when payments are made. Do not poll every minute out of habit.
Step 3: Store the XML, not just the PDF
The XML is the invoice that the system accepted. A PDF is a picture of it. Store the XML and the metadata together, and name the files by KSeF number. Keep the metadata in the ERP or in a database table so that a later check does not depend on someone's inbox.
Step 4: Validate the key fields
Before matching, check four things on each invoice: the KSeF number is in the expected format, the buyer's NIP is your own, the supplier NIP is in your supplier list, and the currency and VAT rate are correct. A buyer NIP typed into the wrong field is a common reason an invoice never appears for the buyer, even when it was accepted. Route any failure to the exception queue.
Step 5: Match to purchase orders
Match on supplier NIP, gross amount and invoice date first. Then match on the order number, which the supplier may print on the invoice or which your purchasing system holds against the supplier. Use a tolerance for rounding in the cents only. Amounts that differ by a larger margin should never be matched automatically. Where your business does not use purchase orders for a supplier, such as a utility or a rent invoice, match by supplier and contract instead.
Step 6: Match to bank lines
From 1 January 2027, the KSeF number must be quoted in the bank transfer title for payments between active VAT payers. The bank statement then carries the reference you need. Import the statement daily as a CSV or through your bank's feed. A match on the KSeF number is strong. A match on amount and date alone is weaker, and should go to review if two invoices share the same amount.
Step 7: Use OCR and an assistant only for documents outside KSeF
Not every supplier invoice will come through KSeF. Foreign suppliers, invoices to a private purchase, and some older documents may arrive as PDFs. For these, optical character recognition reads the header fields, and a language model can suggest the likely order and the supplier. Treat the output as a draft. A person confirms the supplier, the amount and the VAT figure before the entry is posted.
Step 8: Send the exceptions to a person
Build a short list of reasons an invoice is held: no order found, amount outside tolerance, unknown supplier NIP, KSeF number missing or invalid, and payment without a KSeF reference. Each item should show the reason, the invoice, and the candidate match. The person who approves the exception should be named in the process. The same queue can carry a message to the supplier asking for a corrected invoice, through email or through WhatsApp Business API if your supplier already uses WhatsApp for orders.
Step 9: Write back and report
Once an invoice is matched and approved, write its status and the bank reference back to the ERP. Keep a daily count of invoices received, matched and held. This count is the evidence for your month-end and VAT checks, and it shows whether the held queue is growing.
Tools that fit this job
The right tools depend on your volume and the system you already run. For a small firm with few purchase invoices, the Ministry's free web application, a spreadsheet and the daily bank export can cover the work, with a person doing the matching. A spreadsheet is fine for under a few dozen invoices a month. Above that, the matching rules become hard to keep correct in a spreadsheet.
An ERP that has a KSeF module or an integration can pull and store invoices directly. Several ERP and accounting products sold in Poland offer this. Check each vendor's current documentation for the receiving function, because the scope differs by product and version. For a custom connection, an integrator can build the API calls, the scheduler and the matching logic, usually in a language such as Java or .NET, as the Ministry's own API documentation shows through its sample code. Automation tools such as Power Automate or Zapier can move files and send alerts, but they are not a substitute for a tested KSeF connection.
What breaks and how to prevent it
The most common failures are predictable, and each has a preventive step.
- Missed invoices after an outage. KSeF has offline modes for downtime. An invoice issued offline must be sent within a short window, and the penalty for late sending applies from 2027. Your receiving job should check the status of recent invoices every day, not just the new ones.
- Duplicate matches. Two invoices from the same supplier with the same amount can match the same bank line. Require the KSeF number to match where it exists, and send ties to review.
- Supplier NIP changes. A supplier that changes its NIP or its bank account will produce invoices that do not match your supplier list. Flag the mismatch, do not auto-create a new supplier.
- Rate limits and truncated results. A job that pulls too often gets throttled. A job that does not handle the truncation flag misses invoices silently. Test both before go-live.
- Payments without the KSeF number. From 2027, a transfer without the number is a control gap. Build a bank-side check that lists payments lacking the reference, and ask the bank or your payment tool to add the field.
- Changes to the rules. The Ministry has changed the API, the limits and the dates several times in 2026. Assign one person to read the Ministry's notices each month.
Automation also has a real limit here. A matching engine cannot decide whether a delivery was accepted, whether a price was agreed, or whether a supplier's VAT treatment is correct. Those decisions stay with a person, and the process should say so in writing.
When not to automate
Automation is not worth the effort in some cases. If you receive only a handful of supplier invoices a month, and your suppliers all use the Ministry's web application, a checklist and a spreadsheet are enough. If your accounting firm already receives and posts all your purchase invoices and runs the matching, a second system adds a source of disagreement. If your suppliers are mostly paid by cash or card on the spot, the matching problem is small. In each case, first fix the supplier master data and the bank reference habits, then decide.
Do not automate the approval of invoices above an amount you set, or of any invoice from a supplier whose details have changed. Keep those in front of a named person.
What it typically takes
The time is in the setup, not in the daily run. Expect a short first phase to confirm access, pick the route (web application, ERP module, or API), and map your supplier list and purchase orders to the NIP. The second phase is the connection and the matching rules, tested on a month of past invoices. The third phase is a parallel run, where the manual process and the new process both run for a month, and the differences are reviewed. The time for each phase depends on the number of suppliers, the state of your supplier master data, and whether your ERP already holds the KSeF data. Your own volumes decide the length. The free audit measures these for your business before any build starts.
This explains the rule in general terms; it is not legal or tax advice for your case.
Sources
- Poland 2026 B2B KSeF e-invoicing penalties deferred to 2028 - vatcalc.com
- Poland’s KSeF 2.0 - the official e-invoicing mandate
- KSeF Poland: 2026 E-Invoicing Requirements & Implementation
- E-invoicing-KSeF to launch on schedule, no delays confirmed - Fiscal Solutions
- Ministry of Finance: Penalties for Errors in KSeF Do Not Have to Be Maximum
How AiStaffo would automate this
AiStaffo would connect the purchase invoice feed from KSeF, using the company's own authorisation, to the ERP or accounting file that already holds the orders and the bank statement. A scheduled worker would pull new purchase invoices each day, store the XML and metadata, match each invoice on KSeF number, supplier NIP, amount and date, and post the matches. Invoices with no order, a changed supplier NIP or a missing KSeF reference would go into a short exception list with the reason. The owner or bookkeeper still approves the exceptions, decides on disputed invoices, and confirms the payment run. To measure what this would mean for your own volumes, Book a free automation audit.
Questions people ask
How do I download purchase invoices from KSeF?
Do I have to check KSeF invoices every day?
When do KSeF penalties start?
Can I put the KSeF number in my bank transfer?
What if a supplier still sends PDF invoices?
Is it worth automating if I get only a few invoices a month?
Book a free automation audit
Thirty minutes. We look at one process you run every week and tell you exactly what an AI worker would take off your desk, and what it would not.

































