Download OpenAPI specification:Download
Request base url : https://api-agg.mangoplay.com/
Return daily report
| endDate required | string Example: endDate=2023-09-02 00:00:00 End date format YYYY-MM-DD HH:MM:SS |
| filterBy required | string Example: filterBy=dateBetweenAndPlayerList Type of filter dateBetweenAndPlayerList dateBetweenAndPlayerListByProvider dateBetweenAndProviderListByAgent dateBetweenAndReportDateList |
| playerUsername | string Example: playerUsername=user_test_mg005 Player username |
| providerNames | Array of strings Provider names Baccarat TigerDragon Balangkai Sicbo Hilo RollADice Roulette Fantan |
| startDate required | string Example: startDate=2023-09-01 00:00:00 Start date format YYYY-MM-DD HH:MM:SS |
{- "turnOver": 1900,
- "validBet": 1900,
- "winLose": 1400,
- "winLoseWithOutTurnOver": -500,
- "commission": 0,
- "total": -500,
- "winLoseAgent": 465,
- "commissionAgent": 0,
- "totalAgent": 465,
- "winLoseCompany": 35,
- "commissionCompany": 0,
- "totalCompany": 35,
- "data": {
- "content": [
- {
- "key": "TigerDragon",
- "currency": "THB",
- "total": -500,
- "totalAgent": 465,
- "totalCompany": 35,
- "validBet": 1900,
- "turnOver": 1900,
- "winLose": 1400,
- "winLoseWithOutTurnOver": -500,
- "commission": 0,
- "winLoseAgent": 465,
- "commissionAgent": 0,
- "winLoseCompany": 35,
- "commissionCompany": 0,
- "countActivePlayer": 1,
- "countTicket": 2
}
], - "pageable": {
- "sort": {
- "sorted": false,
- "unsorted": true,
- "empty": true
}, - "pageNumber": 0,
- "pageSize": 100,
- "offset": 0,
- "unpaged": false,
- "paged": true
}, - "totalPages": 1,
- "totalElements": 1,
- "last": true,
- "size": 100,
- "number": 0,
- "sort": {
- "sorted": false,
- "unsorted": true,
- "empty": true
}, - "numberOfElements": 1,
- "first": true,
- "empty": false
}
}Returns player pagination's
| filterBy required | string Example: filterBy=all/username Type of filter |
| username | string Example: username=user_test_mg005 Username |
{- "content": [
- {
- "id": 22,
- "displayName": "Cater",
- "profileImage": "N/A",
- "agentType": "TRANSFER",
- "agentId": 1,
- "isMa": false,
- "isActive": true,
- "currency": "THB",
- "userId": 87,
- "username": "mgt_cater",
- "status": "APPROVED",
- "betLimit": null
}, - {
- "id": 21,
- "displayName": "TEST020",
- "profileImage": "N/A",
- "agentType": "TRANSFER",
- "agentId": 1,
- "isMa": false,
- "isActive": true,
- "currency": "THB",
- "userId": 86,
- "username": "mgt_test020",
- "status": "APPROVED",
- "betLimit": null
}
], - "pageable": {
- "sort": {
- "sorted": true,
- "unsorted": false,
- "empty": false
}, - "pageNumber": 0,
- "pageSize": 25,
- "offset": 0,
- "paged": true,
- "unpaged": false
}, - "totalPages": 1,
- "totalElements": 2,
- "last": true,
- "size": 25,
- "number": 0,
- "sort": {
- "sorted": true,
- "unsorted": false,
- "empty": false
}, - "numberOfElements": 22,
- "first": true,
- "empty": false
}Return player data
| id required | integer <int64> Example: id=125 Player Id |
{- "id": 1,
- "displayName": "Test 001",
- "agentType": "TRANSFER",
- "agentId": 1,
- "isMa": false,
- "isActive": true,
- "currency": "THB",
- "userId": 5,
- "username": "mgt_test1125001",
- "status": "APPROVED",
- "betLimit": null
}Return user bet histories
| endDate required | string Example: endDate=2023-09-02 00:00:00 End date format YYYY-MM-DD HH:MM:SS |
| startDate required | string Example: startDate=2023-09-01 00:00:00 Start date format YYYY-MM-DD HH:MM:SS |
| username required | string Example: username=user_test_mg005 Player username |
{- "turnOver": 1300,
- "validBet": 1300,
- "winLose": 1300,
- "winLoseWithOutTurnOver": 0,
- "betGames": {
- "content": [
- {
- "id": 56,
- "username": "mgt_test001",
- "betTime": 1694596449867,
- "settleTime": 1694596469073,
- "gameType": "CASINO",
- "providerName": "TigerDragon",
- "dealId": "TD-002-20230913091404-1-G6GHXKFUCA1DADVIZD9O_S",
- "betId": "TD-002-20230913091404-TD-002",
- "validBet": 100,
- "turnOver": 100,
- "winLose": 0,
- "winLoseWithOutTurnOver": -100,
- "game": "TigerDragon",
- "roundId": "TD-002-20230913091404",
- "reportDate": "13-09-2023",
- "gameResult": "LOSE",
- "betDetail": "DRAW",
- "ip": "2403:6200:8956:235b:5cd2:ebb:b367:d3bf-TH",
- "type": "SETTLE",
- "remark": null,
- "rateRatio": "1:1",
- "currency": "THB",
- "roomName": null
}, - {
- "id": 58,
- "username": "mgt_test001",
- "betTime": 1694596449863,
- "settleTime": 1694596469073,
- "gameType": "CASINO",
- "providerName": "TigerDragon",
- "dealId": "TD-002-20230913091404-1-99IVUE5WKWELDU41ROH4_S",
- "betId": "TD-002-20230913091404-TD-002",
- "validBet": 450,
- "turnOver": 450,
- "winLose": 900,
- "winLoseWithOutTurnOver": 450,
- "game": "TigerDragon",
- "roundId": "TD-002-20230913091404",
- "reportDate": "13-09-2023",
- "gameResult": "WIN",
- "betDetail": "TIGER",
- "ip": "2403:6200:8956:235b:5cd2:ebb:b367:d3bf-TH",
- "type": "SETTLE",
- "remark": null,
- "rateRatio": "1:1",
- "currency": "THB",
- "roomName": null
}
], - "pageable": {
- "sort": {
- "sorted": true,
- "unsorted": false,
- "empty": false
}, - "pageNumber": 0,
- "pageSize": 100,
- "offset": 0,
- "paged": true,
- "unpaged": false
}, - "totalPages": 1,
- "totalElements": 2,
- "last": true,
- "size": 25,
- "number": 0,
- "sort": {
- "sorted": true,
- "unsorted": false,
- "empty": false
}, - "numberOfElements": 9,
- "first": true,
- "empty": false
}
}Return player deal data
| dealId required | string Example: FUN-GRASP-02-20250717082645-6480-8ECEHSGMYSTFXW6BNWAJ_S Deal id |
| AgentPrefixId | string Example: AgentPrefixId=MGTSTG Agent prefix id |
| Security | string Example: Security=ASW29jfP133KJSSa4 Agent security key |
Return wallet transactions
| filterBy | string Example: filterBy=all/username Type of filter |
| type | string Example: type=BET Type of transaction BET SETTLE CANCEL_SETTLE CANCEL_SETTLE_NO_SETTLE DEPOSIT WITHDRAW |
| username | string Example: username=user_test_mg005 Player username |
{- "content": [
- {
- "id": 27381,
- "createdDate": 1707383660641,
- "lastModifiedDate": 1707383660641,
- "username": "mgt_test005",
- "dealId": "BC-006-20240208091344-5-UTW9MEWLFMGYGEGDARCU_S",
- "type": "SETTLE",
- "balanceBefore": 984866.25,
- "balanceAfter": 984866.25,
- "amount": 0,
- "providerName": "Baccarat"
}, - {
- "id": 27380,
- "createdDate": 1707383660471,
- "lastModifiedDate": 1707383660471,
- "username": "mgt_test005",
- "dealId": "BC-006-20240208091344-5-8QVOF1ESPTIGQVURNIKP_S",
- "type": "SETTLE",
- "balanceBefore": 984866.25,
- "balanceAfter": 984866.25,
- "amount": 0,
- "providerName": "Baccarat"
}
], - "pageable": {
- "sort": {
- "sorted": true,
- "unsorted": false,
- "empty": false
}, - "pageNumber": 0,
- "pageSize": 100,
- "offset": 0,
- "paged": true,
- "unpaged": false
}, - "totalPages": 1,
- "totalElements": 2,
- "last": false,
- "size": 100,
- "number": 0,
- "sort": {
- "sorted": true,
- "unsorted": false,
- "empty": false
}, - "numberOfElements": 100,
- "first": true,
- "empty": false
}Check and close bills that were left open by a timeout. Use these instead of raising a manual ticket when a bet shows as failed or a settle is still pending on your side but you believe the opposite is true.
Returns a bet, its settle status, and the most recent request/response exchanged with your wallet for that deal. Call this first to decide whether a deal actually needs reconciling. Accepts a deal_id with or without the _B / _S suffix. You can only read deals that belong to your own agent.
| AgentPrefixId required | string AgentPrefixId |
| Security required | string Security |
Request DTO
| deal_id required | string Deal id of the bet. Accepted with or without the |
{- "deal_id": "HL-B20260729081834-1785313129946-DH0L94K3_B"
}{- "code": 0,
- "message": "Success [betInfo]",
- "data": {
- "deal_id": "HL-B20260729081834-1785313129946-DH0L94K3_B",
- "bet": {
- "deal_id": "HL-B20260729081834-1785313129946-DH0L94K3_B",
- "bet_id": "HL-B20260729081834-HL-B",
- "game": "HILO",
- "bet_detail": "HOLE_3_5",
- "valid_bet": 100,
- "reward_multiply": "1.95:1",
- "wallet_status": "FAILED",
- "wallet_tx_id": null,
- "balance_before": 0,
- "balance_after": 0,
- "remark": "Wallet timeout",
- "is_settled": false,
- "type": "BET",
- "win_lose": 0,
- "bet_time": 1785313129946,
- "round_no": "HL-B20260729081834"
}, - "settle": null,
- "latest_agg_response": {
- "action": "BET",
- "request": {
- "action": "BET",
- "dealId": "HL-B20260729081834-1785313129946-DH0L94K3_B",
- "validBet": 100,
- "winLose": -100
}, - "response": null,
- "response_time": "5001ms",
- "created_at": "2026-07-29T08:18:39.000Z"
}
}
}Closes a bill that our side marked FAILED because the call to your wallet timed out, even though you actually applied the debit. The bet is flipped to SUCCESS and then settled against the round result.
This call is idempotent: if a settle already exists it only re-calls your wallet and never issues a second payout.
Call it only after the round has closed, because the payout is computed from the round result. Use betInfo first to confirm the deal really is in the state you think it is.
| AgentPrefixId required | string AgentPrefixId |
| Security required | string Security |
Request DTO
| deal_id required | string Deal id of the bet. Accepted with or without the |
{- "deal_id": "HL-B20260729081834-1785313129946-DH0L94K3_B"
}{- "code": 0,
- "message": "Success [reSettle]",
- "data": {
- "success": true,
- "action": "SETTLE",
- "reconciled": true,
- "message": "Reconcile-settle completed for deal_id HL-B20260729081834-1785313129946-DH0L94K3_B (action: SETTLE, reconciled: true)"
}
}Create player
| action required | string action |
| AgentPrefixId required | string AgentPrefixId |
| Security required | string Security |
Request DTO
| username | string |
| password | string |
| displayName | string |
| profileImage | string |
{- "username": "mgt_test01",
- "password": "apb@1se@esq",
- "displayName": "mgt_test01",
- "profileImage": "N/A"
}{- "code": 0,
- "message": "Success [createPlayer]"
}Generate play URL
| action required | string action |
| AgentPrefixId required | string AgentPrefixId |
| Security required | string Security |
Request DTO
| username | string |
| password | string |
| lang | string |
| returnURL | any |
{- "username": "mgt_test01",
- "password": "apb@1se@esq",
- "lang": "en",
}Edit the player password
| action required | string action |
| AgentPrefixId required | string AgentPrefixId |
| Security required | string Security |
Request DTO
| username | string |
| password | string |
{- "username": "mgt_test01",
- "password": "apb@1se@esq"
}{- "code": 0,
- "message": "Success [editPassword]"
}Create player
| action required | string action |
| AgentPrefixId required | string AgentPrefixId |
| Security required | string Security |
Request DTO
| username | string |
| password | string |
| displayName | string |
| profileImage | string |
{- "username": "mgt_test01",
- "password": "apb@1se@esq",
- "displayName": "mgt_test01",
- "profileImage": "N/A"
}{- "code": 0,
- "message": "Success [createPlayer]"
}Generate play URL
| action required | string action |
| AgentPrefixId required | string AgentPrefixId |
| Security required | string Security |
Request DTO
| username | string |
| password | string |
| lang | string |
| returnURL | any |
{- "username": "mgt_test01",
- "password": "apb@1se@esq",
- "lang": "en",
}Edit the player password
| action required | string action |
| AgentPrefixId required | string AgentPrefixId |
| Security required | string Security |
Request DTO
| username | string |
| password | string |
{- "username": "mgt_test01",
- "password": "apb@1se@esq"
}{- "code": 0,
- "message": "Success [editPassword]"
}Force logout player
| action required | string action |
| AgentPrefixId required | string AgentPrefixId |
| Security required | string Security |
Request DTO
| username | string |
| password | string |
{- "username": "mgt_test01",
- "password": "apb@1se@esq"
}{- "code": 0,
- "message": "Success [logOut]"
}Change the player status
| action required | string action |
| AgentPrefixId required | string AgentPrefixId |
| Security required | string Security |
Request DTO
| username | string |
| status | string Enum: "APPROVED" "BANNED" "BLACKLIST" "HOLD" "SUSPECT" |
{- "username": "mgt_test01",
- "status": "APPROVED"
}{- "code": 0,
- "message": "Success [editStatusPlayer]"
}fetch player credit (balance)
| action required | string action |
| AgentPrefixId required | string AgentPrefixId |
| Security required | string Security |
Request DTO
| username | string |
{- "username": "mgt_test01"
}{- "code": 0,
- "balance": 4334637.5,
- "txId": null
}Deposit credit to player (Add Balance)
| action required | string action |
| AgentPrefixId required | string AgentPrefixId |
| Security required | string Security |
Request DTO
| username | string |
| amount | number |
| description | string |
| requestId | string |
{- "username": "mgt_test01",
- "amount": 1000,
- "description": "deposit player credit",
- "requestId": "TXN-04122024-MG-1230-TTXXSAXDWF"
}{- "code": 0,
- "balance": 4434637.5,
- "txId": "65c9ac395b596bfd38509b01"
}Withdraw player credit
| action required | string action |
| AgentPrefixId required | string AgentPrefixId |
| Security required | string Security |
Request DTO
| username | string |
| amount | number |
| description | string |
| requestId | string |
{- "username": "mgt_test01",
- "amount": 1000,
- "description": "withdraw player credit",
- "requestId": "TXN-04122024-MG-1230-TTXXSAXDWF"
}{- "code": 0,
- "balance": 4434637.5,
- "txId": "65c9ac52602ccca94a1e57a2"
}