Jackpot Freebets > Freebet Events

The following events have been added to the system to support the Freebets feature:

Event NameDescription
PlayerBonusAddedSent when freebets are awarded to a player
PlayerBonusRemovedSent when freebets are removed from a player
PlayerBonusUpdatedSent when a player's freebet state changes (for example when a player uses part of the freebet)
PlayerBonusConsumedSent when a player's awarded freebets are completely consumed
PlayerBonusExpiredSent when a player's awarded freebets expire

Each of these events carries the exact same payload, which has the following structure:

{
    "msg_type": "Event",
    "source": "thrillgate",
    "msg_name": "PlayerBonusAdded" | "PlayerBonusRemoved" | "PlayerBonusUpdated" | "PlayerBonusConsumed" | "PlayerBonusExpired",
    "operator_id": String,
    "brand_id": String,
    "player_id": String,
    "data": {
        "id": String,
        "promo_id": String | null,
        "bonus_instance_id": String,
		"available_for": [
			{
				"provider_id": String,
				"game_ids": [String]
			}
		],
        "bonus_data": {
            "Freespins": {
                "id": String,
                "name": String,
                "freespin_type": FreeSpinType, // see below for structure details
            }
        },
		"state": "Available" | "Consumed" | "Expired",
		"timestamp_bonus_awarded": Integer,
		"timestamp_bonus_expires": Integer,
		"timestamp_bonus_consumed": Integer | null
    },
    "timestamp": Integer
}

The FreeSpinType structure is an enumerated structure and can contain one of the following structures:

Fixed Freebets

{
	"type": "PlayerFixedFreeSpins",
	"count": Integer,
	"used": Integer,
	"currency": String,
	"value": Number
}

Variable Freebets

{
	"type": "PlayerVariableFreeSpins",
	"amount": Decimal,
	"amount_used": Decimal,
	"currency": String,
}

Your frontend widgets can use the payload of these events along with the event context to decide what to display to the user.