Skip to content
KSeF Kit

How to Issue a Structured Invoice in KSeF, Step by Step

To issue an invoice in KSeF: you gather the sale data, your tool builds an XML file in the FA(3) format from it, you authorize a session (token or XAdES signature) and send the document to KSeF, and the system responds with a KSeF number and a UPO. The issue date is the date you send it to KSeF (art. 106na sec. 1 of the VAT Act). That's how KSeF works.

A structured invoice is not a PDF or a scan — it's an XML file in the FA(3) format that KSeF can read by machine. Under the law (art. 2 point 32a of the VAT Act), it's an invoice issued through KSeF together with an assigned identifying number for it in the system. Since 1 February 2026 the FA(3) structure has been in force — it replaced FA(2) (in force from 1 September 2023 to 31 January 2026). Here's the full path: from sale data to a KSeF number and a UPO.

How do you issue an invoice in KSeF?

Step by step: (1) you gather the invoice data, (2) your tool builds an XML in the FA(3) format from it, (3) you authorize a session with a token or signature, (4) you send the document to KSeF, (5) you receive a KSeF number and a UPO. The issue date is the date you send it (art. 106na sec. 1).

1. Gather the invoice data

A structured invoice carries the same data as a regular one: seller, buyer (with NIP), line items, VAT rates, amounts, sale date and issue date. The difference is in the form — every field has a strictly defined place in the FA(3) schema.

2. Build the FA(3) document

You don't write the XML by hand. Your invoicing tool maps the data onto the FA(3) schema — which covers, among other things:

3. Open a session and sign

KSeF 2.0 requires an authorized session. You authenticate with a token or a signature (such as XAdES), open an online session, and send the document within it. KSeF 2.0 production has been live since 1 February 2026; for risk-free trials there's the TEST environment (available since 3 November 2025), where authorization is fictional. There's also Demo/preprod (since 15 November 2025) with real NIP authentication, but outside production.

4. Send it and get your KSeF number

After you send it, KSeF validates the document. If it's valid, KSeF:

Remember: the invoice's issue date is the date you send it to KSeF (art. 106na sec. 1 of the VAT Act) — not whatever date you type into a field on the document.

If the document has an error, you get a rejection code — then you fix the data and send it again.

5. Save the number and UPO

The KSeF number and UPO are your proof of filing. A good tool writes them back onto the invoice so you don't have to track them down by hand. In KSeF Kit, the KSeF number and UPO land on the Stripe invoice automatically.

Automation instead of clicking

Issuing individual invoices by hand in the portal is possible, but with any real volume of sales it's tedious and error-prone. If you invoice in Stripe, an invoice can reach KSeF automatically once it's finalized — with no copying of data. See the Stripe + KSeF integration.

Frequently asked questions

How is a structured invoice different from a PDF?

A structured invoice is an XML file in the FA(3) format with strictly defined fields, not an image of a document. That lets KSeF read it automatically, validate it, and assign it a number.

Do I have to build the XML by hand?

No. Your invoicing tool or integration builds the XML for you from the invoice data. You supply the sale details, and the system assembles a valid FA(3) and sends it to KSeF.

How do I know the invoice reached KSeF?

Once it accepts the invoice, KSeF assigns a unique KSeF number and issues a UPO — the official confirmation of receipt. That's your proof the document was filed.