1- # SeatLayer PHP SDK
1+ # SeatLayer PHP Server SDK for Reserved Seating
22
33[ ![ CI] ( https://github.com/seatlayer/seatlayer-php/actions/workflows/ci.yml/badge.svg )] ( https://github.com/seatlayer/seatlayer-php/actions/workflows/ci.yml )
44[ ![ Packagist] ( https://img.shields.io/packagist/v/seatlayer/seatlayer-php.svg )] ( https://packagist.org/packages/seatlayer/seatlayer-php )
55[ ![ License: MIT] ( https://img.shields.io/badge/license-MIT-111827.svg )] ( LICENSE )
66
7- Official PHP server SDK for the [ SeatLayer] ( https://seatlayer.io ) reserved-seating API.
7+ The official SeatLayer PHP server SDK — the trusted side of a reserved-seating
8+ integration. Inspect what a hold really contains, price from server-owned seating-chart
9+ data, and book with a stable ` bookingRef ` , while managing charts, events, inventory,
10+ allocations, and webhooks through one typed ticketing API client.
11+
12+ [ ` seatlayer/seatlayer-php ` on Packagist] ( https://packagist.org/packages/seatlayer/seatlayer-php ) ·
13+ [ SeatLayer server SDK documentation] ( https://docs.seatlayer.io/server-sdk/install/ ) ·
14+ [ SeatLayer reserved-seating platform] ( https://seatlayer.io/ ) ·
15+ [ SeatLayer JavaScript seat map SDK] ( https://www.npmjs.com/package/@seatlayer/js ) ·
16+ [ Server API reference] ( https://docs.seatlayer.io/server-api/ )
817
918> ** Server-side only.** This package authenticates with your secret key. Never expose it to a
1019> browser or anything a ticket buyer can reach — browser surfaces get short-lived, origin-bound
@@ -299,6 +308,46 @@ suite runs without a network.
299308
300309Full reference: [ docs.seatlayer.io/server-sdk] ( https://docs.seatlayer.io/server-sdk/install/ )
301310
311+ ## Frequently asked questions
312+
313+ ### How do I book seats from PHP?
314+
315+ Create a client with your secret key, obtain a hold id — either from the buyer's
316+ browser session or by holding server-side — and call ` $seatlayer->inventory->book($eventKey, holdId: ..., bookingRef: ...) ` .
317+ ` bookingRef ` is your own stable order id and is the join between SeatLayer
318+ inventory and your commercial order, so the same reference identifies the booking
319+ in Booking History and when you later cancel it. For phone orders, box office, and
320+ comps, ` $seatlayer->inventory->bookBestAvailable(...) ` books outright with no browser involved.
321+
322+ ### What does the server SDK do compared with the buyer SDK?
323+
324+ The buyer SDK runs where the ticket buyer is: it renders the interactive seating
325+ chart, handles seat selection, and creates temporary holds. This server SDK is the
326+ trusted side. It authenticates with your secret key, inspects what a hold actually
327+ contains, prices from server-owned data, and books. Never bundle the secret key
328+ into a browser or a mobile app — browser surfaces get short-lived, origin-bound
329+ tokens that you mint here.
330+
331+ ### How do temporary holds work server-side?
332+
333+ A hold reserves seats against concurrent buyers for a limited window.
334+ ` $seatlayer->inventory->retrieveHold($eventKey, $holdId) ` is the authoritative answer for what is held
335+ and at what price, so charge from its ` items ` rather than from anything the browser
336+ sent you. When an order runs longer than the checkout window, ` $seatlayer->inventory->extendHold(...) `
337+ renews the hold instead of releasing and re-holding, which would hand the seats to
338+ whoever is racing for them. Bookings carry the server's exact-selection plus
339+ ` bookingRef ` safeguard, but the SDK sends each booking once — reconcile an unknown
340+ outcome before trying again.
341+
342+ ### Can I use my own payment provider?
343+
344+ Yes. SeatLayer never processes payment. Inspect the hold, compute the charge from
345+ the returned ` items ` and their authoritative ` unitPrice ` and ` currency ` , take the
346+ money through whichever provider you already use — Stripe, Adyen, Razorpay, or your
347+ own — and then book the hold with your order id as ` bookingRef ` . SeatLayer owns
348+ seating state, holds, booking concurrency, and the inventory ledger; your platform
349+ owns payments, commercial orders, tickets, delivery, and refunds.
350+
302351## Related resources
303352
304353- [ Server SDK guide] ( https://docs.seatlayer.io/server-sdk/install/ )
@@ -311,21 +360,21 @@ Full reference: [docs.seatlayer.io/server-sdk](https://docs.seatlayer.io/server-
311360
312361### Other SeatLayer SDKs
313362
314- | Surface | Package |
315- | ---| ---|
316- | Browser (vanilla) | [ ` @seatlayer/js ` ] ( https://www.npmjs.com/package/@seatlayer/js ) |
363+ | Surface | Package or source |
364+ | --- | --- |
365+ | JavaScript | [ ` @seatlayer/js ` ] ( https://www.npmjs.com/package/@seatlayer/js ) |
317366| React | [ ` @seatlayer/react ` ] ( https://www.npmjs.com/package/@seatlayer/react ) |
318367| React Native | [ ` @seatlayer/react-native ` ] ( https://www.npmjs.com/package/@seatlayer/react-native ) |
319368| iOS | [ ` seatlayer-ios ` ] ( https://github.com/seatlayer/seatlayer-ios ) |
320- | Android | [ ` seatlayer-android ` ] ( https://github.com/seatlayer/seatlayer-android ) |
321369| Flutter | [ ` seatlayer ` ] ( https://pub.dev/packages/seatlayer ) |
370+ | Android | [ ` seatlayer-android ` ] ( https://github.com/seatlayer/seatlayer-android ) |
322371| Node.js (server) | [ ` @seatlayer/server ` ] ( https://www.npmjs.com/package/@seatlayer/server ) |
323372| Python (server) | [ ` seatlayer ` ] ( https://pypi.org/project/seatlayer/ ) |
324- | Java (server) | [ ` io.seatlayer:seatlayer-java ` ] ( https://central.sonatype.com/artifact/io.seatlayer/seatlayer-java ) |
325- | Go (server) | [ ` github.com/seatlayer/seatlayer-go ` ] ( https://pkg.go.dev/github.com/seatlayer/seatlayer-go ) |
373+ | PHP (server) | [ ` seatlayer/seatlayer-php ` ] ( https://packagist.org/packages/seatlayer/seatlayer-php ) (this package) |
326374| Ruby (server) | [ ` seatlayer ` ] ( https://rubygems.org/gems/seatlayer ) |
327- | PHP (server) | [ ` seatlayer/seatlayer-php ` ] ( https://packagist.org/packages/seatlayer/seatlayer-php ) |
328375| .NET (server) | [ ` SeatLayer ` ] ( https://www.nuget.org/packages/SeatLayer ) |
376+ | Java (server) | [ ` io.seatlayer:seatlayer-java ` ] ( https://central.sonatype.com/artifact/io.seatlayer/seatlayer-java ) |
377+ | Go (server) | [ ` github.com/seatlayer/seatlayer-go ` ] ( https://pkg.go.dev/github.com/seatlayer/seatlayer-go ) |
329378
330379## Development
331380
0 commit comments