Skip to content

Quick start

In fifteen minutes you will run the sandbox, run Tucano Casino (the reference operator in examples/operator-node), log in, place a bet in the embedded sportsbook and watch the signed debit arrive in the casino’s wallet.

The reference operator represents your casino platform: its login, accounts and demo cashier are outside the OrbiSportbook iframe. In your real integration, registration, CPF validation, KYC, deposits and withdrawals remain with that platform. This example uses play money and is not a production identity or payment service.

Connect to the hosted OrbiSportbook environment

Section titled “Connect to the hosted OrbiSportbook environment”

Use https://api.orbisportbook.com for the hosted integration. Ask OrbiSportbook for your tenant ID and integration key, and configure your wallet URL and allowed embed origins with the team. From your server, with those credentials in environment variables:

Terminal window
curl --fail-with-body -sS https://api.orbisportbook.com/api/v1/integration/sessions \
-H 'Content-Type: application/json' \
-H "X-Tenant-ID: $TENANT_ID" \
-H "X-API-Key: $INTEGRATION_API_KEY" \
-d '{"externalPlayerId":"player-42","displayName":"Maria","path":"/live"}'

The example uses the reference-id flow. For the existing BR profile, see current API compatibility.

Mount the returned launchToken with the embed SDK, loaded from https://api.orbisportbook.com/embed/v1.js, and set its url to https://api.orbisportbook.com. The hosted environment is currently staging; the development keys below are for the local walkthrough only.

Use these credentials only when running the local sandbox below.

Value
Tenant demo-embed (currency USD, seamless wallet)
Integration API key (X-API-Key) dev-integration-key
Wallet secret (HMAC) dev-wallet-secret
Allowed embed origins http://localhost:3000, http://127.0.0.1:3000, :5173, :8080 and :4322 on both hosts
Back office /admin/, admin@bookmaker.dev / admin-dev-password

You need Node 22, Go 1.26 and Postgres 16 (or Docker), and a checkout of the platform repository.

  1. Start Postgres and install the workspaces:

    Terminal window
    npm install
    ./scripts/dev-db.sh
  2. Start the API, pointing the demo-embed wallet at the casino you are about to run:

    Terminal window
    SEAMLESS_WALLET_URL_OVERRIDE=http://127.0.0.1:3000/wallet \
    SPORTSBOOK_URL=http://localhost:5173 \
    npm run dev -w @bookmaker/api

    The API listens on :8080 with simulated matches and the demo tenants. SPORTSBOOK_URL makes the launchUrl it returns point at the sportsbook dev server of the next step.

  3. Start the sportsbook (it also serves the embed SDK at /embed/v1.js):

    Terminal window
    npm run dev -w @bookmaker/sportsbook
  4. Start the casino:

    Terminal window
    npm start -w @bookmaker/example-operator
  5. Open http://localhost:3000, pick any price and press Log in to bet. The sportsbook asks the casino to log the player in (login_required); log in as ana / ana-demo-123. The casino sends a fresh launch token to the open iframe (set_launch_token) and the slip is ready.

  6. Enter a stake of 5 and place the bet. The casino’s terminal shows the platform’s signed call:

    wallet debit bet:5d7e5cd1-ae46-4159-9a66-51ee70aba189 player=casino-1001 amount=500 kind=bet -> 200 balance=49500

    and the casino header drops to $495.00 when the sportsbook reports balance_changed. Open Integration log at the bottom right to see every event.

To settle the bet at once, open the back office at /admin/ (staff login above), go to Manual settlement and result the market: the platform calls the casino’s credit endpoint with the payout, or with amount 0 if the bet lost. See Testing.

Create a session, as your server will:

Terminal window
curl -s http://localhost:8080/api/v1/integration/sessions \
-H 'Content-Type: application/json' \
-H 'X-Tenant-ID: demo-embed' \
-H 'X-API-Key: dev-integration-key' \
-d '{"externalPlayerId": "player-42", "displayName": "Maria", "path": "/live"}'
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9…",
"launchToken": "lt_NIpjVSCtwQlG0iLUbF9T7WeY84YSVs3pVQeLxbbH1O0",
"launchExpiresAt": "2026-10-16T03:01:22.081091Z",
"launchUrl": "http://localhost:5173/?tenant=demo-embed&launch=lt_NIpjVSCtwQlG0iLUbF9T7WeY84YSVs3pVQeLxbbH1O0&path=%2Flive",
"player": { "id": "pl_bd387263c326f44e90808bde", "externalId": "player-42", "status": "active", "…": "…" }
}

Open launchUrl within two minutes: you are logged in as player-42, and the address bar no longer contains the token. Open it again: you are not, because launch tokens are single use.

Then mount it in a page of your own with the embed SDK, or try every command in the Playground.