Skip to content

Responsible Gaming Overview

The Responsible Gaming (RG) module is a mandatory compliance feature for licensed casino operators: financial limits with cooling-off periods, reality checks, and self-exclusion. RG requirements vary by jurisdiction, so the SDK fetches the operator's RG configuration dynamically; your UI renders only what is legally allowed on that platform.

Public surface

MemberReturnsDescription
getConfig()Promise<RGConfig>The operator's RG configuration
getActiveLimits()Promise<PlayerLimit[]>The player's limits, with usage
setLimit(payload)Promise<PlayerLimit>Set or change a limit
removeLimit(type, period)Promise<void>Request limit removal (cooling-off applies)
getSelfExclusionStatus()Promise<SelfExclusionStatus>Current self-exclusion state
selfExclude(payload)Promise<void>Start a self-exclusion
onRealityCheckTriggered(listener)unsubscribe fnReality-check notifications (see Reality Checks)
onEvent(listener)unsubscribe fnRG events on the real-time channel

Typed structures

typescript
type LimitType = 'DEPOSIT' | 'LOSS' | 'WAGER';
type LimitPeriod = 'DAILY' | 'WEEKLY' | 'MONTHLY';
type LimitStatus = 'ACTIVE' | 'PENDING' | 'REMOVED';

type SelfExclusionPeriod =
  | '24_HOURS' | '7_DAYS' | '1_MONTH' | '6_MONTHS' | 'PERMANENT'; // closed, config-aligned

interface LimitConfig {
  enabled: boolean;    // whether the operator offers this limit type
  minAmount: number;   // operator-configurable envelope
  maxAmount: number;
}

interface RGConfig {
  depositLimits: LimitConfig;
  lossLimits: LimitConfig;
  wagerLimits: LimitConfig;
  realityCheckEnabled: boolean;
  realityCheckIntervals: number[];        // minutes, e.g. [15, 30, 60]
  selfExclusionOptions: SelfExclusionPeriod[]; // subset of the closed union
}

interface PlayerLimit {
  id: string;
  type: LimitType;
  period: LimitPeriod;
  amount: number;
  status: LimitStatus;
  requestedAt: string;      // ISO-8601
  appliedAt?: string;        // ISO-8601; when it took effect
  activatesAt?: string;      // ISO-8601; present on PENDING changes: when they will take effect
  pendingChange?: 'INCREASE' | 'REMOVAL'; // present on PENDING limits only; what the pending change is; absent on ACTIVE/REMOVED
  currentAmountUsed: number; // consumption within the current period window
  windowStart: string;       // ISO-8601; start of the current usage window
  windowEnd: string;         // ISO-8601; end of the current usage window
}

Operator-configurable values

ValueTypeDefault / rangeEffect
Limit envelopes (minAmount/maxAmount per type)numberoperator-definedValidation envelope for setLimit
Enabled limit typesper typeoperator-definedWhich limit UIs render
Cooling-off duration (increases & removals)number24 hoursPENDING → ACTIVE activation delay
Reality-check intervalsnumber[] (minutes)e.g. [15, 30, 60]The offered interval choices
Self-exclusion optionssubset of SelfExclusionPeriodoperator-definedWhich exclusion periods are offered

The cooling-off rule itself (decrease immediate; increase/removal delayed) and the limit periods are platform-fixed; jurisdiction-mandated behavior, not operator choice.

Events

RG state changes fire on the shared real-time channel:

typescript
interface LimitActivatedEvent { eventId: string; limitId: string; } // a pending INCREASE applies
interface LimitRemovedEvent { eventId: string; limitId: string; }    // a pending REMOVAL completes
interface SelfExclusionStartedEvent { eventId: string; playerId: string; expiresAt: string | null; }
interface SelfExclusionExpiredEvent { eventId: string; playerId: string; }
text
GIVEN a PENDING limit whose activatesAt moment arrives (eager) OR any
     limits read occurs (defensive)
THEN the change applies; a pending INCREASE becomes ACTIVE and fires
     the LimitActivatedEvent exactly once; a pending REMOVAL becomes
     REMOVED and fires the LimitRemovedEvent exactly once; reads never
     return a stale PENDING state.

GIVEN a self-exclusion whose expiresAt passes
THEN the exclusion ends, the SelfExclusionExpiredEvent fires exactly once,
     and reads never return a stale active state.

See Financial Limits and Self-Exclusion & Reality Checks.