Free to Play Backend Integration

In order to facilitate the ability for your system to grant users rewards they have won via Free To Play matchups we have implemented a few backend webhooks subscriptions.

This requires the Server to Server API Integration, you can check how to implement it here.

See how to subscribe to webhook events here.

Free To Play - Matchup Created: FtpMatchupCreated

The FtpMatchupCreated webhook event fires whenever a Free To Play Matchup is created.

FtpMatchupCreated
{
    "id": "7a986e7d-783c-4cdd-90f8-eac6c3967651", // Lucra matchup identifier
    "event": "FtpMatchupCreated",
    "createdByUserId": "6b186e7d-783c-4cdd-90f8-eac6c3967651", // Lucra user identifier
    "type": "PROFESSIONAL_SPORTS_TEAM_STAT", // One of PROFESSIONAL_SPORTS_TEAM_STAT | PROFESSIONAL_SPORTS_PLAYER_STAT | RECREATIONAL_GAME
    "isPublic": true,
    "groups": [
        {
            "groupId": "5c286e7d-783c-4cdd-90f8-eac6c3967651", // Lucra matchup group identifier
            "users": [
                {
                    "userId": "6b186e7d-783c-4cdd-90f8-eac6c3967651", // Lucra user identifier
                    "tenantReward": {
                          "id": "6b186e7d-783c-4cdd-90f8-eac6c3967651", // Lucra tenant reward identifier
                          "intentId": "6b186e7d-783c-4cdd-90f8-eac6c3967651", // UUID passed in via SDK
                          "metadata": "{}" // Stringified JSON data passed in via SDK
                    }
                }
            ],
            "professionalTeamDetails": { // Optional depending on type
                "team": "Philadelphia Eagles",
                "schedule": "DAL vs PHI - 2024REG W10",
                "metric": "FOOTBALL_SCORE"
            },
            "professionalPlayerDetails": { // Optional depending on type
                "player": "Jalen Hurts",
                "schedule": "DAL vs PHI - 2024REG W10",
                "metric": "PASSING_TDS"
            },
        }
    ]
}

Free To Play - Matchup Accepted: FtpMatchupAccepted

The FtpMatchupAccepted webhook event fires whenever a Free To Play Matchup is accepted. It will fire for each acceptance. For example in a 1v1 matchup, it will fire only once. It will not fire when the initial user creates the matchup.

Free To Play - Matchup User Outcome: ContestUserOutcome

The ContestUserOutcome webhook event fires whenever a Free To Play Matchup is completed regardless of Matchup outcome. This webhook will fire for each matchup participant so in a 1v1 matchup 2 webhooks will be sent. You can check the value of the outcome property for each payload to determine which matchup participants won.

User Redeemed Reward Endpoint

Call this endpoint when a user redeems a promotion. The redeemedAt is optional and will default to now. Pass it in if the user redeemed the promotion at a different time from when you call this endpoint.

POST /api/rest/user_redeemed_tenant_reward

body

response

Last updated