FAQ: External Casino Provider Integration
Frequently asked questions about integrating an external casino provider with the Evenbet system.
Q: How does game launching work from Evenbet's side?
In the standard implementation, the Evenbet system generates a game launch URL using the OPEN_GAME_URL provided by the provider and redirects the user to that URL. The game is typically opened in an iframe or a new browser tab. No JSON response is expected from the provider at this stage; the provider either serves the game directly at the URL or performs its own redirect.
An alternative method is also available where Evenbet sends a POST request with launch parameters to the provider, and the provider returns a launch URL in the response body. This approach is described in the Opening a game via Provider URL article.
Q: Is LOAD_GAMES_URL a GET or POST request? Does it include parameters? How often is it called?
LOAD_GAMES_URL is a GET request. The Evenbet system calls it on a fixed server-wide schedule, once per day, to synchronize the game catalog. Games returned in the response are added or updated; games absent from the response are removed. Query-string parameters ts (UNIX timestamp) and optionally casinoId are included for authorization signature validation.
The expected response is a JSON array of game objects. The full response schema and examples are available in the Loading of available games article.
Q: How do I generate the Authorization header?
The Authorization header is generated by hashing the concatenation of the raw request body and your secret key using SHA-256.
Example:
Raw body: {"token":"b91b664a8e2b558c240824f7da0e842c","gameId":"testGameId","endRound":false,"roundId":"29","transactionId":"d_182","amount":0}
Secret key: test_secret_key
Resulting hash: 5a0314907c49dea0b8cc90533e80c82ce523285c5f01831e41f06a0d6ba69a6e
The hash value is placed in the Authorization header of the request. A PHP code example is available in the Integration of external casino providers to Evenbet overview article.
Q: What is currencyPrecision and is it required?
currencyPrecision is mandatory for all new integrations. It is returned in the Login response and specifies a power-of-ten exponent used to convert integer amounts to their real currency values.
For example, if currencyPrecision=2, then an amount of 100 equals 1.00 in the given currency (100 / 10²).
For existing integrations that were completed before this parameter was introduced, it remains optional but can be activated upon request.
Q: Why am I receiving "Invalid token" or "Session not found" errors?
The most common cause is reusing the game-launch token after it has already been exchanged via the login callback.
When a game is launched, the Evenbet system generates a temporary, one-time token and includes it in the game URL. The provider must call the /login endpoint with this token to authenticate the session. The login response returns a new session token. All subsequent requests (balance, debit, credit, rollback) must use this new session token. The original game-launch token is invalidated after the first successful login.
Other possible causes:
- Token expiry. The game-launch token has a short default lifespan (60 seconds). If the provider does not call
/loginpromptly, the token expires andError code 3(Token expired) is returned. - Session termination. The session may have been closed due to inactivity or a manual logout, resulting in
Error code 7(Invalid token).
If the issue persists, contact the Evenbet support team with the relevant request and response logs for investigation.
Q: Must roundId and transactionId be unique across the entire system, or only within a specific currency?
Both roundId and transactionId must be globally unique across the entire system, not just within a single currency or player scope. If you need to maintain per-currency uniqueness on your side, you can append a currency suffix, for example roundId_USD or transactionId_EUR.
Q: Do you support credit requests with amount=0 when there is no win in the round?
Yes. A credit with amount=0 is the standard way to close a round that produced no winnings.
Sending a credit with amount > 0 after a debit with amount = 0 (outside of FreeSpins) is not the expected transaction flow and should be avoided. If the player earns an in-game reward without placing a bet, the provider should either attach the credit to the same round as the last non-zero debit, or open a new round with a debit request first.
Q: How should we use endRound if our system sends a separate round-closure notification?
If your system handles round closure as a separate event, you can send a credit request with amount=0 and endRound=true to signal the end of the round. This is an accepted alternative to including endRound=true on the final game transaction.
Q: In which cases should we perform a rollback of a debit transaction?
You should initiate a rollback when:
- The debit request timed out and no response was received.
- The response was not received due to a network issue.
- The response was received in an incorrect or non-standard format.
- The system returned error code 900 (
GENERAL_ERROR).
Keep retrying the rollback until you receive a successful rollback response.
If the rollback returns Error code 4 (Unknown transaction id), it means the original debit was never processed. No further rollback attempts are needed.
Q: What happens if the same transaction request is sent more than once?
All transactions (debit, credit, and rollback) are processed idempotently. If the same transaction request is sent more than once, the Evenbet system will return the same response as for the original request and will not process the transaction again.
This means providers can safely retry failed or timed-out requests without risk of duplicate charges or credits. Retry behavior for each transaction type is documented in the Main system's callbacks article.
Q: What values should usedFreeSpinsQuantity carry in FreeSpins debit and credit requests?
The provider should set:
usedFreeSpinsQuantity = 1for debit (bet) transactions.usedFreeSpinsQuantity = 0for credit (win) transactions.
Example sequence (3 FreeSpins):
Bet → usedFreeSpinsQuantity = 1
Win → usedFreeSpinsQuantity = 0
Bet → usedFreeSpinsQuantity = 1
Win → usedFreeSpinsQuantity = 0
Bet → usedFreeSpinsQuantity = 1
Win → usedFreeSpinsQuantity = 0
If the provider cannot pass usedFreeSpinsQuantity, it can be omitted. The Evenbet system will then use default values: 1 for debit and 0 for credit. All accepted transaction patterns are listed in the usedFreeSpinsQuantity parameter additional details section of the FreeSpins article.