# FA(3) XML Examples
**NOTE:** All examples are purely illustrative and simplified. They do not guarantee correct validation against the XSD schema. Before using in a production environment, verify compliance with the current FA(3) technical specification and perform validation tests.
---
## Basic VAT Invoice
```xml
FA
3
2026-02-08T14:30:00
Autonomous KSeF Agent v2.1
1234567890
Moja Firma Sp. z o.o.
PL
ul. Przykladowa 1
00-001 Warszawa
0987654321
Klient Sp. z o.o.
PL
ul. Testowa 10
02-222 Krakow
PLN
2026-02-08
FV/2026/02/0008
2026-02-08
1
Programming service
hrs
100
100.00
10000.00
23
10000.00
2300.00
12300.00
VAT
0
2026-02-22
6
12 3456 7890 1234 5678 9012 3456
```
---
## Invoice with Multiple Items and VAT Rates
```xml
PLN
2026-02-09
FV/2026/02/0009
2026-02-09
1
Laptop Dell XPS 15
pcs
2
5000.00
10000.00
23
2
Technical books
pcs
10
50.00
500.00
8
3
Consulting services (export)
hrs
40
200.00
8000.00
0
10000.00
2300.00
500.00
40.00
8000.00
20840.00
VAT
```
---
## Corrective Invoice
```xml
FV/2026/02/0005/K01
KOREKTA
Error in unit price
2026-02-05
FV/2026/02/0005
1234567890-20260205-ORIGINAL123456-12
1
12300.00
1
Programming service (price corrected)
hrs
100
50.00
5000.00
23
5000.00
1150.00
6150.00
```
---
## Invoice with EMPLOYEE Contractor Type (Business Trip)
**New in FA(3):** New contractor type for business trip settlements
```xml
PRACOWNIK
85010112345
Jan Kowalski
PL
ul. Pracownicza 5
03-333 Warszawa
DEL/2026/02/001
Business trip settlement - February 2026
days
5
150.00
750.00
zw
VAT
```
---
## Offline24 Mode Invoice
```xml
FA
3
2026-02-10T08:00:00
Offline24
```
**Note:** Must be sent to KSeF within 24h of connectivity restoration. Receipt date = date of KSeF number assignment.
---
## Invoice with Attachments
**New in FA(3):** Ability to include attachments
```xml
FV/2026/02/0010
technical_specification.pdf
SPECYFIKACJA
256
a1b2c3d4e5f6...
delivery_protocol.pdf
PROTOKOL
128
f6e5d4c3b2a1...
```
---
## Invoice with MPP (Split Payment Mechanism)
```xml
FV/2026/02/0011
Structural steel (Annex 15)
kg
1000
20.00
20000.00
23
1
20000.00
4600.00
24600.00
MPP
12 3456 7890 1234 5678 9012 3456
98 7654 3210 9876 5432 1098 7654
```
---
## Validation before Sending
```python
def validate_fa3_before_send(xml_content):
"""
Basic validation before sending to KSeF
"""
checks = []
# 1. UTF-8 encoding
try:
xml_content.encode('utf-8')
checks.append(('UTF-8 Encoding', True))
except:
checks.append(('UTF-8 Encoding', False))
# 2. XML parsing
try:
root = ET.fromstring(xml_content)
checks.append(('Valid XML', True))
except:
checks.append(('Valid XML', False))
return checks
# 3. Namespace
if 'http://crd.gov.pl/wzor/2023/06/29/12648/' in xml_content:
checks.append(('FA(3) Namespace', True))
else:
checks.append(('FA(3) Namespace', False))
# 4. Schema version
if 'wersjaSchemy="1-0E"' in xml_content:
checks.append(('Schema version 1-0E', True))
else:
checks.append(('Schema version 1-0E', False))
# 5. Required fields
required = ['KodFormularza', 'P_1', 'P_2', 'P_15', 'NIP']
for field in required:
if f'<{field}' in xml_content or f'<{field}>' in xml_content:
checks.append((f'Field {field}', True))
else:
checks.append((f'Field {field}', False))
return checks
```
---
**Official FA(3) documentation:**
https://ksef.podatki.gov.pl/media/4u1bmhx4/information-sheet-on-the-fa-3-logical-structure.pdf