Skip to content

Sandbox Environment

The KINGSTONE sandbox is a fully functional copy of the production API. It uses the same endpoints, the same request/response format, and the same validation rules. The only differences are smaller data volumes and relaxed limits, so you can develop and test without risk.

Sandbox vs. Production

FeatureSandboxProduction
API key prefixks_kp_
Base URLhttps://sandbox.kingstone.dev/apihttps://api.kingstone.dev/api
Outcome queue block size100 entries10,000 entries
Player creditsUnlimited test creditsReal USD balances
Settlement reportsGenerated on demandGenerated daily at 02:00 UTC
Data persistencePeriodically resetPermanent
Rate limitsSame as productionSame as sandbox

How to Tell if You Are in Sandbox

Check your API key prefix. If it starts with ks_, you are in the sandbox. If it starts with kp_, you are in production.

The SDK makes this explicit:

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

// Sandbox client — uses sandbox URL automatically
const sandbox = new KingstoneClient({
  apiKey: 'ks_sandbox_your_key_here',
  sandbox: true,
});

// Production client — uses production URL automatically
const production = new KingstoneClient({
  apiKey: 'kp_prod_your_key_here',
});

When you set sandbox: true, the SDK uses https://sandbox.kingstone.dev/api as the base URL. You can also override the base URL manually if you are running a local development server:

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

Smaller Block Sizes

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

  • Blocks exhaust faster, so you will see block transitions more frequently during testing.
  • You can test 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.

Unlimited Test Credits

Sandbox players start with unlimited test credits. You do not need to fund player accounts to test spins. This lets you focus on integration logic without worrying about balances.

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 all error codes (invalid wagers, missing games, rate limits)

Sandbox Resets

The sandbox environment is periodically reset to clean up stale test data. When a reset happens:

  • All partner-uploaded PAR sheets, games, and outcome queues are deleted.
  • Player mappings are cleared.
  • Settlement reports are removed.
  • Your API key remains valid — you do not need a new key after a reset.

Predigy will notify you via email before any scheduled sandbox reset. Webhook events are not used for reset notifications.

Next Steps

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

KINGSTONE by Predigy Inc.