{
  "openapi": "3.0.3",
  "info": {
    "title": "Offshore Bro single-client Games API",
    "version": "1.0.0",
    "description": "Offshore Bro owns merchant authorization, player identity mapping and external wallet accounting. Games API has no merchant registration or key issuance. All balances in INR; money is decimal text."
  },
  "servers": [
    {
      "url": "https://games.example.com"
    }
  ],
  "security": [
    {
      "serviceBearer": []
    }
  ],
  "paths": {
    "/v1/providers": {
      "get": {
        "operationId": "listProviders",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "records": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Provider"
                      }
                    }
                  },
                  "required": [
                    "records"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Request failed. A transport/server error is not proof of a failed money movement; recover by request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Request failed. A transport/server error is not proof of a failed money movement; recover by request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Request failed. A transport/server error is not proof of a failed money movement; recover by request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Request failed. A transport/server error is not proof of a failed money movement; recover by request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Request failed. A transport/server error is not proof of a failed money movement; recover by request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Request failed. A transport/server error is not proof of a failed money movement; recover by request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Request failed. A transport/server error is not proof of a failed money movement; recover by request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Request failed. A transport/server error is not proof of a failed money movement; recover by request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/games": {
      "get": {
        "operationId": "listGames",
        "parameters": [
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "records": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Game"
                      }
                    },
                    "next_offset": {
                      "type": "integer",
                      "nullable": true
                    }
                  },
                  "required": [
                    "records",
                    "next_offset"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Request failed. A transport/server error is not proof of a failed money movement; recover by request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Request failed. A transport/server error is not proof of a failed money movement; recover by request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Request failed. A transport/server error is not proof of a failed money movement; recover by request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Request failed. A transport/server error is not proof of a failed money movement; recover by request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Request failed. A transport/server error is not proof of a failed money movement; recover by request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Request failed. A transport/server error is not proof of a failed money movement; recover by request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Request failed. A transport/server error is not proof of a failed money movement; recover by request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Request failed. A transport/server error is not proof of a failed money movement; recover by request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/launches": {
      "post": {
        "operationId": "launchGame",
        "description": "request_id is globally unique across launches and cashouts. Identical parsed commands replay the durable result; changed commands conflict. Transfer top-up is applied once before issuing a single-use URL; pending funding_status=succeeded means it must not be credited again. In-house tickets expire after 60 seconds, sessions after 2 hours. New zero-top-up request creates a fresh ticket. Huidu transfer is available only for explicitly enabled account/game/player policies. Funding and launch status are independent; pending monetary outcomes require receipt investigation and must never be refunded or resent. Seamless credit_amount is an observation, never a provider deposit.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/TransferLaunch"
                  },
                  {
                    "$ref": "#/components/schemas/SeamlessLaunch"
                  }
                ],
                "discriminator": {
                  "propertyName": "wallet_mode"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "202": {
            "description": "Durable operation pending. Keep funds reserved and poll; never issue a replacement deposit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Request failed. A transport/server error is not proof of a failed money movement; recover by request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Request failed. A transport/server error is not proof of a failed money movement; recover by request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Request failed. A transport/server error is not proof of a failed money movement; recover by request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Request failed. A transport/server error is not proof of a failed money movement; recover by request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Request failed. A transport/server error is not proof of a failed money movement; recover by request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Request failed. A transport/server error is not proof of a failed money movement; recover by request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Request failed. A transport/server error is not proof of a failed money movement; recover by request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Request failed. A transport/server error is not proof of a failed money movement; recover by request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/cashouts": {
      "post": {
        "operationId": "cashout",
        "description": "In-house cashout fences local sessions and waits for local wagers. Huidu cashout withdraws currently observed whole-paise funds once; final_settlement=false because open sessions and late settlements may remain. Pending transfers require authenticated receipt investigation. Exact positive amount or all; a successful receipt authorizes one external credit. Browser closure never cashes out.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Cashout"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "202": {
            "description": "Durable operation pending. Keep funds reserved and poll; never issue a replacement deposit.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Request failed. A transport/server error is not proof of a failed money movement; recover by request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Request failed. A transport/server error is not proof of a failed money movement; recover by request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Request failed. A transport/server error is not proof of a failed money movement; recover by request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Request failed. A transport/server error is not proof of a failed money movement; recover by request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Request failed. A transport/server error is not proof of a failed money movement; recover by request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Request failed. A transport/server error is not proof of a failed money movement; recover by request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Request failed. A transport/server error is not proof of a failed money movement; recover by request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Request failed. A transport/server error is not proof of a failed money movement; recover by request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/operations/{request_id}": {
      "get": {
        "operationId": "getOperation",
        "parameters": [
          {
            "name": "request_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,80}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Operation"
                }
              }
            }
          },
          "400": {
            "description": "Request failed. A transport/server error is not proof of a failed money movement; recover by request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Request failed. A transport/server error is not proof of a failed money movement; recover by request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Request failed. A transport/server error is not proof of a failed money movement; recover by request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Request failed. A transport/server error is not proof of a failed money movement; recover by request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Request failed. A transport/server error is not proof of a failed money movement; recover by request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Request failed. A transport/server error is not proof of a failed money movement; recover by request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Request failed. A transport/server error is not proof of a failed money movement; recover by request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Request failed. A transport/server error is not proof of a failed money movement; recover by request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/players/{player_id}/balance": {
      "get": {
        "operationId": "getBalance",
        "parameters": [
          {
            "name": "player_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,80}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Balance"
                }
              }
            }
          },
          "400": {
            "description": "Request failed. A transport/server error is not proof of a failed money movement; recover by request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Request failed. A transport/server error is not proof of a failed money movement; recover by request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Request failed. A transport/server error is not proof of a failed money movement; recover by request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Request failed. A transport/server error is not proof of a failed money movement; recover by request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Request failed. A transport/server error is not proof of a failed money movement; recover by request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Request failed. A transport/server error is not proof of a failed money movement; recover by request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Request failed. A transport/server error is not proof of a failed money movement; recover by request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Request failed. A transport/server error is not proof of a failed money movement; recover by request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/transactions": {
      "get": {
        "operationId": "listTransactions",
        "parameters": [
          {
            "name": "after",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]{1,19}$",
              "default": "0"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500,
              "default": 100
            }
          },
          {
            "name": "player_id",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{1,80}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "records": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Transaction"
                      }
                    },
                    "next_cursor": {
                      "type": "string"
                    },
                    "has_more": {
                      "type": "boolean"
                    },
                    "upstream_coverage": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Coverage"
                      }
                    }
                  },
                  "required": [
                    "records",
                    "next_cursor",
                    "has_more",
                    "upstream_coverage"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Request failed. A transport/server error is not proof of a failed money movement; recover by request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Request failed. A transport/server error is not proof of a failed money movement; recover by request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Request failed. A transport/server error is not proof of a failed money movement; recover by request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Request failed. A transport/server error is not proof of a failed money movement; recover by request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Request failed. A transport/server error is not proof of a failed money movement; recover by request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Request failed. A transport/server error is not proof of a failed money movement; recover by request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Request failed. A transport/server error is not proof of a failed money movement; recover by request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Request failed. A transport/server error is not proof of a failed money movement; recover by request_id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "serviceBearer": {
        "type": "http",
        "scheme": "bearer",
        "description": "Deployment-configured secret; server-to-server only. Never embed in a browser."
      }
    },
    "schemas": {
      "TransferLaunch": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{1,80}$"
          },
          "player_id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{1,80}$"
          },
          "game_id": {
            "type": "string",
            "description": "Opaque catalogue-issued ID. Never construct upstream identifiers."
          },
          "wallet_mode": {
            "type": "string",
            "enum": [
              "transfer"
            ]
          },
          "home_url": {
            "type": "string",
            "format": "uri",
            "description": "HTTPS return URL; same origin as embedding_origin. Query strings allowed; credentials and fragments forbidden."
          },
          "embedding_origin": {
            "type": "string",
            "format": "uri",
            "description": "HTTPS origin only (no path/query). Offshore Bro authorizes this merchant origin."
          },
          "language": {
            "type": "string",
            "default": "en"
          },
          "platform": {
            "type": "integer",
            "enum": [
              1,
              2
            ],
            "default": 1
          },
          "theme": {
            "type": "string",
            "enum": [
              "bdg",
              "daman",
              "dmfirst",
              "goagames",
              "jaiclub",
              "okwin",
              "rajaluck",
              "raxiwin",
              "shreewin",
              "tiranga",
              "veergame"
            ],
            "default": "dmfirst"
          },
          "amount": {
            "type": "string",
            "pattern": "^[0-9]{1,14}(\\.[0-9]{1,2})?$",
            "description": "INR decimal text, at most two decimals. Huidu applies its own account/product limits; no default local deposit or cumulative policy cap. Exact integer-paise representation accepts up to 90071992547409.91; this is a technical boundary, not a Huidu guarantee. In-house top-ups and exact cashouts retain their existing 10000000.00 per-operation limit."
          }
        },
        "required": [
          "request_id",
          "player_id",
          "game_id",
          "wallet_mode",
          "home_url",
          "embedding_origin",
          "amount"
        ],
        "additionalProperties": false
      },
      "SeamlessLaunch": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{1,80}$"
          },
          "player_id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{1,80}$"
          },
          "game_id": {
            "type": "string",
            "description": "Opaque catalogue-issued ID. Never construct upstream identifiers."
          },
          "wallet_mode": {
            "type": "string",
            "enum": [
              "seamless"
            ]
          },
          "home_url": {
            "type": "string",
            "format": "uri",
            "description": "HTTPS return URL; same origin as embedding_origin. Query strings allowed; credentials and fragments forbidden."
          },
          "embedding_origin": {
            "type": "string",
            "format": "uri",
            "description": "HTTPS origin only (no path/query). Offshore Bro authorizes this merchant origin."
          },
          "language": {
            "type": "string",
            "default": "en"
          },
          "platform": {
            "type": "integer",
            "enum": [
              1,
              2
            ],
            "default": 1
          },
          "theme": {
            "type": "string",
            "enum": [
              "bdg",
              "daman",
              "dmfirst",
              "goagames",
              "jaiclub",
              "okwin",
              "rajaluck",
              "raxiwin",
              "shreewin",
              "tiranga",
              "veergame"
            ],
            "default": "dmfirst"
          },
          "credit_amount": {
            "type": "string",
            "pattern": "^[0-9]{1,20}(\\.[0-9]{1,6})?$"
          }
        },
        "required": [
          "request_id",
          "player_id",
          "game_id",
          "wallet_mode",
          "home_url",
          "embedding_origin",
          "credit_amount"
        ],
        "additionalProperties": false
      },
      "Cashout": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{1,80}$"
          },
          "player_id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{1,80}$"
          },
          "amount": {
            "oneOf": [
              {
                "type": "string",
                "pattern": "^[0-9]{1,14}(\\.[0-9]{1,2})?$",
                "description": "INR decimal text, at most two decimals. Huidu applies its own account/product limits; no default local deposit or cumulative policy cap. Exact integer-paise representation accepts up to 90071992547409.91; this is a technical boundary, not a Huidu guarantee. In-house top-ups and exact cashouts retain their existing 10000000.00 per-operation limit."
              },
              {
                "type": "string",
                "enum": [
                  "all"
                ]
              }
            ]
          },
          "system": {
            "type": "string",
            "enum": [
              "inhouse",
              "regular",
              "cricket"
            ],
            "description": "Wallet to withdraw. Defaults to the most recently funded/selected system; specify explicitly when recovering another supplier wallet."
          }
        },
        "required": [
          "request_id",
          "player_id",
          "amount"
        ],
        "additionalProperties": false
      },
      "Operation": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{1,80}$"
          },
          "state": {
            "type": "string",
            "enum": [
              "pending",
              "succeeded",
              "rejected"
            ]
          },
          "funding_status": {
            "type": "string",
            "enum": [
              "pending",
              "succeeded",
              "failed",
              "not_required",
              "not_applicable"
            ]
          },
          "launch_status": {
            "type": "string",
            "enum": [
              "not_attempted",
              "succeeded",
              "failed"
            ]
          },
          "transfer_status": {
            "type": "string",
            "enum": [
              "pending",
              "succeeded",
              "failed",
              "not_required"
            ]
          },
          "final_settlement": {
            "type": "boolean"
          },
          "manual_review_required": {
            "type": "boolean"
          },
          "system": {
            "type": "string"
          },
          "game_launch_url": {
            "type": "string",
            "format": "uri"
          },
          "launch_expires_at": {
            "type": "integer",
            "format": "int64",
            "description": "UTC epoch milliseconds"
          },
          "receipt_id": {
            "type": "string"
          },
          "amount": {
            "type": "string",
            "pattern": "^[0-9]{1,20}(\\.[0-9]{1,6})?$"
          },
          "balance": {
            "type": "string",
            "pattern": "^[0-9]{1,20}(\\.[0-9]{1,6})?$"
          },
          "currency": {
            "type": "string",
            "enum": [
              "INR"
            ]
          },
          "reason": {
            "type": "string"
          },
          "error": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "request_id",
          "state"
        ],
        "additionalProperties": false
      },
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string"
          }
        },
        "required": [
          "error"
        ],
        "additionalProperties": false
      },
      "Provider": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "system": {
            "type": "string",
            "enum": [
              "inhouse",
              "regular",
              "cricket"
            ]
          },
          "available": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "name",
          "system"
        ],
        "additionalProperties": false
      },
      "Game": {
        "type": "object",
        "properties": {
          "game_id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "provider": {
            "type": "string"
          },
          "system": {
            "type": "string",
            "enum": [
              "inhouse",
              "regular",
              "cricket"
            ]
          },
          "modes": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "transfer",
                "seamless"
              ]
            }
          },
          "languages": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "currency": {
            "enum": [
              "INR"
            ],
            "type": "string"
          },
          "themes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "available": {
            "type": "boolean"
          },
          "reasons": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "transfer_unavailable_reason": {
            "type": "string"
          },
          "mode_reasons": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        },
        "required": [
          "game_id",
          "name",
          "provider",
          "system",
          "modes",
          "languages",
          "currency",
          "available",
          "reasons"
        ],
        "additionalProperties": false
      },
      "Balance": {
        "type": "object",
        "properties": {
          "player_id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{1,80}$"
          },
          "currency": {
            "enum": [
              "INR"
            ],
            "type": "string"
          },
          "balance": {
            "type": "string",
            "pattern": "^[0-9]{1,20}(\\.[0-9]{1,6})?$",
            "nullable": true
          },
          "active_system": {
            "type": "string",
            "nullable": true
          },
          "complete": {
            "type": "boolean"
          },
          "supplier_balance_is_observation": {
            "type": "boolean"
          },
          "final_settlement": {
            "type": "boolean"
          },
          "pending_operation": {
            "type": "string",
            "nullable": true
          },
          "observed_at": {
            "type": "integer",
            "format": "int64",
            "description": "UTC epoch milliseconds"
          },
          "supplier_refresh": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "system": {
                  "type": "string",
                  "enum": [
                    "regular",
                    "cricket"
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "refreshed",
                    "pending",
                    "unavailable",
                    "superseded"
                  ]
                },
                "error": {
                  "type": "string"
                }
              },
              "required": [
                "system",
                "status"
              ],
              "additionalProperties": false
            }
          },
          "allocations": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "system": {
                  "type": "string"
                },
                "amount": {
                  "type": "string",
                  "pattern": "^[0-9]{1,20}(\\.[0-9]{1,6})?$"
                },
                "in_transit": {
                  "type": "string",
                  "pattern": "^[0-9]{1,20}(\\.[0-9]{1,6})?$"
                },
                "observed_at": {
                  "type": "string",
                  "nullable": true,
                  "description": "UTC epoch milliseconds, encoded as a string"
                }
              },
              "required": [
                "system",
                "amount",
                "in_transit",
                "observed_at"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "player_id",
          "currency",
          "balance",
          "active_system",
          "complete",
          "pending_operation",
          "observed_at",
          "allocations"
        ],
        "additionalProperties": false
      },
      "Transaction": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "cursor": {
            "type": "string",
            "pattern": "^[0-9]+$"
          },
          "player_id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{1,80}$"
          },
          "type": {
            "type": "string"
          },
          "reference": {
            "type": "string"
          },
          "amount": {
            "type": "string",
            "pattern": "^-?[0-9]{1,20}(\\.[0-9]{1,6})?$"
          },
          "balance": {
            "type": "string",
            "pattern": "^[0-9]{1,20}(\\.[0-9]{1,6})?$",
            "nullable": true
          },
          "occurred_at": {
            "type": "integer",
            "format": "int64",
            "description": "UTC epoch milliseconds"
          },
          "game_id": {
            "type": "string"
          },
          "game_round": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "bet_amount": {
            "type": "string",
            "pattern": "^-?[0-9]{1,20}(\\.[0-9]{1,6})?$"
          },
          "win_amount": {
            "type": "string",
            "pattern": "^-?[0-9]{1,20}(\\.[0-9]{1,6})?$"
          },
          "wallet_balance": {
            "type": "string",
            "pattern": "^[0-9]{1,20}(\\.[0-9]{1,6})?$"
          },
          "system": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "cursor",
          "player_id",
          "type",
          "reference",
          "amount",
          "balance",
          "occurred_at"
        ],
        "additionalProperties": false
      },
      "Coverage": {
        "type": "object",
        "properties": {
          "account": {
            "type": "string"
          },
          "starts_at": {
            "type": "string"
          },
          "ends_at": {
            "type": "string"
          },
          "state": {
            "type": "string",
            "enum": [
              "pending",
              "complete",
              "exception",
              "error"
            ]
          },
          "fetched_at": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "account",
          "starts_at",
          "ends_at",
          "state",
          "fetched_at"
        ],
        "additionalProperties": false
      }
    }
  }
}
