Get started
Quick start
From a new account to a first played round, in seven steps.
1. Set up a Sandbox environment
- 1
Sign up and log in to the back office.
You start in Sandbox.
- 2
Create an API key.
Save its private key on your server. We keep only the public key.
- 3
Create an environment.
Give it a name and your server address. Do it in the back office, or with environment.create.
- 4
Build your five wallet calls and the session.closed address.
Check our signature with our public key.
- 5
Run the wallet test run.
We call your wallet and check each rule. The back office shows pass or fail for each.
If a check fails, you see one of these: “No answer from your server”, “Your server refused our signature”, the two answers side by side when your wallet does the same transactionId twice, or the time it took when your wallet is slower than 5 seconds.
2. Pull the games
Your server calls games.list and maps each gameId to its lobby.
- A Sandbox API key on Live gets
unknown_key. - A call from an address not on the API key’s list gets
ip_not_allowed. - A missing
Environmentname getsenvironment_not_found. - A wrong private key gets
bad_signature. - A wrong server clock gets
request_too_old.
3. Start a session
A player taps a game. Your server calls session.start. You get a sessionId and a game link.
- A missing field, for example
market, getsinvalid_request. - Wrong bet settings get
bet_settings_invalid. - A timeout, then a retry with the same
requestId, gives the same session. Never two. - A retry with a new
requestIdmakes a second session. If you allow one session per player, the first closes asreplaced.
4. Open the game
Your web site shows the game link in an iframe or as a full page. An iOS or Android app shows it in a web view. See Game client.
- A link opened after 2 minutes shows “This game link has expired.” The session closes as not_opened.
- A link opened a second time shows “This game link was already used.”
- If your page address is not set in the environment, the game ignores messages from your page.
- If your wallet does not answer
wallet.balance, the game shows “Can’t load balance” with a retry button.
5. Play rounds
Our server calls wallet.stake, then wallet.win or wallet.loss, for every round.
- If your wallet refuses a stake, the player sees the message for the code.
- If your wallet does not answer a stake in 5 seconds, we send a
wallet.refund. - If your wallet does not answer a win, we send the same win again, with the same transactionId, until you accept it.
- A win not accepted after 1 hour goes on the stuck list in both back offices. We email every owner of your account.
6. Close the session
Your server calls session.close when the player logs out or leaves. We send session.closed for every close, yours too.
- Closing a session we already closed answers ok, with who closed it first and why.
- If your session.closed address does not answer, we send the same event again until you accept it, for up to 30 days. Then the back office shows “Not delivered”.
- A Mines round still open shows as
openRoundIdin session.closed.
7. Go live
All wallet checks pass in one Sandbox environment. Then you ask for Live in the back office. See Sandbox and Live.