Skip to content

Sandbox Environment

The KINGSTONE sandbox lets you build and test your integration with no real player money involved. It is not a separate system — "sandbox" is a mode on your partner account, set by Predigy when your key is issued. Sandbox accounts use the same API endpoints, the same request/response format, and the same validation rules as production, so code you write against the sandbox works unchanged in production.

Sandbox vs. Production

FeatureSandboxProduction
Base URLhttps://sandbox.kingstone.dev/apihttps://api.kingstone.dev/api
Player creditsAuto-refilled before each spin so the balance never runs outReal USD balances you manage
Outcome queue block size100 entries10,000 entries
Settlement reportsDaily at 02:00 UTCDaily at 02:00 UTC
Validation & rate limitsSame as productionSame as production

Your API key always starts with ks_ and is tied to one partner account. The prefix does not encode the environment — Predigy tells you whether your account is sandbox or production when the key is issued.

Selecting the Sandbox

The SDK's sandbox: true option points the client at the sandbox base URL:

typescript
import { KingstoneClient } from '@kingstoneapp/sdk';

const client = new KingstoneClient({
  apiKey: 'ks_sandbox_your_key_here',
  sandbox: true,
});

You can override the base URL to run against a local development server:

typescript
const local = new KingstoneClient({
  apiKey: 'ks_sandbox_your_key_here',
  baseUrl: 'http://localhost:3001/api',
  sandbox: true,
});

The sandbox behavior (test credits and small blocks, below) is driven by your account's mode, which Predigy sets — not by the URL.

Smaller Block Sizes

In production, outcome queue blocks contain 10,000 pre-computed entries. For sandbox accounts, blocks are 100 entries. This means:

  • Blocks exhaust faster, so you will see block transitions more frequently during testing.
  • You can exercise the full block lifecycle (GENERATING, VERIFYING, READY, ACTIVE, EXHAUSTED) without running thousands of spins.
  • RTP may vary more per block due to the smaller sample size — this is expected and not a bug.

Test Credits

Sandbox players are automatically refilled before every spin, so their balance never runs low during integration testing. You do not need to fund player accounts, and no real player money is involved in sandbox mode.

What You Can Test in Sandbox

  • Full spin flow — upload PAR sheets, register games, execute spins, read outcomes
  • Settlement reconciliation — list, acknowledge, and dispute settlement reports
  • Webhook delivery — register webhook URLs and receive test events
  • Audit chain verification — verify the SHA-256 hash chain for any game
  • RTP compliance — check certified vs. actual RTP and download compliance certificates
  • Error handling — trigger error codes (invalid wagers, missing games, rate limits)

Test Data

Sandbox test data persists — it is not wiped automatically on a schedule. If you want your sandbox PAR sheets, games, and player mappings cleared to start fresh, ask your Predigy contact; your API key stays valid.

Next Steps

Once you are comfortable with the sandbox, follow the Quick Start guide to execute your first spin.

KINGSTONE by Predigy Inc.