Create and Send KSeF Sales Invoices

Sales Invoices via KSeF

Post to KSeF via Billit API to Create Invoice

When posting to Billit, the API v1/order and v1/einvoice can be used.

Sample Json file 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 test2 123456789 test3 123456789 test4 123456789 test5 123456789 test6 123456789 test7 123456789 test8 123456789 test9 123456789 test10 123456789 test11 123456789 test12 123456789 test13 123456789 test14 Part 2 start test1 123456789 test2 123456789 test3 123456789 test4 123456789 test5 123456789 test6 123456789 test7 123456789 test8 123456789 test9 123456789 test10 123456789 test11 123456789 test12 123456789 test13 123456789 test14 Part2 end", // Max 512 characters 
			"VATPercentage": 23.0
		},
        {
			"Quantity": 2.0,
			"UnitPriceExcl": 169.31,
			"Reference": "198-487-IYE",
			"Description": "Product 2 ", 
			"VATPercentage": 23.0
		}
	]
}

Sending to KSeF

Sending the invoices, 2 options:

  1. Send via API
  2. Use no API, send manually or automatically

Send via API

Use the commands/send API endpoint for immediate sending

EndpointMethodResponse
/v1/orders/commands/sendPOSTOK

Example Json content:

{
"Transporttype" : "KSeF",
"OrderIDs" : 
  [ 
	1684998,
	1684999
  ]
}
{
"Transporttype" : "KSeF",
"OrderIDs" : 
  [ 
    1684998
  ]
}

Sending without API

Options are:

  1. Manual sending
    1. This can can be useful if you want to check the invoices prior to sending or if you want to add attachments.
  2. Enabling the automatic sending

More info : https://docs.billit.be/docs/sending-your-first-invoice