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

# Player Transaction Deduction

> Credit changes after player transaction operations in game (implemented by vendor)

A single request will only have one transaction type

Because one API call may bet on multiple play types, if a single bet fails, all are considered failed. Partial success/failure logic is not supported



## OpenAPI

````yaml en/seamless-openapi.json POST /dt/callback/pay_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/pay_credit:
    post:
      tags:
        - Wallet-API
      summary: Player Transaction Deduction
      description: >-
        Credit changes after player transaction operations in game (implemented
        by vendor)


        A single request will only have one transaction type


        Because one API call may bet on multiple play types, if a single bet
        fails, all are considered failed. Partial success/failure logic is not
        supported
      operationId: payCredit
      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 + type +
                    platform_secret)
                uuid:
                  type: string
                  description: Platform-defined unique request serial number
                account:
                  type: string
                  description: Player account
                info:
                  type: array
                  description: Transaction data
                  items:
                    type: object
                    properties:
                      type:
                        type: integer
                        description: >-
                          Transaction type (7. Bet 9. Tip 27. Gift 28. Operator
                          deducts player credit)
                      transaction_id:
                        type: string
                        description: >-
                          Unique transaction serial number (1-128 characters,
                          ASCII 32-126 printable characters only, ` and ~ are
                          prohibited)
                      order_id:
                        type: string
                        description: Order number
                      proposal_id:
                        type: string
                        description: Player's proposal ID at the time of transaction
                      target_wallet:
                        type: integer
                        description: >-
                          Target wallet for credit change (0. Regular wallet 1.
                          Traditional wallet)
                      credit:
                        type: number
                        description: Amount to change
                      ip:
                        type: string
                        description: Player's IP address when placing bet
                      order_detail:
                        type: object
                        description: Order details
                        properties:
                          play_type:
                            type: integer
                            description: Play type
                          game_type:
                            type: string
                            description: Game type
                          gmcode:
                            type: string
                            description: Round code
                          table_id:
                            type: string
                            description: Table ID
                          room_account:
                            type: string
                            description: Hall account for this operation
                          room_name:
                            type: string
                            description: Hall name for this operation
                          in_proposal:
                            type: integer
                            description: >-
                              Whether player is currently in traditional
                              proposal
                          amount:
                            type: number
                            description: Bet amount
                          create_time:
                            type: integer
                            description: Order creation time
                          update_time:
                            type: integer
                            description: Time when this operation modified order status
                      rolling_unit:
                        type: number
                        description: Rolling unit
                      ratio:
                        type: number
                        description: Ratio
            example:
              platform_id: H88
              token: B6AC1083E0F2E47A3D81E1B6B3EA576B
              uuid: lobby1-82818443591811
              account: c001
              info:
                - type: 7
                  credit: -2000
                  transaction_id: 005-200926080808-0000005
                  order_id: A003220118145511020000006
                  target_wallet: 0
                  proposal_id: '954531'
                  ip: 127.0.0.1
                  order_detail:
                    room_account: 1444aad
                    room_name: TRP01
                    table_id: A003
                    gmcode: A003220118
                    in_proposal: 1
                    game_type: BAC
                    play_type: 1
                    amount: 2000
                    create_time: 1668580007
                    last_update_time: 1668580007
                  rolling_unit: 1000
                  ratio: 1
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WalletApiPayCreditResponse'
              example:
                code: 0
                message: success
                uuid: lobby1-82818443591811
                timestamp: 1668580007001
                data:
                  account: c001
                  credit: 115
                  reserved: 100
                  balance: 215
                  platform_id: H88
components:
  schemas:
    WalletApiPayCreditResponse:
      $ref: '#/components/schemas/WalletApiResponseBase'
      description: pay-credit response
    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

````