Withdrawal
URl: https://{{gmag_api_url
}}/payment/player/withdrawal?hash={{xxx}}.
Method: POST.
Purpose: used to withdraw credit from a player’s balance.
Request
Name | Type | Required | Description |
---|---|---|---|
playerId | String(24) | Yes | The unique ID identified a Player on the brand’s side. |
currency | String(4) | Yes | The player’s Currency Code. |
amount | numeric(16, 4) | Yes | The amount of withdrawal. (If withdrawAll is true, amount can be null) |
extTransId | String(32) | Yes | The transaction Id defined by the brand. |
playerBrandId | Int | No | The brand Id where the player is created. It’s needed when the Superior brand withdraw credit from the balance of sub brand’s player. |
providerCode | String(32) | No | When the parameter is not empty, withdraw money from the provider. Vendors currently supporting this parameter are: mega888, ig, vrgaming. |
withdrawAll | Boolean | No | Default false. If true, withdraw all player’s balance |
Response
Name | Type | Required | Description |
---|---|---|---|
playerId | String(24) | Yes | The unique ID identified a Player on the brand’s side. |
currency | String(4) | Yes | The player’s Currency Code. |
transId | String(64) | Yes | The transaction Id defined by GM-Ag. |
extTransId | String(32) | Yes | The transaction Id defined by the brand. |
status | String(32) | Yes | The withdrawal status. (approved, declined, pending) |
amount | numeric(16, 4) | Yes | The amount of withdrawal. Please discard the redundant zero at the end, for example 1.00 as 1 and 1.30 as 1.3. |
balance | numeric(16, 4) | Yes | The player’s balance. |
bonusBalance | numeric(16, 4) | No | The player’s bonus balance. |
brandBalance | numeric(16, 4) | Yes | The brand’s balance after the withdrawal. |
transTime | DateTime | Yes | The created time of the withdrawal. |
Request example
{
"requestId": "requestId1234",
"brandId": 1001,
"playerId": "player1123",
"currency": "CNY",
"extTransId": "ehcxehxdafkjxndheadfafgesa",
"amount": 100,
“providerCode”:“vrg”
}
Response example
//success
{
"requestId": "requestId1234",
"playerId": "player1123",
"extTransId": "ehcxehxdafkjxndheadfafgesa",
"transId": "xsdfagesafdafe",
"currency": "CNY",
"amount": 100,
"balance": 100,
"bonusBalance": 0,
"status": "approved",
"transTime": "2021-04-10 10:12:00.123Z",
"error": "0",
"message": "success",
}
//error
{
"requestId": "requestId1234",
"error": "T_05",
"extTransId": "ehcxehxdafkjxndheadfafgesa",
"status": "declined",
"message": "Player Insufficient Funds",
}