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

# Sync Bet Credit Changes

> Player balance changes for order status-related modifications (implemented by vendor)

This API will keep retrying until successful. Implementer must handle properly to avoid duplicate credits

Implementer must handle concurrent API requests for the same account

If already processed, return success and explain in response message that this payout has been processed



## OpenAPI

````yaml en/seamless-openapi.json POST /dt/callback/sync_credit
openapi: 3.1.0
info:
  title: Seamless Wallet API
  description: Seamless Wallet API documentation, including Game-API and Wallet-API
  version: 1.0.0
servers:
  - url: https://api.example.com
    description: API Server
security: []
tags:
  - name: Game-API User
    description: Game API - User operations
  - name: Game-API Report
    description: Game API - Report queries
  - name: Game-API Internal
    description: Game API - Internal use (hidden)
  - name: Wallet-API
    description: Wallet API - Implemented by vendor
paths:
  /dt/callback/sync_credit:
    post:
      tags:
        - Wallet-API
      summary: Sync Order Credit Changes
      description: >-
        Player balance changes for order status-related modifications
        (implemented by vendor)


        This API will keep retrying until successful. Implementer must handle
        properly to avoid duplicate credits


        Implementer must handle concurrent API requests for the same account


        If already processed, return success and explain in response message
        that this payout has been processed
      operationId: syncCredit
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - platform_id
                - token
                - uuid
                - account
                - info
              properties:
                platform_id:
                  type: string
                  description: Platform product ID
                token:
                  type: string
                  description: >-
                    Verification code, md5(platform_id + uuid + account +
                    platform_secret)
                uuid:
                  type: string
                  description: Platform-defined unique request serial number
                account:
                  type: string
                  description: Player account
                info:
                  type: array
                  description: Order information
                  items:
                    type: object
                    properties:
                      credit:
                        type: number
                        description: Amount to sync for this operation
                      ip:
                        type: string
                        description: Player's IP address when placing bet
                      target_wallet:
                        type: integer
                        description: Target wallet for this sync amount
                      proposal_id:
                        type: string
                        description: Player's proposal ID for this operation
                      type:
                        type: integer
                        description: >-
                          Change type (8. Payout 10. Round recalculation 11.
                          Round cancellation 12. Add order 13. Cancel order 23.
                          Bet failure refund 26. Modify order 29. Credit
                          reversal)
                      transaction_id:
                        type: string
                        description: >-
                          Unique sync serial number for this operation (1-128
                          characters, ASCII 32-126 printable characters only, `
                          and ~ are prohibited)
                      canceled_id:
                        type: string
                        description: Sync serial number of the transaction to be canceled
                      order_id:
                        type: string
                        description: Order number
                      order_detail:
                        type: object
                        description: Order details
                        properties:
                          amount:
                            type: number
                            description: Bet amount
                          flag:
                            type: integer
                            description: Updated order status from this operation
                          room_account:
                            type: string
                            description: Hall account for this operation
                          room_name:
                            type: string
                            description: Hall name for this operation
                          play_type:
                            type: integer
                            description: Play type
                          game_type:
                            type: string
                            description: Game type
                          win:
                            type: number
                            description: >-
                              Net win/loss amount (excluding principal; positive
                              = win, negative = loss)
                          gmcode:
                            type: string
                            description: Round code
                          table_id:
                            type: string
                            description: Table ID
                          round_detail:
                            type: string
                            description: Round result
                          valid_amount:
                            type: number
                            description: Valid bet amount
                          in_proposal:
                            type: integer
                            description: >-
                              Whether player is currently in traditional
                              proposal
                          create_time:
                            type: integer
                            description: Order creation time (UNIX timestamp, seconds)
                          reckon_time:
                            type: integer
                            description: Round reckon time (UNIX timestamp, seconds)
                          update_time:
                            type: integer
                            description: >-
                              Time when this operation modified order status
                              (UNIX timestamp, seconds)
                      rolling_unit:
                        type: number
                        description: Rolling unit
                      ratio:
                        type: number
                        description: Ratio
            example:
              platform_id: H88
              token: E47A56947DF6DA25B6F95C3BFE5748E7
              uuid: lobby1-82818443591811
              account: bentest
              info:
                - transaction_id: 005-200926080808-0000005RB
                  order_id: A003220118145511020000005
                  type: 23
                  canceled_id: 005-200926080808-0000005
                  credit: 2000
                  target_wallet: 0
                  proposal_id: '954531'
                  ip: 127.0.0.1
                  order_detail:
                    room_account: aad144
                    room_name: TRP01
                    table_id: A003
                    gmcode: A003220118
                    in_proposal: 1
                    game_type: BAC
                    play_type: 1
                    amount: 2000
                    valid_amount: 0
                    win: 0
                    flag: 1
                    round_detail: 8 3 23 ; 45 26 17 | 4 | 1 | 8 | 0
                    create_time: 1668580007
                    reckon_time: 1668580007
                    last_update_time: 1668580007
                  rolling_unit: 1000
                  ratio: 1
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WalletApiSyncCreditResponse'
              example:
                code: 0
                message: success
                uuid: lobby1-82818443591811
                timestamp: 1668580007001
                data:
                  account: c001
                  credit: 115
                  reserved: 100
                  balance: 215
                  platform_id: H88
                  success_id:
                    - 005-200926080808-0000005
                    - 005-200926080808-0000006
                  fail_id:
                    - 005-200926080808-0000007
components:
  schemas:
    WalletApiSyncCreditResponse:
      description: sync-credit response
      allOf:
        - $ref: '#/components/schemas/WalletApiResponseBase'
        - type: object
          properties:
            data:
              type: object
              properties:
                success_id:
                  type: array
                  items:
                    type: string
                  description: List of successful transaction serial numbers
                fail_id:
                  type: array
                  items:
                    type: string
                  description: List of failed transaction serial numbers
    WalletApiResponseBase:
      type: object
      description: Base structure for Wallet API response
      properties:
        code:
          type: integer
          description: Error code
        message:
          type: string
          description: Error message
        uuid:
          type: string
          description: Custom unique request serial number
        timestamp:
          type: integer
          description: UNIX time, milliseconds
        data:
          type: object
          properties:
            account:
              type: string
              description: Player account
            credit:
              type: number
              description: Regular wallet credit
            reserved:
              type: number
              description: Reserved wallet credit
            balance:
              type: number
              description: Player total balance
            platform_id:
              type: string
              description: Platform product ID

````