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
<dependency>
<groupId>io.seatlayer</groupId>
<artifactId>seatlayer-java</artifactId>
<version>0.7.0</version>
</dependency>Gradle Kotlin DSL:
implementation("io.seatlayer:seatlayer-java:0.7.0")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 for
flexible_dates; the other typed create fields and all 13 operations remain
available.
Inspect and book an Event hold
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:
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 for the shared contract.
Verify and continue
- Maven Central artifact
0.7.0 - tagged source and package README
performanceGroups()methods atv0.7.0- all
seasons()methods atv0.7.0 - server API operation support
- OpenAPI 3.1 reference
Verify the flow with a test key, a test Event, and a real test hold. Then add webhook verification, choose the correct inventory model, and complete the going-live checklist.