Documentation
¶
Overview ¶
Package main demonstrates batch invoice submission using ksef-go.
A single KSeF online session accepts multiple invoices submitted sequentially. This example opens one session, submits several invoices, polls all of them concurrently, then terminates the session and downloads the session-level 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/batch/main.go
Click to show internal directories.
Click to hide internal directories.