Player Balance
Query a player's wallet balance for a specific currency.
Endpoint
| Property | Value |
|---|---|
| Path | POST /papi/v1/player/balance |
| Auth | Agent Token (Bearer) |
| Content-Type | application/x-www-form-urlencoded |
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
member_id | string | Yes | Player unique identifier (Agent-side ID). Automatically converted to uppercase |
currency | string | Yes | Currency code (e.g. MYR, USD). Must be a platform-supported currency. Automatically converted to uppercase |
Request Example
bash
curl -X POST https://api.example.com/papi/v1/player/balance \
-H "Authorization: Bearer {agent_token}" \
-d "member_id=PLAYER_001¤cy=MYR"Response Fields
| Field | Type | Description |
|---|---|---|
member_id | string | Player identifier (uppercased) |
currency | string | Currency code |
balance | decimal | Balance (4 decimal places) |
Response Example
json
{
"status": true,
"code": 0,
"data": {
"member_id": "PLAYER_001",
"currency": "MYR",
"balance": 0.0000
},
"msg": "success"
}Error Codes
| Code | Message | Description |
|---|---|---|
| 1001 | err.param.invalid | member_id or currency is missing |
| 1002 | err.signature.invalid | Agent Token verification failed |
| 2001 | err.player.not_found | Player not found (must call register first) |
| 3005 | err.fund.currency_not_supported | Currency not supported |