Java SDK
The official Java SDK targets Java 17+ and uses the JDK’s built-in
HttpClient (no Apache HTTP Client dependency).
Install
Section titled “Install”<dependency> <groupId>com.zutax</groupId> <artifactId>zutax</artifactId> <version>0.1.0</version></dependency>Quickstart
Section titled “Quickstart”import com.zutax.ZutaxClient;import java.util.List;import java.util.Map;
ZutaxClient client = new ZutaxClient( "zk_test_...", "https://staging-api.getzutax.com");
Map<String, Object> payload = Map.of( "external_id", "INV-2026-0042", "issue_date", "2026-05-03", "due_date", "2026-06-03", "customer", Map.of( "external_id", "C-100", "legal_name", "Acme Industries Limited", "tin", "12345678-0001" ), "lines", List.of( Map.of( "name", "Consulting services — May 2026", "quantity", "1", "unit_price_naira", "250000.00", "vat_rate", "7.5" ) ));
Map<String, Object> result = client.invoices.transmit(payload, "INV-2026-0042");System.out.println(result.get("invoice_id"));Errors
Section titled “Errors”import com.zutax.exception.*;
try { client.invoices.transmit(payload);} catch (ValidationException e) { e.getErrors().forEach(err -> System.out.println(err.get("loc") + ": " + err.get("msg")));} catch (RateLimitException e) { System.out.println("Slow down, retry in " + e.getRetryAfter() + "s");}Idempotency
Section titled “Idempotency”IdempotencyKey.scoped uses a ThreadLocal, so it works for synchronous
work but does not propagate across executors. If you dispatch transmits
to a thread pool, set the key inside the worker:
import com.zutax.IdempotencyKey;
IdempotencyKey.scoped("INV-2026-0042", () -> client.invoices.transmit(payload));Resources
Section titled “Resources”client.invoices // transmit, get, getByExternalId, list, cancelclient.parties // create, get, getByExternalId, listclient.products // create, get, getByExternalId, listclient.creditNotes // create, get, getByExternalId, list