Create KSeF Sales Invoices
Sales Invoices via KSeF
Post to KSeF via Billit API to Create Invoice
Header Information
| Description | Billit API Field | KSeF field | Max. Length |
|---|---|---|---|
| Invoice number | OrderNumber | Fa/P_2 | 50 |
| Purchase Order | Reference | WarunkiTransakcji / Zamowienia / NrZamowieni | 50 |
| Currency | Currency | Fa / KodWaluty | |
| Due date | OrderDate | Platnosc / TerminPlatnosci / Termin | |
| Free description | Comments | Stopka / Informacje / StopkaFaktury | 1000 |
| Foreign Currency Conversion (no PL) | FXRateToForeign | ||
| Tax code | Ventilation Code when 0 % |
Customer Information (header)
| Description | Billit API Field | KSeF field |
|---|---|---|
| Name Company | Name | Podmiot2 / DaneIdentyfikacyjne / Nazwa |
| VAT Number (When customer has VAT number) | VATNumber | Podmiot2 / DaneIdentyfikacyjne / NIP |
| Invoice Address : Street | Street | Podmiot2 / Adres / AdresL1 |
| Invoice Address : Street number | StreetNumber | Podmiot2 / Adres / AdresL1 |
| Invoice Address : ZIP | Zipcode | Podmiot2 / Adres / AdresL2 |
| Invoice Address : City | City | Podmiot2 / Adres / AdresL2 |
| Invoice Address : Country | CountryCode | Podmiot2 / Adres / KodKraju |
Supplier Information (header)
| Description | Billit API Field | KSeF field |
|---|---|---|
| IBAN Number | IBAN | Platnosc/RachunekBankowy / NrRB |
| BIC | BIC | Platnosc/RachunekBankowy / Swift |
Remark: When bank account is not mentioned in the Json body, the bank account registered in My Company will be used
Special Scenario's:
| Description | Solution |
|---|---|
| Customer has no VAT number but has a NIP number | Include NIP number in Billit identifiers segmen |
Other remarks:
- Totals are generated by Billit
Detailines:
| Description Line | Max Length | ||
|---|---|---|---|
| Quantity | Quantity | FaWiersz / P_8B | |
| Unit Price Excluding VAT | UnitPriceExcl | FaWiersz / P_9A | |
| Purchase Order Reference | Reference | ||
| Description | Description | FaWiersz / P_7 | 256 |
| VAT Percentage | VATPercentage | FaWiersz / P_12 |
Remarks:
- Linetotals are generated by Billit
Post to KSeF via Billit API to Create Invoice
When posting to Billit, the API v1/order and v1/einvoice can be used.
Samples Json files sales Invoice when using POST v1/order
{
"OrderNumber": "4098547",
"Reference": "CLPB/548/1787",
"Currency": "PLN",
"OrderDate": "2026-01-23",
"ExpiryDate": "2026-01-30",
"OrderType": "Invoice",
"Comments": "Additional text info on header ",
"OrderDirection": "Income",
"Customer": {
"Name": "TESTCOMPANY POLSKA ",
"Addresses": [
{
"AddressType": "InvoiceAddress",
"Name": "TESTCOMPANY POLSKA",
"Street": "TESTSTREET",
"StreetNumber": "14",
"Zipcode": "96-500",
"City": "SOCHACZEW",
"CountryCode": "PL"
}
],
"VATNumber": "PL9570899999",
"PartyType": "Customer",
"VATLiable": true,
"Language": "EN",
"VATDeductable": true
},
"OrderLines": [
{
"Quantity": 5.0,
"UnitPriceExcl": 99.22,
"Reference": "478-878-987",
"Description": "Product 1 123456789 test1 123456789 end", // Max 512 characters
"VATPercentage": 23.0
},
{
"Quantity": 2.0,
"UnitPriceExcl": 169.31,
"Reference": "198-487-IYE",
"Description": "Product 2 ",
"VATPercentage": 23.0
}
]
}{
"OrderNumber": "4098999",
"Reference": "45123456789,
"Currency": "EUR",
"OrderDate": "2026-01-23",
"ExpiryDate": "2026-01-30",
"OrderType": "Invoice",
"Comments": "Additional text info on header ",
"OrderDirection": "Income",
"FXRateToForeign": 0.23690, //Conversion rate foreign currency
"VentilationCode": "51", // indicating the VAT codes when lines with 0 %. See ventilation codes in documentation.
"Customer": {
"Name": "TESTCOMPANY BELGIUM ",
"Addresses": [
{
"AddressType": "InvoiceAddress",
"Name": "TESTCOMPANY POLSKA",
"Street": "TESTSTREET",
"StreetNumber": "14",
"Zipcode": "9000",
"City": "GENT",
"CountryCode": "BE"
}
],
"VATNumber": "BE0570899999",
"PartyType": "Customer",
"VATLiable": true,
"Language": "EN",
"VATDeductable": true
},
"OrderLines": [
{
"Quantity": 5.0,
"UnitPriceExcl": 99.22,
"Reference": "478-878-987",
"Description": "Product 1 123456789 test1 123456789 end", // Max 512 characters
"VATPercentage": 0.0
},
{
"Quantity": 2.0,
"UnitPriceExcl": 169.31,
"Reference": "198-487-IYE",
"Description": "Product 2 ",
"VATPercentage": 0.0
}
]
}Updated about 11 hours ago