Player Daily Rewards Program Event

Info

Draft Documentation - This section is currently under review and may be subject to changes.

The Player Daily Rewards Program Event is sent via SSE when a player’s state changes.

Event Type

event_type: DRP_STATE_CHANGED

Event Structure

{
  
  "brand_id" : 1,
  "player_id" : 12345,
  "event_type" : "DRP_STATE_CHANGED",
  "event_data" : {
    "day" : "1",
    "program_id": "324234213-421342134-42314-42314123"
    "new_state" : {
      "claimed_at" : "",
      "day_number" : 1,
      "day_value" : "10",
      "history_info" : null,
      "info_codes" : null,
      "name" : "Day 1",
      "status_code" : 0,
      "transaction_id" : "",
      "type" : "gcoins",
      "updated_at" : "2026-01-25 06:39:19"
    },
    "old_state" : {
      ...
    }
  }
}

Fields

Base Event Fields

Field Type Description
brand_id int The casino brand identifier.
player_id int The player identifier.
event_type string Always “DRP_STATE_CHANGED” for this event.
event_data object Balance update data (see below).

Event Data Fields - “old_state”/“new_state”

Field Type Description
“day_value”: “100”, Reward value
“type”: “gcoins”, Reward type. Currently “gcoins” only. If empty - no reward for particular day of program is granted
“name”: “Day 1”, Label defined in CBO
“transaction_id”: null, Non-empty if reward is claimed
“updated_at”: “”, Date when action (LOGIN) is taken by player
“claimed_at”: “”, Non-empty if reward is claimed
“day_number”: 4 number Actual program day when login was made
“status_code”: 0, 0 - Eligible, 1 - Not Eligible, 2 - Future, 3 - Out od range
info_codes: [1,2] Array of info codes/error codes
“history_info”: [] array Info why this day is moved vs programs days, if its moved

Event Examples

Example 1: Event sent after player login when day is eligible

This event is sent when a player login to casino and passes all rules

{
  
  "brand_id" : 1,
  "player_id" : 12345,
  "event_type" : "DRP_STATE_CHANGED",
  "event_data" : {
    "day" : "1",
    "program_id": "324234213-421342134-42314-42314123"
    "new_state" : {
      "claimed_at" : "",
      "day_number" : 1,
      "day_value" : "10",
      "history_info" : null,
      "info_codes" : null,
      "name" : "Day 1",
      "status_code" : 0,
      "transaction_id" : "",
      "type" : "gcoins",
      "updated_at" : "2026-01-25 06:39:19"
    },
    "old_state" : {
      "claimed_at" : "",
      "day_number" : 1,
      "day_value" : "",
      "history_info" : null,
      "info_codes" : [ 100 ],
      "name" : "",
      "status_code" : 1,
      "transaction_id" : "",
      "type" : "",
      "updated_at" : ""
    }
  }
}

Client Implementation

JavaScript Example

const eventSource = new EventSource('/gateway/sse/1001/stream', {
  headers: {
    'x-auth-token': playerToken
  }
});

eventSource.onmessage = (event) => {
  const data = JSON.parse(event.data);

  // Filter for gamification balance update events
  if (data.event_type === 'DRP_STATE_CHANGED') {
    const newStateData = data.event_data;
    .... call your UI func
  }
}; 

Use Cases

This event is triggered in the following scenarios:

Scenario Description
PLAYER LOGIN When player login affected the state
PLAYER DEPOSIT When player deposit affected the state

See Also