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:
- correct country codes and VAT rates,
- conversion of foreign currencies at the NBP rate (see currency rates on an invoice),
- validation against the schema before sending.
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:
- assigns a KSeF number (the invoice's unique identifier in the system),
- issues a UPO — the official confirmation of receipt, meaning proof that the send succeeded and the invoice was issued once the KSeF number was assigned (see what a UPO is).
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.