KSeF FA(3)
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.
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.
E-invoicing in Poland: the rules in short and how to check an invoice →
Good to know
- The schema checks structure and data types. KSeF also checks the sender's permissions, NIP numbers and duplicates, which no schema covers.
- 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-
schemat.xsd main
-
StrukturyDanych_v10-0E.xsd
-
ElementarneTypyDanych_v10-0E.xsd
-
KodyKrajow_v10-0E.xsd
The validator loads all of these with their folder structure, so includes and imports resolve as published.
Example document
invoice.xml · 12.9 KB · valid against this schema
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={{ $schema->example ?? 'document.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