---
title: "Java server SDK"
description: "Install io.seatlayer:seatlayer-java 0.7.0, inspect an authoritative hold, book with a stable reference, and use the exact Java resource namespaces."
---

Use `io.seatlayer:seatlayer-java` from a trusted Java or Kotlin backend. Version
`0.7.0` requires Java 17 or newer and uses JDK HTTP and crypto without runtime
dependencies such as Jackson or OkHttp.

## Install and create the client

```xml
<dependency>
  <groupId>io.seatlayer</groupId>
  <artifactId>seatlayer-java</artifactId>
  <version>0.7.0</version>
</dependency>
```

Gradle Kotlin DSL:

```kotlin
implementation("io.seatlayer:seatlayer-java:0.7.0")
```

```java
import io.seatlayer.SeatLayer;

SeatLayer seatlayer = new SeatLayer(System.getenv("SEATLAYER_SECRET_KEY"));
if (!"test".equals(seatlayer.mode())) {
    throw new IllegalStateException("Use a test key while integrating.");
}
```

Keep `SEATLAYER_SECRET_KEY` in the server environment. Never expose the client
or its `sk_…` credential to browser or mobile code.

## Exact resource surface

The client exposes `charts()`, `channels()`, `events()`, `inventory()`,
`performanceGroups()`, `sessions()`, `seasons()`, `templates()`, `webhooks()`,
and `workspaces()`.

`seatlayer.performanceGroups()` contains all 13 released operations: `list`,
`create`, `retrieve`, `delete`, `activate`, `close`, `retrieveLifecycle`,
`createBuyerAccessSession`, `listBuyerAccessSessions`,
`revokeBuyerAccessSession`, `retrieveHold`, `bookHold`, and `retrieveBooking`.

`seatlayer.seasons()` contains all 48 frozen `0.7.0` operations. Java retains
the Season prefix, for example `createSeason`, `publishSeasonPlan`,
`bookSeasonHold`, `commitSeasonRenewalOffer`, and
`exportSeasonSupportSnapshot`. The resource covers catalogue, lifecycle, Plans
and sales, buyer handoff, holder import, renewals, amendments, reports,
recovery, outbox, audit, and support export. Source-only occurrence
return/reclaim operations are not part of `0.7.0`.

The same 13 Performance Group and 48 Season wire operations are released in all
seven official server SDKs; only language naming differs.

The `0.7.0` typed `performanceGroups().create(...)` overload covers the default
`fixed` policy but does not expose the newer REST `inclusionMode` field. Use the
[REST/raw-request path](/server-api/performance-groups/#create-a-run) for
`flexible_dates`; the other typed create fields and all 13 operations remain
available.

## Inspect and book an Event hold

```java
import java.util.List;
import java.util.Map;

String eventKey = System.getenv("SEATLAYER_EVENT_KEY");
String holdId = System.getenv("SEATLAYER_HOLD_ID");
String bookingRef = System.getenv("ORDER_ID");

Map<String, Object> hold = seatlayer.inventory().retrieveHold(eventKey, holdId);
@SuppressWarnings("unchecked")
List<Map<String, Object>> items = (List<Map<String, Object>>) hold.get("items");
List<String> labels = items.stream().map(item -> (String) item.get("label")).toList();
// Price from items and authorize payment in your commerce system here.
Map<String, Object> booking = seatlayer.inventory().book(eventKey, Map.of(
    "holdId", holdId,
    "labels", labels,
    "bookingRef", bookingRef
));
```

Do not calculate a charge from browser-submitted totals. `bookingRef` is your
commerce system's immutable join to SeatLayer inventory. If the response is
lost, call `seatlayer.inventory().retrieveBooking(eventKey, bookingRef)` before
deciding whether to repeat the exact same hold, labels, and reference.

## Errors, retries, and pagination

Branch on `SeatLayerAuthException`, `SeatLayerConflictException`, and
`SeatLayerRateLimitException`. Use `isModeMismatch()`, `isSoldOut()`, and
`retryAfterSeconds()` for those common branches.

Reads retry connection failures, `408`, `429`, and `5xx` with exponential
backoff and full jitter. These 14 methods also retry with one exact key:
`charts().create`, `charts().copy`, `templates().instantiateTemplate`,
`events().create`, `workspaces().create`, `performanceGroups().create`, and
`seasons().createSeason`, `updateSeason`, `deleteSeason`, `createSeasonPlan`,
`duplicateSeasonToLive`, `createSeasonHolderImport`,
`createSeasonRenewalOffers`, and `createSeasonAmendment`. Other mutations are
single-attempt, even when an overload forwards a caller-supplied key.

Large lists are lazy `Iterable` values:

```java
for (Map<String, Object> event : seatlayer.events().listAll()) {
    syncEvent(event);
}
```

That `Iterable` is Event-specific. Performance Group and top-level Season list
methods return one cursor page; pass the opaque `nextCursor` into the next list
call until it is absent.

See [errors, retries, and idempotency](/server-sdk/reliability/) for the shared
contract.

## Verify and continue

- [Maven Central artifact `0.7.0`](https://central.sonatype.com/artifact/io.seatlayer/seatlayer-java/0.7.0)
- [tagged source and package README](https://github.com/seatlayer/seatlayer-java/tree/v0.7.0)
- [`performanceGroups()` methods at `v0.7.0`](https://github.com/seatlayer/seatlayer-java/blob/v0.7.0/src/main/java/io/seatlayer/PerformanceGroups.java)
- [all `seasons()` methods at `v0.7.0`](https://github.com/seatlayer/seatlayer-java/blob/v0.7.0/src/main/java/io/seatlayer/Seasons.java)
- [server API operation support](/server-api/operation-support/)
- [OpenAPI 3.1 reference](/openapi.json)

Verify the flow with a test key, a test Event, and a real test hold. Then add
[webhook verification](/server-sdk/webhooks/), choose the correct [inventory
model](/start/inventory-models/), and complete the [going-live
checklist](/start/going-live/).