# How PlayerPal works

PlayerPal sits beside the casino and the game, never in front of them. A Player connects a casino account to PlayerPal once. From then on, partners send what happened in batches after the fact, PlayerPal turns eligible activity into Points, and each partner reads analytics about its own players. This page walks through the journey step by step and shows what data moves at each point.

Watch first. This follows the journey below from sign-up to analytics in six short scenes.

<Explainer id="platform" />

## The journey at a glance

```mermaid
flowchart LR
  P[Player] -->|1. Signs up| PP[PlayerPal Account]
  P -->|2. Links from casino| PP
  P -->|3. Plays| C[Casino and game provider]
  C -->|4. Activity in batches, later| PP
  PP -->|5. Credits Points| P
  PP -->|6. Analytics, own players only| C
```

| Step | What happens | Status |
|---|---|---|
| 1 | Player creates a PlayerPal Account | [Available] |
| 2 | Player links a casino account; each partner gets its own alias | [Available] |
| 3 | Player plays as normal; PlayerPal is not involved | [Available] |
| 4 | Partners send activity asynchronously in batches | [Available] |
| 5 | PlayerPal calculates and credits Points | [Available] |
| 6 | Partners read analytics through the API | [Available] |
| 6 | Partners read analytics in their own portal | [In development] |

## 1. The player signs up

[Available]

The Player creates a PlayerPal Account with a passkey, a password with a PlayerPal-generated ID, or a supported social sign-in. PlayerPal never asks for an email address or phone number. From a social sign-in it keeps only an opaque reference, not the player's profile. See [Player experience](./player-experience.mdx).

## 2. The player links a casino account

[Available]

Linking is a one-time step, started by the casino. No activity flows for a player until it is complete.

```mermaid
sequenceDiagram
  participant Casino as Casino backend
  participant PP as PlayerPal
  participant Player
  Casino->>PP: Create link request (signed, short-lived)
  PP-->>Casino: One-time link address
  Casino->>Player: Open PlayerPal window
  Player->>PP: Sign in or create Account, approve this casino
  PP-->>Casino: Result code
  Casino->>PP: Exchange result code
  PP-->>Casino: Aliases for this casino and its game integrations
```

When the link completes, PlayerPal issues **pairwise aliases**: random identifiers that mean something only to the partner they were issued to.

- The casino receives one alias for the player.
- Each game provider receives a separate alias per casino it is integrated with, so a provider cannot follow a player from one casino to another.
- Aliases are random. They are not derived from any personal data or from the player's own PlayerPal ID, which is never shared with partners.

The casino passes the provider's alias to the game in its existing launch information. PlayerPal is not called at launch.

## 3. The player plays

[Available]

Login, game launch, bets, settlement and payouts happen exactly as they do today, between the casino and the game provider. PlayerPal takes no part. If PlayerPal is unavailable, play continues. See [Availability](../developers/availability.mdx).

## 4. Activity flows in batches

[Available]

After a round settles, the partner records it locally and sends it to PlayerPal later, in a batch. PlayerPal confirms durable receipt straight away and processes the batch afterwards. Retries are safe: a batch or event sent twice is counted once.

```mermaid
flowchart LR
  G[Round settles at the partner] --> O[Partner's local outbox]
  O -->|Batch, with retries| I[PlayerPal ingestion]
  I -->|Accepted for processing| Q[Processing]
  Q --> L[Points ledger]
  Q --> A[Analytics]
```

There are two kinds of data:

| Data | Sent by | Used for | Guide |
|---|---|---|---|
| Per-round activity (bet, win, game, time) | Game provider | Points | [Sending activity](../developers/sending-activity.mdx) |
| Daily facts (gameplay, commercial, game catalogue, affiliate attribution) | Game provider or operator | Analytics | [Fact ingest](../developers/fact-ingest.mdx) |

Per-partner credentials for the per-round activity endpoints are [In development]. Daily fact ingest already uses per-partner credentials.

## 5. Points are credited

[Available]

PlayerPal calculates Points from eligible activity. Partners report facts; they never submit Point totals. Activity counts only if it happened after the player linked and before any Unlink. Campaign rules are versioned, so every credit can be explained later.

Spending Points in a rewards shop is [In development]. See [Points and rewards](../rewards/points-and-rewards.mdx).

## 6. Partners read analytics

[Available]

Each partner sees figures about the players linked to it, a comparison with the rest of the network, and anonymous peer benchmarks. Comparison figures are withheld when too few players or peers contribute. Partner portals that show these figures are [In development]; the API is available today. See [Analytics overview](../analytics/overview.mdx).

## What moves where

| Data | Player | Operator | Game provider | PlayerPal |
|---|---|---|---|---|
| Player's own PlayerPal ID | Sees it | Never | Never | Holds it |
| Operator alias | No | Its own only | Never | Holds it |
| Provider alias | No | Passes it to the game at launch | Its own, per casino | Holds it |
| Gameplay and commercial facts | Own summary | Sends its own | Sends its own | Processes them |
| Analytics | Own Points and activity | Own players plus anonymous comparison | Own players plus anonymous comparison | Network-wide |

## What never moves

- A player's email address, name or telephone number. PlayerPal does not collect them.
- A partner's login credentials or session cookies for its own players.
- One partner's alias to another partner.
- Any call from the game path to PlayerPal during launch, betting or payout.

## Related

  - [Linking players](../developers/linking-players.mdx): 
    Run the link flow from your casino.
  
  - [Privacy](../trust/privacy.mdx): 
    What PlayerPal holds and what it never receives.
  
  - [Capabilities](./capabilities.mdx): 
    What is available, in development and planned.
