> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cog888.net/llms.txt
> Use this file to discover all available pages before exploring further.

# 玩家餘額查詢

> 用於玩家餘額刷新（由 vendor 實作）



## OpenAPI

````yaml /seamless-openapi.json POST /dt/callback/balance
openapi: 3.1.0
info:
  title: 單一錢包 API
  description: 單一錢包（Seamless Wallet）API 文檔，包含 Game-API 和 Wallet-API
  version: 1.0.0
servers:
  - url: https://api.example.com
    description: API Server
security: []
tags:
  - name: Game-API User
    description: 遊戲 API - 用戶相關操作
  - name: Game-API Report
    description: 遊戲 API - 報表查詢
  - name: Game-API Internal
    description: 遊戲 API - 內部專用（隱藏）
  - name: Wallet-API
    description: 錢包 API - 由 vendor 實作
paths:
  /dt/callback/balance:
    post:
      tags:
        - Wallet-API
      summary: 玩家餘額查詢
      description: 用於玩家餘額刷新（由 vendor 實作）
      operationId: getBalance
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - platform_id
                - token
                - uuid
                - account
              properties:
                platform_id:
                  type: string
                  description: 平台方產品ID
                token:
                  type: string
                  description: 驗證碼，md5(platform_id + uuid + account + 平台密鑰)
                uuid:
                  type: string
                  description: 各平台自定義的唯一性請求序號，長度 >= 32 且 <= 128 字節
                account:
                  type: string
                  description: 玩家帳號
            example:
              platform_id: H88
              token: E444957EDE11A261BF7F6E215ED1F1D6
              uuid: lobby1-82818443591811
              account: c001
      responses:
        '200':
          description: 成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WalletApiResponse'
              example:
                code: 0
                message: success
                uuid: d12e08fd-26de-4b2e-87a6-5dec92786800
                timestamp: 1668580007001
                data:
                  account: c001
                  credit: 115
                  reserved: 100
                  balance: 215
                  platform_id: H88
components:
  schemas:
    WalletApiResponse:
      $ref: '#/components/schemas/WalletApiResponseBase'
      description: getBalance 回應
    WalletApiResponseBase:
      type: object
      description: 錢包 API 回應的基礎結構
      properties:
        code:
          type: integer
          description: 錯誤代碼
        message:
          type: string
          description: 錯誤訊息
        uuid:
          type: string
          description: 自定義的唯一性請求序號
        timestamp:
          type: integer
          description: UNIX time，毫秒
        data:
          type: object
          properties:
            account:
              type: string
              description: 玩家帳號
            credit:
              type: number
              description: 一般錢包額度
            reserved:
              type: number
              description: 專用錢包額度
            balance:
              type: number
              description: 玩家總額度
            platform_id:
              type: string
              description: 平台方產品ID

````