Download OpenAPI specification:Download
This specification describes an endpoint that YOU implement, not one that Mangoplay hosts.
In Seamless Mode the player balance lives in your system. Mangoplay calls the callback URL you supplied on the integration Request Form every time a bet is placed, settled, refunded or cancelled. The operations below are the requests we send you and the responses we expect back.
For the Mangoplay endpoints that you call, see the Agent API Docs. For the narrative version of this contract, including retry behaviour and per-agent options, see docs.mangoplay.com.
A single endpoint receives all four actions. Branch on the action field.
De-duplicate by dealId. Every retry of the same logical transaction reuses the same dealId and the same id. Do not de-duplicate by betId — it identifies the round, so every bet a player places in one round carries the same value.
Mangoplay sends this request for every bet and every settlement. Return code: 0 on success and always include balanceBefore / balanceAfter.
Timeouts. Default 10 s for BET and 5 s for the others. A timeout, connection error or 5xx is retried — BET up to 5 times one second apart, the rest by a background job up to 3 times. If your service is slower than these defaults, tell us your realistic p99 for bet and settle separately and we will raise the timeout for your agent.
| AgentId required | string Example: mgtstg Your agent prefix |
| Security required | string Your security key |
The wallet event. Branch on action.
| action | string The event type. |
| type | string Same value as |
| id | integer <int64> Our request id. Stable across retries of the same call. For |
| dealId | string The de-duplication key. Unique per bill. A bet carries the |
| betId | string Identifies the round, not the bill. Every bet a player places in one round carries the same value — never use it for de-duplication. |
| username | string Player name without your prefix. |
| roundId | string |
| game | string Game name. |
| providerName | string |
| gameType | string Always |
| betDetail | string The hole the player bet on. |
| validBet | number Stake. |
| turnOver | number |
| winLose | number Amount to credit to the player. |
| winLoseWithOutTurnOver | number The player's net profit or loss, for your reporting. |
| betTime | integer <int64> Epoch ms when the bet was placed. |
| reportDate | string Reporting day, |
| ip | string |
| gameResult | string Value: "Wait" |
| remark | string |
{- "action": "BET",
- "type": "BET",
- "id": 1786615539367226,
- "username": "0tonebx4",
- "dealId": "HL-B20260813100522-1786615539334-QGF2BP31_B",
- "betId": "HL-B20260813100522-HL-B",
- "roundId": "HL-B20260813100522",
- "game": "Hilo",
- "providerName": "Hilo",
- "gameType": "CASINO",
- "betDetail": "HOLE_3_5",
- "validBet": 100,
- "turnOver": 100,
- "winLose": -100,
- "winLoseWithOutTurnOver": -100,
- "gameResult": "Wait",
- "betTime": 1786615539334,
- "reportDate": "13-08-2026",
- "ip": "127.0.0.1",
- "remark": "Waiting for settlement"
}{- "code": 0,
- "balanceBefore": 1000,
- "balanceAfter": 900
}