Receive KSeF Purchase Invoices

Context

  • Your Polish entity will receive supplier invoices via KSeF. They can be viewed in the expenditure section of MyBillit. You can also extract de data and the files via API.
  • As a receiver, you do not have to send back messages to the sender via KSeF
  • All relevant data are stored in MyBillit, you can also find them back on the KSeF environment.

How to Get the Information ?

Actions:

What Files can you extract from Billit via API ?

Type of InformationWhatAction API endpoint
PDF fileThe PDF coming from KSeF enriched with KSeF signature informationGet v1/files
Messages sectionStatus info and KSeF XMLGet v1/files
Signature sectionKSeF Signature Information including KSeF signature FileGet v1/order

Instruction how to get a File :

EndpointMethodVariable
Files : /v1/files/33ae4e0b-a579-46c3-b0d0-839999bb4ac1GETInclude FileID

Examples of the Json content of the files:

    "OrderPDF": {
        "FileID": "33ae4e0b-a579-46c3-b0d0-839999bb4ac1",
        "FileName": "Invoice_409859_2_CentralneLaboratoriumPomiarowoBa.pdf"
    },
    "Attachments": [
        {
            "FileID": "1d28180f-ed23-4e0d-b2c0-4c4d4af9999e",
            "FileName": "409859_2__23_01_2026 8_50_46.json"
        }
    ],
"Messages": [
        {
            "Description": "9540010231-20260123-010040EC0636-5A",
            "FileID": "6ef998f0-a5ec-425b-bc5f-d99bbd9c99", //File ID of the XML file
            "CreationDate": "2026-01-23T08:51:01.227",
            "TransportType": "KSeF",
            "Success": true,
            "Trials": 2,
            "Destination": "PL6331975945",
            "MessageDirection": "Outgoing"
        }
    ],
"QRCode": "iVBORw0......5ErkJggg==",

Signature Information in the Json body

In the Json a Signature segment is present.

DocumentStampKSeF ID
DateTimeInfoDate of creation at KSeF
QRCodeFile with the QR code
StampUrlLink to KSeF allowing to performn a manual validation

Sample content:

"Signature": {
        "DocumentStamp": "9540010231-20260123-010040EC9999-9A",
        "DateTimeInfo": {
            "DateTime": "2026-01-23T08:52:05.7304125+01:00"
        },
        "QRCode": "iVBORw0KGgoAAAAt2iqF1F..........IaVulUnRe3+iehvq1bqtnaibErkJggg==",
        "StampUrl": "https://qr-test.ksef.mf.gov.pl/client-app/invoice/9540010231/23-01-2026/EpJeQd5vAOUroMnYiN67eI6Z2I8AmOsgIzojUx5t3pc"
    }