Skip to main content

Receive an invoice

A-Cube is a great tool to fetch all incoming invoices from various sources. Because KSeF is by its nature created to accept structured invoices only, we can use it as a hub collecting invoices from suppliers.

A-Cube provides a solution to fetch invoices by NIP number of the authorized recipient and notify customer's systems.

All incoming invoices will be listed on the account of the LegalEntity in the Dashboard --> Incoming Invoices section.

Webhook Notification

If there is a webhook defined for invoice-receiver you will get notification about incoming invoice.

{
"legalEntityUuid": "e8f8f8f8-f8f8-f8f8-f8f8-f8f8f8f8f8f8",
"invoiceUuid": "fa87d11a-22c6-11ed-861d-0242ac120002",
"subjectType": "Subject2",
"status": "valid",
"processingCode": 200,
"ksefReferenceNumber": "5555555555-20250828-010080615740-E4",
"acquisitionTimestamp": "2025-10-10T00:00:00+00:00",
"hash": "ayrw+3m5trnfxlTYhq3QFn74LkEO69MFNlsMAkCDSPA=",
"invoicingMode": "Online",
"webhookType": "invoice-receiver"
}

Having this in place, using A-Cube REST API, it is easy to fetch details about the invoice to an own system.

Knowing invoiceUuid we can request details of the invoice like:

curl -i -X GET \
'https://pl-sandbox.api.acubeapi.com/invoices/\{invoiceUuid}' \
-H 'Authorization: YOUR_API_KEY_HERE'

It is also possible to fetch the source of the structured invoice as an XML file.

curl --header 'Accept: application/xml' --header 'Authorization: Bearer TOKEN' https://pl-sandbox.api.acubeapi.com/invoices/{invoiceUuid}