Poland KSeF e-invoices
Generate FA(3) XML for a domestic Polish PLN B2B VAT invoice with up to 500 lines and check it locally against the official XSD.
$0.04/invoice · $1 free credit every month, no card · MCP and REST
curl https://api.kanagu.dev/v1/ksef/generate \
-H "Authorization: Bearer $KANAGU_KEY" \
-H "Content-Type: application/json" \
-d '{"invoiceNumber":"FV/2026/03/104","issueDate":"2026-03-02","createdAt":"2026-03-02T10:05:00Z","supplyDate":"2026-02-27","dueDate":"2026-03-16","seller":{"nip":"5260250274","name":"Przykładowy Dostawca sp. z o.o.","addressLine1":"ul. Wolska 14, 01-201 Warszawa"},"buyer":{"nip":"8567346215","name":"Przykładowy Nabywca sp. z o.o.","addressLine1":"ul. Długa 4, 31-146 Kraków"},"cashAccounting":false,"lines":[{"description":"Konserwacja urządzeń","unit":"godz.","quantity":"2.5","unitNetPrice":"120.00","vatRate":"23","annex15":false}]}'const res = await fetch("https://api.kanagu.dev/v1/ksef/generate", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.KANAGU_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"invoiceNumber": "FV/2026/03/104",
"issueDate": "2026-03-02",
"createdAt": "2026-03-02T10:05:00Z",
"supplyDate": "2026-02-27",
"dueDate": "2026-03-16",
"seller": {
"nip": "5260250274",
"name": "Przykładowy Dostawca sp. z o.o.",
"addressLine1": "ul. Wolska 14, 01-201 Warszawa"
},
"buyer": {
"nip": "8567346215",
"name": "Przykładowy Nabywca sp. z o.o.",
"addressLine1": "ul. Długa 4, 31-146 Kraków"
},
"cashAccounting": false,
"lines": [
{
"description": "Konserwacja urządzeń",
"unit": "godz.",
"quantity": "2.5",
"unitNetPrice": "120.00",
"vatRate": "23",
"annex15": false
}
]
}),
});
if (!res.ok) throw new Error((await res.json()).error.message);
const result = await res.json();curl https://api.kanagu.dev/mcp \
-H "Authorization: Bearer $KANAGU_KEY" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"call_operation","arguments":{"operation":"ksef.generate","input":{"invoiceNumber":"FV/2026/03/104","issueDate":"2026-03-02","createdAt":"2026-03-02T10:05:00Z","supplyDate":"2026-02-27","dueDate":"2026-03-16","seller":{"nip":"5260250274","name":"Przykładowy Dostawca sp. z o.o.","addressLine1":"ul. Wolska 14, 01-201 Warszawa"},"buyer":{"nip":"8567346215","name":"Przykładowy Nabywca sp. z o.o.","addressLine1":"ul. Długa 4, 31-146 Kraków"},"cashAccounting":false,"lines":[{"description":"Konserwacja urządzeń","unit":"godz.","quantity":"2.5","unitNetPrice":"120.00","vatRate":"23","annex15":false}]}}}}'Checked against FA(3) XML schema (CRWDE 13775) 1-0E (2025-06-25). Reviewed 2026-11-26. All sources
Coverage and standards
Pinned jurisdictions, specification versions, official sources, and verification method from the API registry.
- Jurisdictions
- Jurisdictions: PL
- Last reviewed
- How output is verified
- ksef.generate checks generated XML and ksef.validate checks submitted XML against the Ministry's FA(3) XSD and supported invoice-level and arithmetic rules.
| Standard | Version | Official source |
|---|---|---|
| FA(3) XML schema (CRWDE 13775) 2025-06-25 | 1-0E | Sourcefor FA(3) XML schema (CRWDE 13775) |
| Ministry of Finance StrukturyDanych XSD 2022-01-05 | 10-0E | Sourcefor Ministry of Finance StrukturyDanych XSD |
| Ministry of Finance ElementarneTypyDanych XSD 2022-01-05 | 10-0E | Sourcefor Ministry of Finance ElementarneTypyDanych XSD |
| Ministry of Finance KodyKrajow XSD 2022-01-05 | 10-0E | Sourcefor Ministry of Finance KodyKrajow XSD |
| Ministry of Finance FA(3) information guide 2026-08-26 | August 2026 | Sourcefor Ministry of Finance FA(3) information guide |
| Polish VAT Act, Article 106e 2026-09-28 | Dz.U. 2026 poz. 1263 | Sourcefor Polish VAT Act, Article 106e |
| KSeF invoice verification 2026-04-09 | 2026-04-09 | Sourcefor KSeF invoice verification |
| Extensible Markup Language (XML) 2008-11-26 | 1.0, fifth edition | Sourcefor Extensible Markup Language (XML) |
Run it on the live API
The sample request is ready to run. Sign in to run it on your $1 of monthly free credit.
Operations, REST and MCP
| Operation | Price |
|---|---|
| ksef.generate Generate FA(3) XML for a domestic Polish PLN B2B VAT invoice with up to 500 lines and check it locally against the official XSD. | $0.04/invoice |
| ksef.validate Check KSeF FA(3) XML against the official XSD and selected invoice rules. Results cover local preflight validation. | $0.04/invoice |
curl https://api.kanagu.dev/v1/ksef/generate \
-H "Authorization: Bearer $KANAGU_KEY" \
-H "Content-Type: application/json" \
-d '{"invoiceNumber":"FV/2026/03/104","issueDate":"2026-03-02","createdAt":"2026-03-02T10:05:00Z","supplyDate":"2026-02-27","dueDate":"2026-03-16","seller":{"nip":"5260250274","name":"Przykładowy Dostawca sp. z o.o.","addressLine1":"ul. Wolska 14, 01-201 Warszawa"},"buyer":{"nip":"8567346215","name":"Przykładowy Nabywca sp. z o.o.","addressLine1":"ul. Długa 4, 31-146 Kraków"},"cashAccounting":false,"lines":[{"description":"Konserwacja urządzeń","unit":"godz.","quantity":"2.5","unitNetPrice":"120.00","vatRate":"23","annex15":false}]}'const res = await fetch("https://api.kanagu.dev/v1/ksef/generate", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.KANAGU_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"invoiceNumber": "FV/2026/03/104",
"issueDate": "2026-03-02",
"createdAt": "2026-03-02T10:05:00Z",
"supplyDate": "2026-02-27",
"dueDate": "2026-03-16",
"seller": {
"nip": "5260250274",
"name": "Przykładowy Dostawca sp. z o.o.",
"addressLine1": "ul. Wolska 14, 01-201 Warszawa"
},
"buyer": {
"nip": "8567346215",
"name": "Przykładowy Nabywca sp. z o.o.",
"addressLine1": "ul. Długa 4, 31-146 Kraków"
},
"cashAccounting": false,
"lines": [
{
"description": "Konserwacja urządzeń",
"unit": "godz.",
"quantity": "2.5",
"unitNetPrice": "120.00",
"vatRate": "23",
"annex15": false
}
]
}),
});
if (!res.ok) throw new Error((await res.json()).error.message);
const result = await res.json();claude mcp add --transport http kanagu https://api.kanagu.dev/mcp \
--header "Authorization: Bearer $KANAGU_KEY"{
"mcpServers": {
"kanagu": {
"url": "https://api.kanagu.dev/mcp",
"headers": {
"Authorization": "Bearer ${env:KANAGU_KEY}"
}
}
}
}curl https://api.kanagu.dev/mcp \
-H "Authorization: Bearer $KANAGU_KEY" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"call_operation","arguments":{"operation":"ksef.generate","input":{"invoiceNumber":"FV/2026/03/104","issueDate":"2026-03-02","createdAt":"2026-03-02T10:05:00Z","supplyDate":"2026-02-27","dueDate":"2026-03-16","seller":{"nip":"5260250274","name":"Przykładowy Dostawca sp. z o.o.","addressLine1":"ul. Wolska 14, 01-201 Warszawa"},"buyer":{"nip":"8567346215","name":"Przykładowy Nabywca sp. z o.o.","addressLine1":"ul. Długa 4, 31-146 Kraków"},"cashAccounting":false,"lines":[{"description":"Konserwacja urządzeń","unit":"godz.","quantity":"2.5","unitNetPrice":"120.00","vatRate":"23","annex15":false}]}}}}'Every request field, response schema, and error code is in the ksef.generate reference.
$0.04/invoice, billed only on success
- ksef.generate$0.04 / invoice
- ksef.validate$0.04 / invoice
$1 of free credit every month after sign-in. Then pay as you go with no base fee, or the $9/month Bundle with $9 of usage included across every Kanagu product. Compare plans
Sign in with GitHub or Google to create a key and spend $1 of free credit each month, no card needed. Subscribe from your dashboard when you need higher volume. Polar is the merchant of record and handles payment, tax, and invoices.
Create an API key
Sign in with GitHub or Google for $1 of monthly free credit, no card needed. Run calls from the console, your code, or an MCP agent.