XSD+SCH Ministerstwo Finansów (Poland) · FA (3), 1-0E

KSeF FA(3) validator

Polish structured invoice (e-Faktura)

The structured invoice of the Polish National e-Invoicing System (KSeF), in the FA(3) version required from February 2026

Nothing is uploaded: the file is read and checked in your browser

About

Poland makes invoicing through KSeF mandatory in 2026. An invoice is an XML file in the FA structure; KSeF rejects a file that does not match the schema and assigns a KSeF number to one that does.

FA(3) replaced FA(2). The schema imports the Ministry's shared type and code list schemas (StrukturyDanych, ElementarneTypyDanych, KodyKrajow), included here.

KSeF invoice validator: FA(3) →

KSeF FA(3): create one with the free e-invoice generator →

Good to know

  • The schema checks structure and data types. After it, xmlvalid's rules repeat what KSeF 2.0 checks on the file beyond the schema: the NIP check digit of each party (KSeF's production environment only), no processing instructions and no discouraged Unicode characters; an attachment is a warning, as it needs the option registered in e-Urząd Skarbowy.
  • The rules also check what the Ministry's FA(3) information sheet and the VAT Act require of fields the schema leaves optional, which KSeF accepts either way: P_15 and the sums per rate, the lines against those sums, the tax in PLN of a foreign currency invoice, the elements of corrective, advance and final invoices, the PLN 450 or EUR 100 limit of a simplified invoice, the buyer's name and address, the notes on exemption, reverse charge, the margin scheme and split payment, JST and VAT group recipients and the settlement. Arithmetic that depends on rounding is a warning. The Ministry's FA(3) example files pass.
  • Not checked: duplicates, the sender's permissions, the file size, the issue date against the day of sending, and registers such as the VAT white list.
  • The imports of the shared type schemas point at local copies; nothing else is changed.
  • The example is the sample invoice from the Ministry of Finance ksef-pdf-generator project (MIT licence).

Files

4 files · 261.1 KB · Download all (.zip)

The validator loads all of these with their folder structure, so includes and imports resolve as published

Business rules

Schematron · run in this order

The rules run after the schema check, only when the document matches the schema, and in your browser like the schema check (with SaxonJS by Saxonica). Each finding names its rule, such as BR-CO-15, and the line it points at; each rule has a page with what it checks.

Example document

invoice.xml · 12.9 KB · passes the schema and the rules

In CI and from code

The same schema by its name, ksef-fa-3, through the API.

npx @xmlvalid/cli validate "**/*.xml" --schema ksef-fa-3
- uses: xmlvalid/validate-action@v1
  with:
    files: "**/*.xml"
    schema: ksef-fa-3
    api-key: ${{ secrets.XMLVALID_API_KEY }}
curl https://xmlvalid.com/api/v1/validations \
  -H "Authorization: Bearer $XMLVALID_API_KEY" \
  -F document=@invoice.xml \
  -F schema=ksef-fa-3

Free accounts get 100 API validations a month. On Pro, a URL monitor can check a published document against this schema every hour and email you when it breaks. More CI setups