Use io.seatlayer:seatlayer-java from a trusted Java or Kotlin backend. Version
0.9.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.9.0</version>
</dependency>Gradle Kotlin DSL:
implementation("io.seatlayer:seatlayer-java:0.9.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(), eventSeries(),
holders(), inventory(), orders(), performanceGroups(), sessions(),
seasons(), templates(), webhooks(), and workspaces().
seatlayer.events() also holds event sales setup: buyer checkout, payment
gateway, sales readiness, preflightEventSales, transitionEventSales, booking
fee, and discount codes. seatlayer.holders().listCustomers lists customers.
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 90 Season operations in 0.9.0. Java retains
the Season prefix, for example createSeason, publishSeasonPlan,
bookSeasonHold, commitSeasonRenewalOffer, and
exportSeasonSupportSnapshot. The resource covers catalogue, lifecycle,
performances, Plans and plan edits, package prices, sales, checkout tests, buyer
handoff, holder import and the holder list, renewals and hosted renewals,
amendments, Season orders, reports and CSV exports, bulk jobs, season seats,
recovery, outbox, audit, and support export. returnSeasonOccurrenceInventory
returns one Season occurrence allocation to ordinary Event inventory, and
reclaimSeasonOccurrenceInventory reclaims it while it is still free.
Season seats are seasons().setAsideSeasonBlock, retrieveSeasonBlock, and
releaseSeasonBlock. Turn them on with "inventoryMode": "block" in the
createSeason or updateSeason params; every Season answer carries
inventoryMode (block or per_hold). Both writes answer 202 with a job to
follow with retrieveSeasonBulkJob. The season seats
routes list the rules and refusal codes. A
refusal is a SeatLayerException or one of its subclasses; read its code().
The same 13 Performance Group and 90 Season wire operations are released in all seven official server SDKs; only language naming differs.
The 0.9.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);
// An expired, released or booked hold still answers with its status.
if (!"active".equals(hold.get("status"))) {
throw new IllegalStateException("The hold is no longer active");
}
@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 43 methods also retry with one exact key:
charts():create,copytemplates():instantiateTemplateevents():createeventSeries():createEventSeries,addEventSeriesDates,updateEventSeriesworkspaces():createperformanceGroups():createholders():updateHolder,createHolderTransfer,createHolderReturn,createHolderRenewalCheckoutorders():refundEventOrder,cancelEventOrderseasons()(28):createSeason,updateSeason,deleteSeason,createSeasonPlan,updateSeasonPlan,deleteSeasonPlan,publishSeason,duplicateSeasonToLive,createSeasonPerformances,attachSeasonPerformances,deleteSeasonPerformance,attachSeasonPlanPerformance,deleteSeasonPlanPerformance,markSeasonPerformancePast,replaceSeasonPackagePrices,createSeasonCheckoutTest,createSeasonHolderImport,createSeasonHolderImportFromSeason,createSeasonRenewalOffers,createSeasonRenewalCheckout,releaseSeasonLapsedOffers,createSeasonAmendment,refundSeasonOrder,cancelSeasonOrder,cancelSeasonOrderDate,refundSeasonPerformance,setAsideSeasonBlock, andreleaseSeasonBlock
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.9.0 - tagged source and package README
performanceGroups()methods atv0.9.0- all
seasons()methods atv0.9.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.