# 4.7 Withdrawal
Method : [Post]
Url : https://api-dev.prettygaming.asia/apiRoute/api/withdrawal
Headers : content-type application/json
# Request Body
| Parameter | Type | Description |
|---|---|---|
| agentUsername | String | Agent account , Account length is restricted to 36 chars at most |
| agentApiKey | String | System generate key ID after crate Agent |
| playerUsername | String | Player username from partner system. |
| balance | Number | |
| transId | String | Optional: should be Unique key from your system. reference to 4.12 depositWithdrawHistoryByTransId |
# Example Request Body
{
"agentUsername": "startapiTransferwallet",
"agentApiKey": "ae6330a9-6c2f-1bd3-3122-47ddad703de9",
"playerUsername": "startTransferwalletmember",
"balance": 100,
"transId": "5f0c27dbea3f3261f2cd3886"
}
1
2
3
4
5
6
7
2
3
4
5
6
7
# Response Body
| Parameter | Type | Required | Description |
|---|---|---|---|
| code | Number | Yes | Result Code Reference. |
| msg | String | Yes | Information message. |
| data | Object | Yes | Object response. |
| ref | String | Yes | |
| playerApiId | String | Yes | |
| playerUsername | String | Yes | Player username from partner system. |
| playerApiUsername | String | Yes | Player username from Pretty Gaming system. |
| addBalance | Number | Yes | |
| afterMemberBalance | Number | Yes | |
| afterAgentBalance | Number | Yes |
# Service Response Code
| Parameter | Description |
|---|---|
| 0 | success |
| 997 | invalid input format 'balance' field. |
| 71001 | missing filed 'agentUsername'. |
| 71002 | missing filed 'agentApiKey'. |
| 71003 | Invalid agentUsername or apiKey. |
| 71004 | missing filed 'playerUsername'. |
| 71017 | Can request up to 30 times per minute. |
| 911001 | Insufficient balance. |
# Example Service Respond Code
{
"code": 0,
"msg": "SUCCESS",
"data": {
"ref": "5ee1b3d6240525370dbf8ad9",
"playerApiId": "5eae90e32f7df02c92fde32d",
"playerUsername": "startTransferwalletmember",
"playerApiUsername": "startTransferwalletmember@startapiTransferwallet",
"addBalance": 100,
"afterMemberBalance": 10011900,
"afterAgentBalance": 0
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
2
3
4
5
6
7
8
9
10
11
12
13