POST
/v1/games/endEnd Game
End the current game session and finalize payouts.
Headers
- Content-Typeapplication/json
Request body
{
"merchantCode": "string",
"playerId": "string",
"gameType": "high-low | coin-flip"
}HTTP 200application/json
{
"status": "SUCCESS",
"success": true,
"message": "Game ended successfully",
"data": {
"betAmount": 10,
"currentBalance": 17520,
"winStreak": 0,
"loseStreak": 0,
"totalGames": 0,
"betHistory": [],
"totalBetAmount": 0,
"totalWinAmount": 0,
"finalBalance": 17520,
"totalRounds": 0,
"totalCredit": 0
}
}HTTP 500HTTP 500
{
"status": "ERROR",
"success": false,
"message": "Failed to process final payout",
"data": {
"error": "Payment gateway timeout",
"accumulatedAmount": 650,
"suggestion": "Please contact support with session ID: abc123-def456-ghi789"
}
}cURL example
curl -X POST \
"{API_BASE_URL}/v1/games/end" \
-H "Content-Type: application/json" \
-d '{
"merchantCode": "string",
"playerId": "string",
"gameType": "high-low | coin-flip"
}'