basic

command
v0.1.0-alpha.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 22, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Package main demonstrates the full KSeF invoice lifecycle using ksef-go:

authenticate → open session → build invoice → submit → poll → download → terminate → UPO

Required environment variables:

KSEF_NIP          — 10-digit NIP registered in the KSeF test environment
KSEF_TOKEN        — API token issued by the KSeF test environment
KSEF_PUBKEY_PATH  — path to the KSeF test environment RSA public key PEM file
                    (defaults to ../../testdata/ksef-test-public-key.pem)

Run:

KSEF_NIP=1234567890 KSEF_TOKEN=your-token go run examples/basic/main.go

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL