Games You Play Webhooks
Overview
Games You Play (GYP) webhooks deliver real-time notifications for recreational game events. All GYP webhooks follow the verification process described in Webhook Setup.
Prerequisites
Webhook endpoint configured per Webhook Setup
Subscribed to relevant GYP event types
Signature verification implemented
Event Types
RecreationalGameCreated
New recreational game created
RecreationalGameJoined
User joins a game
RecreationalGameCanceled
Game canceled
RecreationalGameCompleted
Game completed with outcome
RecreationalGameStarted
Game started by owner
Payload Structure
All GYP webhook events share a common payload structure:
Payload Fields
Root Level
event(string) - Event type identifiermatchup(object) - Game details
Matchup Object
id(string) - UUID of the matchupcreatedByUserId(string) - UUID of user who created the gamegameId(string) - External game identifierwinnerGroupId(string|null) - UUID of winning group (null until completed)status(string) - Current game status (see statuses below)type(string) - AlwaysRECREATIONAL_GAMEfor GYPsubtype(string) - Game format:GROUP_VS_GROUPorFREE_FOR_ALLbuyInAmount(number) - Entry cost per playerisPublic(boolean) - Whether game is publicly joinablegroups(array) - Participating groups/teams
Group Object
groupId(string) - UUID of the groupname(string) - Group/team nameusers(array) - Players in this group
User Object
userId(string) - UUID of the useruserMetadata(string) - Custom user metadatareward(object|null) - Reward information (populated on completion)
Reward Object
type(string) - Reward type:CASHorTENANT_REWARDvalue(string) - Reward amount or valuemetadata(object) - Additional reward information
Game Statuses
OPEN- Game created, accepting playersCONFIRMED- Minimum players joinedLOCKED- No more players can joinPENDING_OUTCOMES- Awaiting resultsCLOSED- Completed with winnerCLOSED_TIE- Completed in tieCANCELED_BY_OWNER- Canceled by creatorCANCELED_NOT_ACCEPTED- Canceled due to insufficient playersCANCELED_THROUGH_API- Canceled via APICANCELED_TIMEOUT- Canceled due to timeout
Event Details
RecreationalGameCreated
Triggered when a new recreational game is created.
Typical Status: OPEN
Use Cases:
Notify players of new game availability
Track game creation metrics
Update external systems
Example:
RecreationalGameJoined
Triggered when a user joins an existing game.
Typical Status: OPEN or CONFIRMED
Use Cases:
Notify other players of new participant
Update participant counts
Trigger game confirmation logic
RecreationalGameStarted
Triggered when the game owner starts the game.
Typical Status: LOCKED or PENDING_OUTCOMES
Use Cases:
Lock game roster
Begin tracking game progress
Notify participants game has begun
RecreationalGameCompleted
Triggered when game outcome is determined.
Typical Status: CLOSED or CLOSED_TIE
Use Cases:
Distribute winnings
Update player statistics
Trigger reward fulfillment
Example:
RecreationalGameCanceled
Triggered when a game is canceled.
Typical Status: CANCELED_* (various cancellation reasons)
Use Cases:
Process refunds
Notify participants
Update game listings
Webhook Handling Best Practices
Idempotency
Webhooks may be delivered multiple times. Implement idempotent handling using the matchup id:
Status Transitions
Track expected status transitions to detect anomalies:
Error Handling
Return 2xx status codes for successful processing. Lucra will retry failed webhook deliveries:
Related Documentation
Games You Play REST API - REST endpoints for game management
Webhook Setup - Webhook subscription and verification
Free-to-Play Webhooks - Free-to-play game webhooks
Last updated
