Fairness state
GET /api/s2s/fairness/state returns a player’s current provably-fair
commitment — the values their next round is locked to before it is played.
Use it when you drive everything from your backend
and render your own “provably fair” panel next to the box.
See provably fair for how the commit-then-reveal scheme works end to end.
Request
GET https://{operator}.app.lootboxsolutions.com/api/s2s/fairness/state?playerExternalId=u_8431| Query | Required | Notes |
|---|---|---|
playerExternalId | ✅ | Whose commitment to read. A fresh seed pair is created on first read, so this never 404s. |
Response — 200
{ "serverSeedHash": "3a7bd3e2360a3d29eea436fcfb7e44c735d117c42d1c1835420b6b9942dd4f1b", "clientSeed": "bF3kQ9", "nextNonce": 0, "algorithmKey": "hmac_sha256_v1"}| Field | Notes |
|---|---|
serverSeedHash | SHA-256 of the secret server seed — the commitment. The seed itself stays hidden until you rotate. |
clientSeed | The player’s current client seed. Change it via rotate. |
nextNonce | The nonce the next round will consume; it increments by one per round. |
algorithmKey | The RNG algorithm the outcome is derived with. |
Errors
The signed request returns 401 on a bad signature (see
authentication); a malformed query returns 422 with the
standard { "error": { "code", "message", "fields" } } envelope.
Same data, two callers. The game app reads the equivalent in-iframe fairness panel with a session token. This S2S endpoint is the backend-driven equivalent — same commitment, signed with your API key.