文档
测试

2.5.3 Money

POST
API Wallet

接口描述

Operations to add and deduct members' money

Header

参数名
类型
描述
必填
Content-Type
string
application/json
必填

Body

参数名
类型
描述
必填
Action
string
Fixed value:Money
必填
Timestamp
number
Timestamp
必填
Sign
string
MD5 signature field
必填
UserName
string
Username to request money operation
必填
Description
string
Operating note
必填
ID
string
Serial number of money
必填
Money
number
Amount. A positive amount represents money added at request,and a negative one represents money deducted at request.
必填
Type
string
Operation type (Seeing "Type Description" in this chapter for more details.)
必填

Response

参数名
类型
描述
必填
success
number
1 for operation successful, 0 for operation failed
必填
msg
string
Message of operation failed
必填

Description / Example

Our request ``curl http://APIWallet -X POST-H "Content-Type:application/json" -d "{"Action":"Money","Description":"remark","ID":"848109","Money":"1","Sign":"FA26BE74458F29573DD01012D0EFBB3A","Timestamp":"1585764748360","Type":"TransferIn","UserName":"ceshi01_7f"}"`` Returned content of success ``` { "success":1, "msg":"" } ``` Returned content of failure ``` { "success":0, "msg":"Description of the reason for the failure, such as insufficient balance" } ``` ### Money Type Description | Type | Description | |-|-| | Reward | Bonus (Added Type) | | Return | Return of Principal (Added Type) | | Bet | Betting (Deducted Type ) | | ReSettlement | Resettlement (Probably Added or Deducted Type) | **Important Explanation** While conducting money operations for members, you must check the money is the "unique" money to prevent from repeatedly adding or deducting money. That is: UserName + ID + Type, a mix of these three items is unique. ### Flowchart ![image.png](https://cos.easydoc.net/44514184/files/kbj6171g.png)