Skip to content

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
QueryRequiredNotes
playerExternalIdWhose 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"
}
FieldNotes
serverSeedHashSHA-256 of the secret server seed — the commitment. The seed itself stays hidden until you rotate.
clientSeedThe player’s current client seed. Change it via rotate.
nextNonceThe nonce the next round will consume; it increments by one per round.
algorithmKeyThe 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.