{
  "schemaVersion": 1,
  "product": "OrbiSportbook",
  "purpose": "Agent integration entrypoint; follow linked contracts, do not infer undocumented APIs.",
  "hostedEnvironmentAtPublication": "staging",
  "environmentNotice": "Confirm the deployment and customer environment with OrbiSportbook before using real funds. A production tenant label is not production approval.",
  "endpoints": {
    "sportsbookOrigin": "https://api.orbisportbook.com",
    "session": {
      "method": "POST",
      "url": "https://api.orbisportbook.com/api/v1/integration/sessions",
      "caller": "authenticated casino backend",
      "headers": [
        "X-Tenant-ID",
        "X-API-Key",
        "Content-Type: application/json"
      ],
      "browserDelivery": [
        "launchToken",
        "launchExpiresAt"
      ],
      "launchTokenTTLSeconds": 120,
      "launchTokenSingleUse": true
    },
    "embedSDK": "https://api.orbisportbook.com/embed/v1.js",
    "wallet": {
      "host": "operator-owned public HTTPS wallet base URL",
      "methods": [
        "POST /balance",
        "POST /debit",
        "POST /credit",
        "POST /rollback"
      ],
      "authentication": "HMAC-SHA256 of X-Timestamp + dot + original request body bytes",
      "signatureHeaders": [
        "X-Timestamp",
        "X-Signature"
      ],
      "timestampToleranceSeconds": 300
    },
    "aggregator": {
      "baseURL": "https://api.orbisportbook.com/api/v1/aggregator",
      "caller": "authorized aggregator backend only",
      "authentication": "Authorization: Bearer <aggregator key>",
      "mutationIdempotencyHeader": "Idempotency-Key",
      "replayWindowSeconds": 86400
    }
  },
  "requiredInputs": [
    "authorized environment",
    "SPORTSBOOK_URL",
    "TENANT_ID",
    "currency",
    "INTEGRATION_API_KEY vault reference",
    "WALLET_SECRET vault reference",
    "WALLET_BASE_URL",
    "approved frontend origins",
    "casino authentication and stable player ID",
    "transactional wallet ledger",
    "authorized test players and fictitious balances"
  ],
  "optionalInputs": [
    "AGGREGATOR_API_KEY vault reference and approved provisioning policy"
  ],
  "guides": [
    {
      "language": "en",
      "guide": "https://api.orbisportbook.com/docs/ai-integration/",
      "markdown": "https://api.orbisportbook.com/docs/ai-integration.md"
    },
    {
      "language": "pt-BR",
      "guide": "https://api.orbisportbook.com/docs/pt-br/ai-integration/",
      "markdown": "https://api.orbisportbook.com/docs/pt-br/ai-integration.md"
    }
  ],
  "contracts": {
    "wallet": "https://api.orbisportbook.com/docs/contracts/seamless-wallet.openapi.json",
    "aggregator": "https://api.orbisportbook.com/docs/contracts/aggregator.openapi.json",
    "offlineSignatureVector": "https://api.orbisportbook.com/docs/contracts/signature-test-vector.json",
    "sessionReference": "https://api.orbisportbook.com/docs/sessions/",
    "embedReference": "https://api.orbisportbook.com/docs/embedding/"
  },
  "readOrder": [
    {
      "name": "sessions",
      "en": "https://api.orbisportbook.com/docs/sessions/",
      "pt-BR": "https://api.orbisportbook.com/docs/pt-br/sessions/"
    },
    {
      "name": "wallet",
      "en": "https://api.orbisportbook.com/docs/wallet/",
      "pt-BR": "https://api.orbisportbook.com/docs/pt-br/wallet/"
    },
    {
      "name": "embedding",
      "en": "https://api.orbisportbook.com/docs/embedding/",
      "pt-BR": "https://api.orbisportbook.com/docs/pt-br/embedding/"
    },
    {
      "name": "postmessage",
      "en": "https://api.orbisportbook.com/docs/postmessage/",
      "pt-BR": "https://api.orbisportbook.com/docs/pt-br/postmessage/"
    },
    {
      "name": "testing",
      "en": "https://api.orbisportbook.com/docs/testing/",
      "pt-BR": "https://api.orbisportbook.com/docs/pt-br/testing/"
    },
    {
      "name": "certification",
      "en": "https://api.orbisportbook.com/docs/certification/",
      "pt-BR": "https://api.orbisportbook.com/docs/pt-br/certification/"
    },
    {
      "name": "security",
      "en": "https://api.orbisportbook.com/docs/security/",
      "pt-BR": "https://api.orbisportbook.com/docs/pt-br/security/"
    },
    {
      "name": "go-live",
      "en": "https://api.orbisportbook.com/docs/go-live/",
      "pt-BR": "https://api.orbisportbook.com/docs/pt-br/go-live/"
    },
    {
      "name": "aggregators",
      "en": "https://api.orbisportbook.com/docs/aggregators/",
      "pt-BR": "https://api.orbisportbook.com/docs/pt-br/aggregators/"
    }
  ],
  "invariants": [
    "derive player identity from authenticated casino session",
    "keep API keys, HMAC secrets and long-lived session tokens server-side",
    "use integer minor units",
    "commit ledger movement and idempotency result atomically",
    "isolate tenant and environment wallets",
    "browser events never authorize ledger changes",
    "test financial flows with fictitious funds before approved go-live"
  ],
  "acceptance": [
    "authentication and player identity",
    "single-use token expiry and tenant binding",
    "iframe origins and responsive sizing",
    "valid and invalid HMAC",
    "concurrent duplicate and conflicting txId",
    "win/loss-zero-credit/void/cashout",
    "rollback before and after debit",
    "underfunded correction",
    "timeout-after-commit and recovery",
    "environment isolation and reconciliation"
  ]
}
