Skip to content

Self-Exclusion & Reality Checks

Self-exclusion

Self-exclusion is the most severe RG tool: the player locks themselves out of the platform. Its enforcement is a cross-module contract; the RG spec defines it; the other modules link here.

typescript
interface SelfExclusionPayload {
  period: SelfExclusionPeriod; // from the operator's config options; closed union
}

interface SelfExclusionStatus {
  isActive: boolean;
  expiresAt: string | null; // ISO-8601, or null when PERMANENT
}

Enforcement contract (cross-module)

text
GIVEN an authenticated player
WHEN selfExclude({ period }) is called with a config-offered period
THEN the exclusion starts immediately and:

  - EVERY session for the account is revoked; all tabs fire
    session-expired and onAuthStateChanged(null)
    (see Session Lifecycle);
  - login is BLOCKED for the exclusion duration; attempts reject with
    RG_SELF_EXCLUDED (carrying expiresAt for the UI countdown);
  - wagers and deposits are blocked for the duration;
  - withdrawals REMAIN AVAILABLE; player funds are never trapped
    (regulatory practice);
  - the wallet stays ACTIVE (funds accessible via withdrawal only);
  - any running reality-check timer stops.

GIVEN a non-PERMANENT exclusion whose expiresAt passes
WHEN any RG read occurs (defensive) or the scheduled moment fires
THEN the exclusion ends, the SelfExclusionExpiredEvent fires exactly once,
     and login/wagers/deposits unblock; reads never return a stale
     active state.
javascript
await sdk.responsibleGaming.selfExclude({ period: '6_MONTHS' });

const status = await sdk.responsibleGaming.getSelfExclusionStatus();
if (status.isActive) {
  console.log(`Excluded until: ${status.expiresAt}`); // null if PERMANENT
}

Unknown or non-config-offered periods reject with RG_INVALID_EXCLUSION_PERIOD.

Reality checks

Reality checks periodically interrupt play to tell the player how long they've been playing and where they stand. Timing is platform-owned: the platform tracks the session clock and fires a due event at each configured interval; your app never sets timers.

typescript
interface RealityCheckStats {
  sessionDuration: number; // minutes, since session start
  totalWagered: number;    // in `currency`; derived from real play
  totalWon: number;        // in `currency`
  netPosition: number;     // totalWon − totalWagered
  currency: string;
}

interface RealityCheckDueEvent {
  eventId: string;   // dedupe key; see Real-Time Channel
  stats: RealityCheckStats;
}
text
GIVEN an authenticated player with reality checks enabled (per the operator
     config) who has played continuously for a configured interval
WHEN the interval elapses
THEN a RealityCheckDueEvent fires on the real-time channel with live
     stats derived from the player's actual play.

GIVEN a player who self-excludes
WHEN the exclusion starts
THEN reality checks stop; the enforcement contract above applies.

Your UI listens and shows the interrupt; the listener receives the full RealityCheckDueEvent (eventId for dedupe + live stats):

javascript
sdk.responsibleGaming.onRealityCheckTriggered((event) => {
  showRealityCheckModal(event.stats); // event carries eventId for dedupe
});

Error contract

CodeError classHTTP statusTrigger conditionRetryable
RG_INVALID_EXCLUSION_PERIODInvalidExclusionPeriodError400Period not offered in the operator's configNo (pick an offered period)
RG_SELF_EXCLUDEDSelfExcludedError403Login/wager/deposit attempted during an active exclusionNo (until expiresAt)

Common errors are defined once in the Error Reference.