ksef-client-ts
v0.10.0
Published
TypeScript client for the Polish National e-Invoice System (KSeF) API
Maintainers
Readme
ksef-client-ts
TypeScript client for the Polish National e-Invoice System (KSeF) API v2.
Install
npm i ksef-client-ts # library
npm i -g ksef-client-ts # ksef CLIRequires Node.js 18+. Dual ESM/CJS output via tsup.
Quick start
import { KSeFClient } from 'ksef-client-ts';
const client = new KSeFClient({ environment: 'TEST' });
await client.crypto.init();
const challenge = await client.auth.getChallenge();
// ... authenticate, open a session, send invoicesksef auth login --token "$KSEF_TOKEN" --nip "$KSEF_NIP"
ksef session open # 1. Open online session (required)
ksef invoice send invoice.xml # 2. Send invoice
ksef session invoices # 3. Verify invoice statusNode-only helpers (filesystem storage, native XSD validation) are available from the ksef-client-ts/node entry point.
Documentation
The full feature list, guides, API and CLI reference, and the v0.10 migration guide live in the documentation and the GitHub README:
