Validation
Request rules#
Send a JSON object to POST /v1/commands with X-API-Key. Use an exact case-sensitive method; unknown methods and fields are rejected. Omit legacy api_login, api_password and user_password: they are stripped, never authenticated.
| Field | Rule |
|---|---|
| Currency | Three uppercase letters; provider/game coverage and workspace restrictions apply. Empty workspace list adds no restriction |
| Player | Nonblank, 1–128 characters, no control characters |
| Game ID | Exact catalogue identifier, max 255 characters |
| Return URLs | Absolute HTTPS, no credentials, both origins allowlisted |
| Starting balance | Finite JSON number, 0–1000000000 |
Other bounds are on each method reference.
IP, callback and return URL settings are separate#
| Setting | Purpose | Where to configure |
|---|---|---|
| API key source-IP ranges | Authorize your backend's outbound IP | API Setup |
| Callback URL and signing secret | Deliver signed wallet settlement events to your server | API Setup |
| Allowed return origins | Authorize the player-facing homeurl and cashierurl | API Setup |
Save https://operator.example for lobby/cashier URLs on that origin. Include a non-default port, not a path; save both origins if different. Empty origins reject all launches, including demos and platform calls.
Callbacks may use another domain. Callback URLs and IP whitelists do not authorize return origins. Client environment variables do not automatically update the gateway allowlist.
Responses#
Require HTTP success and numeric error: 0. No data wrapper. Nonzero numeric errors may arrive with HTTP 200. Gateway errors use:
{ "error": { "code": "CURRENCY_NOT_ALLOWED", "message": "Currency is not enabled for this organization", "requestId": "request-id" }}An upstream application rejection is sanitized to {"error":1,"message":"Upstream rejected the request"}. Do not interpret HTTP 200 as successful play or use private upstream messages as a recovery instruction.
Retain x-request-id; numeric application-error bodies may omit it.
Idempotency and recovery#
| Method | Idempotency-Key |
|---|---|
createPlayer, getGame, addFreeRounds, deleteFreeRounds, deleteAllFreeRounds | Required |
getGameList, getGameDemo, getFreeRounds | Rejected |
Keys: 8–255 printable ASCII characters, no spaces. Persist one key and exact request before dispatch. Changed fields/player require a different operation, not reuse of an existing key.
Timeout or unknown/unavailable/expired result: keep funds reserved, inspect Request Logs, reconcile with support. A new key is not recovery. Sensitive launch URLs may no longer be replayable.
Common gateway errors#
| Code | Meaning / next step |
|---|---|
INVALID_API_KEY, IP_NOT_ALLOWED, SCOPE_DENIED | Check key validity, egress IP allowlist, and method scope |
SANDBOX_UPSTREAM_NOT_CONFIGURED | Retired test-environment key; use a live Game API key, including for demo requests |
RESELLER_ENTITLEMENT_DENIED | Check inherited reseller term and game/provider authorization |
CURRENCY_NOT_ALLOWED, GAME_NOT_ALLOWED | Check workspace currency and game/provider entitlement |
RETURN_ORIGIN_NOT_ALLOWED | Allowlist the exact HTTPS origins of both return URLs |
CALLBACK_NOT_CONFIGURED | Configure callback URL and signing secret |
STARTING_BALANCE_REQUIRED | Supply the numeric starting balance for getGame |
ACTIVATION_REQUIRED, PRODUCTION_ACTIVATION_REQUIRED | Check demo or production activation entitlement |
INSUFFICIENT_GGR_BALANCE | Fund the separate workspace GGR wallet |
IDEMPOTENCY_KEY_REQUIRED, INVALID_IDEMPOTENCY_KEY, IDEMPOTENCY_NOT_SUPPORTED | Correct the header for the method |
IDEMPOTENCY_CONFLICT | The key belongs to a different request; reconcile the original operation |
REQUEST_IN_PROGRESS | An identical operation is still processing; do not dispatch a new one |
UPSTREAM_APPLICATION_ERROR | The provider returned a conclusive rejection |
UPSTREAM_OUTCOME_UNKNOWN, IDEMPOTENCY_OUTCOME_UNKNOWN | Reconcile before another financial operation |
IDEMPOTENCY_RESULT_UNAVAILABLE, IDEMPOTENCY_RESULT_EXPIRED | Prior result cannot be safely replayed; inspect logs and reconcile |
Minute limits, quotas and capacity#
| Setting | Meaning |
|---|---|
Workspace 0 | Default: no workspace minute cap |
Key null | Inherit workspace limit |
Key 0 | No key-specific cap. A finite workspace cap still applies |
| Positive cap | Up to 100000 requests/minute |
Quotas, IP throttling, capacity, concurrency, funding and authorization are independent. Follow Retry-After; keep mutation identity.
Support needs request ID, timestamp, method, game, currency and relevant settlement serial. Keep player references private; never send credentials, sensitive payloads or session URLs. Early failures may have no log row; historical currency/count fields may be unrecorded.
Worked diagnostic examples#
IP is whitelisted, but RETURN_ORIGIN_NOT_ALLOWED remains#
Save both exact HTTPS origins in API Setup. Client settings do not update the gateway. Do not remove IP restrictions or change the callback to bypass this error.
getGameList succeeded, but no games appeared#
error: 0 with an empty list means no matching games. Check currency/access filters. Succeeded - count not recorded is unknown, not Empty result - 0 games. Catalogue diagnostics.
HTTP 200, but the game did not launch#
Numeric error: 1 is rejection, not success. Save the message and request ID. Distinguish rejection from an unknown outcome before changing wallet reservations. Launch contract.
A launch timed out after funds were reserved#
Keep the reservation, original key and exact request. A timeout is not proof of rejection; changing the key still does not resolve the original operation. Reconcile before releasing funds or launching again. Include this in integration acceptance checks.
A settlement fails signature verification or arrives twice#
Verify HMAC against the exact raw request body, not reserialized JSON. Never bypass verification. Deduplicate serial_number atomically with the wallet update; use credit_amount as the post-round balance. Settlement contract.