Overview

PikStats gives your game a hosted backend for player stats, leaderboards, and variables โ€” no server required. Each game project gets its own SDK key and a set of typed variables. Your game calls the REST API to read and write player data. Every paid call consumes PIKE from your balance.

Quick Start

  1. Create a game in Games and copy its SDK key.
  2. Add variables for the values you want to track (score, level, skinโ€ฆ). Copy each variable's token.
  3. Set variables to Live when ready for production.
  4. Call POST /api/player/set whenever a value changes.
  5. Call GET /api/leaderboard to show rankings in-game.
SDK key โ€” authenticates your game. Found on the game's page in your dashboard.
Variable token โ€” 32-character ID for a specific variable. Copy it from the Variables page.

Choose your integration

Variables

A variable is a typed field attached to a game. Every player gets their own value per variable. You define name, type, and default โ€” PikStats stores the rest.

  • One schema per game โ€” all players share the same variable definitions.
  • Each variable has a unique 32-character token used in API calls.
  • Variables start in Demo mode and must be manually set to Live.

Variable Types

TypeDescriptionExample
boolTrue / false flagfalse
intWhole number โ€” scores, coin count0
floatDecimal โ€” times, ratios0.0
textString โ€” names, tags, skinsdefault
dateDate in YYYY-MM-DD2026-01-01

Type casting is automatic โ€” send any value and PikStats casts it to the variable's type.

Demo & Live Mode

Every variable starts in Demo mode so you can freely edit or delete it. When ready, click Go Live to lock it for production.

Once a variable is live: it cannot be edited or deleted, the game cannot be deleted, and player data is never lost.

Only Live variables are accessible via the API. Demo variables are invisible to game clients.

Plans

PlanGamesVariables / gameStarting PIKE
Starter111,000
Basic35+20,000 on upgrade
Pro1010+100,000 on upgrade

PIKE is consumed by paid API calls. Top up anytime from Buy PIKE.

Authentication

Base URL: https://pikstats.com/api/

Every API request must include your game's SDK key as a header. Find it on the game's page in your dashboard.

X-SDK-Key: your-sdk-key

All responses use the same envelope: {"ok": true, "data": {...}}

EndpointMethodPIKE cost
/api/player/identifyPOSTFree
/api/player/setPOST1 PIKE
/api/player/getGETFree
/api/leaderboardGET1 PIKE
/api/variablesGETFree

โ†’ View full API reference with examples

Error Handling

The API never returns an error to your game. If something goes wrong โ€” invalid variable token, insufficient PIKE, player not found โ€” the API returns ok: true with sensible defaults (empty values, zero PIKE remaining, empty leaderboard).

All failures are silently logged as alerts in your dashboard so you can investigate without your players noticing anything.

Billing & Refunds

All purchases are non-refundable. This includes PIKE packs and extension upgrades. Once applied to your account, credits cannot be reversed. PIKE spent on API calls is also non-refundable.

If you believe you were charged in error, contact support.