> ## 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.

# Update Credit

> Update player game credit

<Accordion title="Possible Error Codes for this API">
  | Code | Description              |
  | ---- | ------------------------ |
  | 1    | Insufficient credit      |
  | 2    | Invalid parameter        |
  | 10   | Duplicate transaction ID |
  | 36   | Server error             |
  | 9999 | Unknown error            |
</Accordion>


## OpenAPI

````yaml en/transfer-openapi.json PUT /api/v1/dt/credit
openapi: 3.1.0
info:
  title: Transfer Wallet API
  description: Game-API for vendors to obtain game-related data
  version: 1.0.0
servers:
  - url: https://api.example.com
    description: Production server
security: []
paths:
  /api/v1/dt/credit:
    put:
      tags:
        - User API
      summary: Update Credit
      description: Update player game credit
      operationId: updateCredit
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - uuid
                - platform_id
                - username
                - transaction_id
                - credit
                - key
              properties:
                uuid:
                  type: string
                  description: >-
                    Platform-defined unique request ID, length >= 32 and <= 128
                    bytes
                platform_id:
                  type: string
                  description: Platform product ID
                username:
                  type: string
                  description: >-
                    User account in game (max 23 characters, lowercase letters
                    and numbers only)
                transaction_id:
                  type: string
                  description: >-
                    Transaction ID (1-128 characters, ASCII 32-126 printable
                    characters only, ` and ~ not allowed)
                credit:
                  type: string
                  description: >-
                    Credit change amount (positive for deposit, negative for
                    withdrawal)
                key:
                  type: string
                  description: >-
                    md5(username + credit + transaction_id + platform secret
                    key)
      responses:
        '200':
          description: Success (no response body)
          content: {}
        '400':
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: 2
                  msg: >-
                    request hash signature(0FACF22B9E3DB5CDC670A0F7A65BB76A) is
                    error
                  uuid: 9e96610f-5388-42df-b3ed-ba1b3178c63b
components:
  schemas:
    Error:
      type: object
      properties:
        code:
          type: string
          description: Error code
        message:
          type: string
          description: Error message
        data:
          description: Data (usually null)
        status_code:
          type: integer
          description: HTTP status code
        service:
          type: string
          description: Service name

````