Testing
How to test your integration on staging
Staging Environment
All integration testing happens on the staging environment:
| URL | |
|---|---|
| API | https://api.stagingmarbles.io |
| Game Status | status.155.io (select "Staging") |
Track Availability
Not all tracks (game rounds) run continuously on staging. Some tracks are reserved for internal testing — including rollback scenarios and edge cases that require manual intervention.
To see which tracks are currently live, visit status.155.io and select Staging. If a track appears offline, this is intentional and not a bug.
Tracks may be offline on staging
If a game shows no active tracks, check status.155.io before reporting an issue. We periodically pause tracks on staging for internal QA and rollback testing.
Testing Your Integration
Step 1: Verify endpoints individually
Use the staging API to generate a game URL and open it in a browser. Walk through a full game round and verify that your server receives the expected callbacks:
/balance— called when the game loads/bet— called when the player places a bet/win— called when the round ends (amount0for a loss,> 0for a win)/rollback— called if a round is cancelled (refund the original bet)
Step 2: Verify balances
After each callback, confirm that the player's balance on your side matches what you return in the response. Common issues:
- Deducting the bet amount twice (not handling idempotent retries)
- Not crediting the win amount for freebet wins (
isFree: truewithamount > 0) - Not refunding the bet on rollback
Step 3: Run the acceptance test
Instead of manually walking through every scenario, you can self-certify your integration with our acceptance endpoint. It replays the real wallet callbacks against your staging wallet and returns a pass/fail report for each check (signatures, bet/win/loss/rollback, idempotency, precision, free bets, and that your game is launchable):
curl -X POST https://acceptance.stagingmarbles.io/acceptance/run \
-H 'Content-Type: application/json' \
-d '{
"operatorId": "<your operatorId>",
"partnerId": "<your partnerId>",
"testPlayer": {
"clientPlayerId": "<a funded staging test player>",
"clientSessionId": "<a session id for that player>",
"currency": "USD",
"gameId": "<a whitelisted gameId>"
},
"checks": ["all"]
}'Authentication is by source IP — call from one of the IPs you whitelisted with us.
Every failed check includes a description telling you exactly what to fix. For a first,
no-risk run, pass only the read-only checks
(["signature_accepted", "signature_rejected", "unknown_player", "balance_read"]).
See Acceptance Testing for the full check list, the response shape, and where the test-player values come from.
Step 4: Go-live readiness
Once your acceptance run passes (and you're confident in your integration), contact our team to schedule the final verification. We will need:
- A staging URL and login credentials so we can access your platform
- We'll run a series of test rounds covering win, loss, and rollback scenarios
- We verify the callbacks against our internal logs to ensure everything matches
This final verification typically takes less than a day. Once confirmed, we'll set up your production environment and you can go live.
Fun Money Mode
You can test the game UI without implementing any endpoints by using fun money mode. Generate a game URL with currency: "XXX" and omit clientSessionId and clientPlayerId — no callbacks will be sent to your server.
See Game URL — Fun Money Mode for details.