Quick start
From sandbox access to a launched game. The portal’s getting-live checklist follows the same order and turns each step green as it passes.
1. Get sandbox access
Request sandbox access and we set up your operator account in the sandbox and invite your team to the portal. Sign-in uses a password and a passkey or authenticator code.
2. Make a key and allow your addresses
- In the portal, on Team and keys → Operator API, an admin makes a key. You get a key id (
opk_and 24 hex characters) and a 64-character secret. The secret is shown once. - Add the addresses your servers call from to your allowed addresses (single IPs or CIDR ranges). With none set, every call is refused with
IP_NOT_ALLOWED. - Optional: set a message address (https) for webhooks and choose the events.
3. Make your first calls
Health, currencies and the webhook keys need no signature. Start there to check your network path.
curl -s https://sandbox.bhts.dev/v1/health
curl -s https://sandbox.bhts.dev/v1/currencies Then make a signed call, such as GET /v1/games?limit=2. Request signing has copy-ready curl and Go.
4. Build your wallet endpoints
Your wallet implements the Seamless Wallet API: authenticate, balance, bet, win, bet_win, rollback, end_round and promo_credit. Every request is a signed HTTPS POST, and every business outcome is HTTP 200 with a status.
- Amounts are decimal strings at the currency’s precision:
"12.50"ZAR,"1500"UGX. Never floats. tx_idis the idempotency key. Keep it for at least 180 days. A repeat returns the original outcome with the current balance.- A stake that times out (about 3 seconds) is not retried: bhub sends a
rollbackinstead. Payouts and refunds are retried for up to 72 hours.
POST https://your-wallet.example/bhub/v1/bet
X-Bhub-Key-Id: k1
X-Bhub-Timestamp: 1764763200
X-Bhub-Signature: 6f1c…
{"request_id":"…","session_token":"…","player_id":"p-1042","currency":"ZAR",
"game_id":"…","provider":"…","round_id":"…","tx_id":"…","amount":"12.50"}
200 {"status":"OK","request_id":"…","operator_tx_id":"…","currency":"ZAR","balance":"987.50"} 5. Pass the wallet checks and the 10 000-round test
In the portal, start the simulator. It runs 34 automatic checks, then a 10 000-round test with slow answers, duplicates and late payouts mixed in. A full pass gives you a signed integration certificate. See Sandbox for what each run does.
6. Connect your studio accounts
Each game studio gives you your own account under your own contract: you sign with the studio and pay it directly. In the portal, on Studio connections, enter the studio’s address, your operator id at the studio, the currencies, the API credentials and the callback secret. The credentials go to bhub’s secret store and are never shown again. Press Test connection; bhub then verifies and activates it.
You can have one live connection (real play) and one test connection (simulator and sandbox runs) per studio. Sim Studio, bhub’s test studio, is built in and needs no account. There is no fallback to any other account: without an active connection, a launch is refused with GAME_UNAVAILABLE and details.reason: studio_not_connected.
7. Launch a game
Read the catalogue with GET /v1/games, then ask for a launch URL. demo never touches your wallet. real exchanges your launch token with your wallet’s authenticate.
BODY='{"mode":"demo","game_id":"<a game_id from GET /v1/games>","currency":"ZAR","language":"en"}'
TS=$(date +%s)
SIG=$(printf '%s\n%s\n%s\n%s' "$TS" POST /v1/launch "$BODY" \
| openssl dgst -sha256 -hmac "$SECRET" -hex | sed 's/^.* //')
curl -s https://sandbox.bhts.dev/v1/launch -H 'Content-Type: application/json' \
-H "X-Bhub-Key-Id: $KEY" -H "X-Bhub-Timestamp: $TS" -H "X-Bhub-Signature: $SIG" \
--data-binary "$BODY"
# 201 {"launch_id":"…","launch_url":"https://play.bhts.dev/play/…","mode":"demo",…} 8. Choose your reconcile source
Each night bhub matches every stake, payout and refund with your own records. Choose how bhub reads them: a file upload, the optional read-only GET /v1/transactions endpoint on your wallet, or a read-only database view.
9. Go live
After a launch review, the games your licence and your studio contracts allow are switched on for real money on https://api.bhts.dev.