Skip to content

Quickstart

Get the Velo prediction game running in your casino in under an hour.

Prerequisites

  • A running casino platform with a wallet system
  • HTTPS endpoint for Wallet API callbacks
  • API credentials (contact partners@velo.games)

Step 1: Get Your Credentials

After signing up as a B2B partner, you'll receive:

CredentialPurpose
OPERATOR_IDYour unique operator identifier
API_KEYAuthentication key sent via X-Api-Key header
API_SECRETHMAC-SHA256 signing secret
RGS_ENDPOINTYour assigned RGS server URL

Step 2: Implement the Wallet API

Velo needs to debit and credit your players' balances. Implement these endpoints on your server:

Required Endpoints

POST /wallet/authenticate  → Validate player session token
POST /wallet/debit         → Debit stake from player
POST /wallet/credit        → Credit winnings to player
POST /wallet/rollback      → Reverse a failed transaction
POST /wallet/balance       → Return player balance

See the full Wallet API Reference for request/response schemas.

Example: Authenticate Endpoint

json
// POST /wallet/authenticate
// Headers: X-Api-Key: <your_key>, X-Sign: <hmac_sha256_signature>

// Request:
{
  "token": "player-session-jwt",
  "game_id": "velo_btc_5min"
}

// Response:
{
  "player_id": "abc123",
  "username": "JohnDoe",
  "currency": "USD",
  "balance": 1500.00,
  "session_token": "session_xyz789"
}

Example: Debit Endpoint

json
// POST /wallet/debit
// Headers: X-Api-Key: <your_key>, X-Sign: <hmac_sha256_signature>

// Request:
{
  "player_id": "abc123",
  "transaction_id": "550e8400-e29b-41d4-a716-446655440001",
  "round_id": "184721",
  "game_id": "velo_btc_5min",
  "amount": 100.00,
  "currency": "USD",
  "session_token": "session_xyz789"
}

// Response:
{
  "transaction_id": "550e8400-e29b-41d4-a716-446655440001",
  "balance": 1400.00
}

Step 3: Embed the Game

Add the Velo game to your frontend via iframe:

html
<iframe
  src="https://game.velo.games/play?operator_id=YOUR_ID&player_id=PLAYER_ID&session_token=TOKEN"
  width="100%"
  height="700"
  frameborder="0"
  allow="autoplay"
></iframe>

Or use the React component for deeper integration:

bash
npm install @velo/game-widget
tsx
import { VeloGame } from '@velo/game-widget'

function CasinoPage() {
  return (
    <VeloGame
      operatorId="YOUR_ID"
      playerId="player_123"
      sessionToken="jwt_token"
      theme="dark"
      onBetPlaced={(bet) => console.log('Bet:', bet)}
      onRoundSettled={(result) => console.log('Result:', result)}
    />
  )
}

Step 4: Configure Your Theme

Customize the game's look to match your casino brand:

json
// POST to RGS: /api/v1/operator/theme
{
  "colors": {
    "background": "#1a1a2e",
    "accent": "#e94560",
    "up": "#00ff88",
    "down": "#ff3355"
  },
  "logo_url": "https://your-casino.com/logo.svg",
  "font_family": "Your Custom Font"
}

See the full Theming Guide for all available tokens.

Step 5: Go Live

  1. ✅ Wallet API endpoints responding correctly (all 5)
  2. ✅ HMAC signature verification working
  3. ✅ Idempotency handling on transaction_id
  4. ✅ Game embedded and displaying
  5. ✅ Theme configured
  6. ✅ Test with demo mode (&mode=demo)
  7. 🚀 Switch to production: remove mode=demo parameter

Need Help?

B2B Integration Documentation