Free-to-Play Webhooks
Overview
Free-to-Play (FTP) webhooks deliver real-time notifications for game lifecycle events, focusing on matchup creation, acceptance, and outcome distribution. All FTP webhooks follow the verification process described in Webhook Setup.
Prerequisites
Webhook endpoint configured per Webhook Setup
Subscribed to FTP event types
Signature verification implemented
Reward fulfillment system integrated
Event Types
FtpMatchupCreated
New FTP matchup created
Once per matchup
FtpMatchupAccepted
User accepts matchup
Once per acceptance (not for creator)
ContestUserOutcome
Matchup completes
Once per participant
Matchup Types
Free-to-Play games support three matchup types:
PROFESSIONAL_SPORTS_TEAM_STAT
Prediction based on team statistics
PROFESSIONAL_SPORTS_PLAYER_STAT
Prediction based on player statistics
RECREATIONAL_GAME
Custom recreational game predictions
Event Details
FtpMatchupCreated
Triggered when a new Free-to-Play matchup is created.
Payload:
Field Descriptions:
id
string
UUID of the matchup
event
string
Always "FtpMatchupCreated"
createdByUserId
string
UUID of creating user
type
string
Matchup type (see types above)
isPublic
boolean
Whether matchup is publicly joinable
groups
array
Competing groups/sides
Group Object:
groupId
string
UUID of the group
users
array
Users in this group
professionalTeamDetails
object
Team details (if type is PROFESSIONAL_SPORTS_TEAM_STAT)
professionalPlayerDetails
object
Player details (if type is PROFESSIONAL_SPORTS_PLAYER_STAT)
User Object:
userId
string
UUID of the user
tenantReward
object
Reward configuration for this user
Tenant Reward Object:
id
string
Lucra's tenant reward identifier
intentId
string
Your custom identifier (passed via SDK)
metadata
string
JSON string with custom reward data (passed via SDK)
Professional Player Details:
player
string
Player name
schedule
string
Game schedule information
metric
string
Statistical prediction metric
Professional Team Details:
team
string
Team name
schedule
string
Game schedule information
metric
string
Statistical prediction metric
Use Cases:
Log new matchup creation
Track matchup types and popularity
Monitor reward configuration
Initialize matchup tracking in your system
FtpMatchupAccepted
Triggered when a user accepts an existing FTP matchup.
Notes:
Fires once per acceptance
Does NOT fire for the initial creator
In 1v1 scenarios, fires once when opponent accepts
Payload:
Additional Fields:
acceptedByUserId(string) - UUID of the user who accepted the matchup
Use Cases:
Notify creator of matchup acceptance
Lock matchup roster
Send confirmation messages
Track matchup fill rates
Differences from FtpMatchupCreated:
Includes
acceptedByUserIdfieldBoth groups now populated with users
Indicates matchup is ready to start
ContestUserOutcome
Triggered when a Free-to-Play matchup completes, sent once per participant.
Important: Each participant receives their own webhook notification.
Payload:
Field Descriptions:
event
string
Always "ContestUserOutcome"
matchupId
string
UUID of the completed matchup
userId
string
UUID of user receiving this notification
usersOutcomes
array
Outcomes for all participants
User Outcome Object:
userId
string
UUID of the participant
outcome
string
Result: WIN, LOSS, or TIE
reward
object|null
Reward details (only for winners/ties)
Reward Object:
intentId
string
Your custom identifier from SDK
metadata
string
JSON string with reward details from SDK
Use Cases:
Distribute rewards to winners
Send outcome notifications
Update user statistics
Track game completion metrics
Processing Pattern:
Webhook Handling Best Practices
Idempotency for ContestUserOutcome
Since each user receives their own webhook, implement user-specific idempotency:
Reward Metadata Parsing
Safely parse and validate reward metadata:
Matchup State Tracking
Track matchup progression through webhook events:
Reward Fulfillment Pipeline
Implement a robust reward fulfillment pipeline:
Error Handling
Return appropriate status codes to control webhook redelivery:
TypeScript Types
Related Documentation
Free-to-Play REST API - Reward redemption endpoint
Webhook Setup - Webhook subscription and verification
Games You Play Webhooks - Standard GYP webhooks
Last updated
