Create KSeF Sales Invoices

Sales Invoices via KSeF

Post to KSeF via Billit API to Create Invoice

Header Information

DescriptionBillit API FieldKSeF fieldMax. Length
Invoice numberOrderNumberFa/P_250
Purchase OrderReferenceWarunkiTransakcji / Zamowienia / NrZamowieni50
CurrencyCurrencyFa / KodWaluty
Due dateOrderDatePlatnosc / TerminPlatnosci / Termin
Free descriptionCommentsStopka / Informacje / StopkaFaktury1000
Foreign Currency Conversion (no PL)FXRateToForeign
Tax codeVentilation Code when 0 %

Customer Information (header)

DescriptionBillit API FieldKSeF field
Name CompanyNamePodmiot2 / DaneIdentyfikacyjne / Nazwa
VAT Number (When customer has VAT number)VATNumberPodmiot2 / DaneIdentyfikacyjne / NIP
Invoice Address : StreetStreetPodmiot2 / Adres / AdresL1
Invoice Address : Street numberStreetNumberPodmiot2 / Adres / AdresL1
Invoice Address : ZIPZipcodePodmiot2 / Adres / AdresL2
Invoice Address : CityCityPodmiot2 / Adres / AdresL2
Invoice Address : CountryCountryCodePodmiot2 / Adres / KodKraju

Supplier Information (header)

DescriptionBillit API FieldKSeF field
IBAN NumberIBANPlatnosc/RachunekBankowy / NrRB
BICBICPlatnosc/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:

DescriptionSolution
Customer has no VAT number but has a NIP numberInclude NIP number in Billit identifiers segmen

Other remarks:

  • Totals are generated by Billit

Detailines:

Description LineMax Length
QuantityQuantityFaWiersz / P_8B
Unit Price Excluding VATUnitPriceExclFaWiersz / P_9A
Purchase Order ReferenceReference
DescriptionDescriptionFaWiersz / P_7256
VAT PercentageVATPercentageFaWiersz / 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
		}
	]
}