Features
Overview of KSeF Guard offline pre-submission validation capabilities
XSD Validation
Structural XML verification against the official FA(3) schema from the Ministry of Finance. Powered by libxml2 — an industry-standard XML validation engine. Precise error messages with exact locations in your XML.
128 Validation Rules
Substantive rules based on Art. 106e of the VAT Act, Ministry of Finance regulations, and the official FA(3) information brochure. 71 government-mandated, the rest best-practice, heuristic, security, batch, and inferred. Every rule includes bilingual problem/fix descriptions and SHA-256 verified source quotes.
Exchange rate missing for foreign currency invoice
Brak kursu waluty dla faktury w walucie obcej
Foreign currency invoice has VAT amounts in foreign currency (P_14_*W), but no exchange rate is provided. Either KursWalutyZ (global invoice rate) or KursWaluty (per-line rate) must be specified.
Provide the exchange rate in KursWalutyZ (global rate for the entire invoice) or KursWaluty (per-line rate). The rate should follow Art. 31a — the average NBP rate from the last business day before the tax obligation arises.
“The exchange rate used to calculate the amount of tax, in cases referred to in sec. VI of the Act. When amounts used for determining the tax base are provided in a foreign currency, the exchange rate applicable to a given line of the invoice shall be indicated.”
5 Export Formats
Text and Summary (Free). CSV, JSON, and PDF (Standard+). PDF includes legal citations, risk scores, and source quotes. All formats bilingual — Polish and English.
| # | Status | Filename | Błędy | Ostrz. | XSD | Risk | Str. |
|---|---|---|---|---|---|---|---|
| 1 | FAIL | FA_2026_01_0201.xml | 1 | 1 | 0 | 25 | 1 |
| 2 | FAIL | FA_2026_02_0042.xml | 3 | 1 | 0 | 65 | 2 |
| 3 | FAIL | FA_2026_02_0099.xml | 1 | 1 | 0 | 25 | 4 |
| 4 | FAIL | FA_2026_02_0187.xml | 2 | 1 | 0 | 25 | 6 |
| 5 | PASS | FA_2026_03_0001.xml | 0 | 0 | 0 | 0 | 7 |
| 6 | FAIL | FA_2026_03_0156.xml | 2 | 0 | 1 | 40 | 9 |
| file_name | file_status | risk_score | violation_type | code | severity | classification |
|---|---|---|---|---|---|---|
| FA_2026_01_0201.xml | FAIL | 25 | RULE | KSEF-BUS-044 | error | GOV_MANDATED |
| FA_2026_02_0042.xml | FAIL | 65 | RULE | KSEF-BUS-003 | error | GOV_MANDATED |
| FA_2026_02_0099.xml | FAIL | 25 | RULE | KSEF-BUS-030 | error | GOV_MANDATED |
| FA_2026_02_0187.xml | FAIL | 25 | RULE | KSEF-BUS-006 | error | GOV_MANDATED |
| FA_2026_03_0001.xml | PASS | 0 | - | - | - | - |
| FA_2026_03_0156.xml | FAIL | 40 | XSD | FA3-XSD-E001 | error | - |
Batch Operations
Process up to 5,000 files per day (Standard) or unlimited (Pro). Recursive folder scanning with cross-invoice rules: duplicate numbers, NIP inconsistencies, and chronological order issues. Free tier: 10 files/day.
Configuration Profiles
Three built-in presets: essential (government-mandated rules only), recommended (balanced), and maximum (all rules, warnings promoted to errors). Override individual rules via .ksef-guard.yml (Pro).
# Place in project root or ~/.config/ksef-guard/
# CLI auto-discovers: walks up from cwd → user config dir
preset: recommended # essential | recommended | maximum
rules: # per-rule: "error" | "warning" | "off"
KSEF-BUS-140: "off" # disable zero-amount heuristic
KSEF-BUS-193: "warning" # demote to warning
KSEF-BUS-044: "error" # enforce line arithmetic
defaults
preset:
rules:
--preset
--disable-rule
CI/CD Pipeline Integration
Single binary, zero dependencies — download, run, done. Ships with ready-made GitHub Actions and GitLab CI templates. Auto-discovers .ksef-guard.yml from your repo. Exit codes distinguish XSD failures from business rule violations.
on: [push, pull_request]
jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Download ksef-guard
run: |
curl -fsSL -o kg.tar.gz
ksefguard.pl/dl/linux-amd64.tar.gz
tar xzf kg.tar.gz
- name: Validate invoices
run: |
./ksef-guard validate
--preset maximum
--output results.txt
./invoices/
- uses: actions/upload-artifact@v4
if: always()
with:
name: ksef-results
path: results.txt
White-label PDF
PDF reports with your own logo and company header (Pro). KSeF Guard branding hidden — perfect for sharing with clients and auditors.
Session History
Automatic saving of validation results (all plans; Free keeps the last 5 sessions, Standard 25, Pro 100). Browse previous sessions, track pass rates and recurring violations, and restore full results with a single click.
Stop guessing. Start validating.
Free for up to 10 invoices/day. No account required. Invoice data stays on your machine.
Download Free