Java SDK for Poland
corp-merch-java on Maven Central — JDK 17+, async via CompletableFuture, Spring Boot starter for Poland.
Architecture — Install and initialise for Poland
Maven: <dependency><groupId>com.corpmerch</groupId><artifactId>corp-merch-java</artifactId><version>2.x</version></dependency>. Init: CorpMerch cm = CorpMerch.builder().apiKey(System.getenv("CM_KEY")).country("Poland").build();. Routes through the Warszawa hub; VAT 23% computed server-side. JDK 17+, no Kotlin or Scala dependency.
How to wire it up — Quickstart with CompletableFuture
Sync: Order o = cm.orders().create(OrderCreateParams.builder().idempotencyKey(UUID.randomUUID().toString())...build());. Async: cm.orders().createAsync(params).thenAccept(o -> log.info("id={}", o.id()));. All POJOs immutable; Jackson @JsonInclude(NON_NULL). Errors as typed exceptions extending CorpMerchException.
Operations and edge cases — Spring Boot starter
corp-merch-spring-boot-starter registers CorpMerch as a bean configured from application.yml: corp-merch.api-key, corp-merch.country: Poland. Webhook controller auto-registered at /webhooks/corpmerch with HMAC verification. Actuator health indicator exposes KSeF channel status. Krajowy System e-Faktur (KSeF) acknowledgement ids surfaced on invoice events.
FAQ
JDK versions?
JDK 17 and 21 in CI. JDK 11 works in offline mode but is not officially supported.
Kotlin / Scala?
Pure Java — usable from Kotlin and Scala. Idiomatic Kotlin extension functions ship in a companion module.
Reactor / RxJava?
Adapter modules ship for Project Reactor (Mono/Flux) and RxJava 3 (Single/Observable).
Spring Boot 3?
Yes — the starter supports Spring Boot 3.x. Spring Boot 2.7 supported on the legacy 1.x SDK.
VAT 23% and KSeF?
country: 'Poland' applies VAT 23% and routes invoicing via KSeF. Actuator health indicator exposes KSeF channel availability.