KSeF Faktury
EN
Join the start list
Early access

The API is in early access: we hand out test keys (KSeF TEST) in batches to people on the launch list. Live mode comes later.

Request access

API reference

Events

Events about final states of invoices and corrections. Webhooks deliver the same objects; the list is for reconciling when something did not arrive.

The Event object

An event about a document reaching its final state. Webhooks deliver the same objects that /v1/events lists.

Attributes

  • idstringrequired

    Event id (the same as the KSeF-Event-Id header).

    Prefix evt_

  • objectstringrequired

    Object type.

    Always event

  • typestringrequired

    Event type. Types

    One of: invoice.accepted, invoice.rejected, invoice.skipped, correction.accepted, correction.rejected, correction.skipped

  • livemodebooleanrequired

    The document's mode.

  • createdintegerrequired

    When the event happened (Unix seconds).

  • dataobjectrequired

    Event data.

    Show fields
    • objectInvoice | Correctionrequired

      The invoice or correction as it was at the time of the event.

Object Event
{
  "id": "evt_Qa1Ws2Ed3Rf4Tg5Yh6Uj7Ik8",
  "object": "event",
  "type": "invoice.accepted",
  "livemode": false,
  "created": 1760865214,
  "data": {
    "object": {
      "id": "inv_4fJ2kP9xQwErTy7uI0oPaSdF",
      "object": "invoice",
      "livemode": false,
      "status": "accepted",
      "order": {
        "external_id": "SO-1001",
        "number": "1001"
      },
      "number": "FV/2026/10/1",
      "ksef_number": "4235405606-20261019-0E7570400000-57",
      "ksef_environment": "test",
      "issue_date": "2026-10-19",
      "currency": "PLN",
      "total_gross": "163.99",
      "buyer_nip": "5260250274",
      "pdf_url": "https://app.ksefshop.pl/pdf/cmgxa1b2c0000/Qk9tZ2FsX3ZhbGlkX3Rva2VuX2V4YW1w",
      "last_error": null,
      "created": 1760865185,
      "updated": 1760865214,
      "corrections": []
    }
  }
}

List events

GET /v1/events

The same events webhooks deliver, newest first. Useful for reconciling when your server missed webhooks. type narrows the list to one event type.

Parameters

  • limitquery · integer

    How many objects per page.

    Default 10 · 1-100

  • starting_afterquery · string

    Id of the last object of the previous page.

  • typequery · string

    Only events of this type.

    One of: invoice.accepted, invoice.rejected, invoice.skipped, correction.accepted, correction.rejected, correction.skipped

Responses

GET /v1/events
curl "https://app.ksefshop.pl/v1/events?limit=10" \
  -H "Authorization: Bearer $KSEF_API_KEY"
Response
{
  "object": "list",
  "url": "/v1/events",
  "has_more": false,
  "data": []
}

Retrieve an event

GET /v1/events/{id}

One event by its evt_... id (the same id arrives in the KSeF-Event-Id header).

Parameters

  • idpath · stringrequired

    The object's id.

    Prefix evt_

Responses

GET /v1/events/{id}
curl https://app.ksefshop.pl/v1/events/evt_Qa1Ws2Ed3Rf4Tg5Yh6Uj7Ik8 \
  -H "Authorization: Bearer $KSEF_API_KEY"
Response
{
  "id": "evt_Qa1Ws2Ed3Rf4Tg5Yh6Uj7Ik8",
  "object": "event",
  "type": "invoice.accepted",
  "livemode": false,
  "created": 1760865214,
  "data": {
    "object": {
      "id": "inv_4fJ2kP9xQwErTy7uI0oPaSdF",
      "object": "invoice",
      "livemode": false,
      "status": "accepted",
      "order": {
        "external_id": "SO-1001",
        "number": "1001"
      },
      "number": "FV/2026/10/1",
      "ksef_number": "4235405606-20261019-0E7570400000-57",
      "ksef_environment": "test",
      "issue_date": "2026-10-19",
      "currency": "PLN",
      "total_gross": "163.99",
      "buyer_nip": "5260250274",
      "pdf_url": "https://app.ksefshop.pl/pdf/cmgxa1b2c0000/Qk9tZ2FsX3ZhbGlkX3Rva2VuX2V4YW1w",
      "last_error": null,
      "created": 1760865185,
      "updated": 1760865214,
      "corrections": []
    }
  }
}
KSeF Faktury

API early access

We hand out test keys in batches. Leave your email: we will write when your access is ready.