Full Withdrawal
Withdraws all of the Balance in a Player's account at once.
API Information
- URL:
POST /v2/members/cashout - Authentication:Bearer Token
- Encryption:Requests are encrypted using AES-256-GCM; responses are returned as plaintext JSON
request
Request Headers
POST /v2/members/cashout HTTP/1.1
Host: api.example.com
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
x-agentid: integratorNBTest04
x-timestamp: 1769746894501
x-nonce: 56ffd5ecd8a3a4457863a0bd7c298fb2
x-signature: 904e97bee2589b93e9747eed0346c68b23d8ff8b568dabaf4b94a5e89093df67
Request Parameters
Parameters Before Encryption
{
"username": "player001",
"transId": "CASHOUT-20250129-001",
}
Encrypted Request Body
{
"cipherText": "G0ZMDELeJwx+7JcIfIFOLJjkSzANPu6krGM2uw==..."
}
| Field | Type | Required | Description |
|---|---|---|---|
username | string | Yes | Player Account |
transId | string | Yes | Transaction ID |
Response
Success Response
{
"code": 0,
"message": "No error.",
"data": {
"amount": 2323.582,
"balance": 0,
},
"logUUID": "06b1c410-c8cb-462b-8fb8-b437c7dc74f0"
}
Response Field Description
| Field | Type | Description |
|---|---|---|
data.amount | number | Withdrawal Amount |
data.balance | number | Balance After Withdrawal |
Error Response
{
"code": 2,
"message": "The balance is not enough.",
"logUUID": "6589bf8d-fe74-48bd-841a-71bf8f848f86"
}
Common Error Codes
| Code | Description |
|---|---|
| 2 | Insufficient Balance |
| 3 | Transaction already exists |
| 8 | The Player does not exist |
| 11 | Invalid parameter |
| 19 | Invalid account |
| 20 | The Player's wallet is temporarily locked |
| 83 | Authentication Failed |
| 84 | Decryption Failed |
For more error code descriptions, please refer to: Appendix - Error Code Overview
Important Notes
- Balance Check: If the Balance is zero, error code 2 will be returned
- Transaction ID Uniqueness: Each transId must be unique to prevent duplicate withdrawals
- Real-Time Update: After a withdrawal succeeds, the Player's Balance is immediately updated to 0
- Idempotency: Resubmitting with the same transId will return the same result
- Difference from a Regular Withdrawal:
- Full Withdrawal: There is no need to specify an amount; all of the Balance is withdrawn
Related APIs
- Transfer - Partial Withdrawal
- Query Player Balance
- Query Transaction Details