Download the PHP package nozugroup/ksef-client-php without Composer
On this page you can find all versions of the php package nozugroup/ksef-client-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download nozugroup/ksef-client-php
More information about nozugroup/ksef-client-php
Files in nozugroup/ksef-client-php
Package ksef-client-php
Short Description Thin PHP wrapper client for the Polish KSeF 2.0 API.
License MIT
Informations about the package ksef-client-php
KSeF Client PHP
Thin, modular PHP wrapper for the KSeF 2.0 REST API.
The endpoint surface was mapped from the official OpenAPI document:
https://api.ksef.mf.gov.pl/docs/v2/index.htmlhttps://api.ksef.mf.gov.pl/docs/v2/openapi.json
The production contract checked for this scaffold reports API build 2.4.0-pr-20260423.2 and base URL https://api.ksef.mf.gov.pl/v2.
Install
Shape
Endpoints are grouped into final resource classes:
$client->auth()$client->activeAuthSessions()$client->certificates()$client->security()$client->limits()$client->permissions()$client->invoices()$client->sessions()$client->tokens()$client->peppol()
The public API avoids raw request arrays. JSON/XML bodies, query parameters, headers, path parameters, requests, response headers, and decoded JSON are represented by final classes.
Basic Usage
After you redeem an access token, pass it into the client:
For repeated OpenAPI query parameters, use StringList:
For paginated endpoints with continuation tokens, use Headers:
For operations that return XML or binary-like payloads, use body():
Generic Request Escape Hatch
The client exposes typed resource methods for every endpoint in the current OpenAPI contract, but you can still call new or changed endpoints directly:
Notes
This package does not implement cryptographic preparation of XAdES signatures, encryption of KSeF tokens, or invoice XML generation. Those are separate domain steps; this client is responsible for HTTP transport, authentication headers, endpoint paths, query/header handling, JSON/XML bodies, and response/error wrapping.
QR Codes
KSeF QR codes are generated locally from invoice data. The package supports:
- KOD I: invoice verification/download URL and QR code.
- KOD II: offline certificate verification URL and QR code signed with the KSeF Offline certificate private key.
For KOD II:
KOD II signing follows the MF rules: RSA uses RSASSA-PSS with SHA-256, MGF1 SHA-256, and 32-byte salt; ECDSA uses P-256/SHA-256 and IEEE P1363 signature encoding.
All versions of ksef-client-php with dependencies
guzzlehttp/guzzle Version ^7.9
endroid/qr-code Version ^6.0
phpseclib/phpseclib Version ^3.0