Skip to content

POST /finish

Beexar → Operator

Beexar sends this request to signal that a game round is complete. This is only sent when the last /betwin request did not set finished: true.


POST {finish_url}

Header Value
Content-Type application/json
X-REQUEST-SIGN HMAC-SHA256 signature of request body
Field Type Required Description
account_id string Yes Player account identifier
currency string Yes Currency code — standard ("USD", "EUR") or custom ("CUSTOM_GOLD")
round_id string Yes Game round identifier (Beexar’s round_id)
session_id string No Session identifier (UUID) of the session that opened the round — the one its /betwin requests carried
{
"account_id": "player_123",
"currency": "USD",
"round_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"session_id": "7b115688-3849-490a-95bd-7c281d81c64c"
}

Field Type Required Description
balance string Yes Current player balance
{
"balance": "509.80"
}
HTTP Status Twirp Code api_code Description
400 invalid_argument 400 Invalid request
400 invalid_argument 403 Invalid or missing signature
500 internal 500 Internal server error

Terminal window
curl -X POST https://casino.example.com/wallet/finish \
-H "Content-Type: application/json" \
-H "X-REQUEST-SIGN: abc123def456..." \
-d '{
"account_id": "player_123",
"currency": "USD",
"round_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}'

  • Informational only: The /finish request does NOT modify the player’s balance. All financial operations have already been processed via /betwin and /rollback
  • Only sent when needed: If the last /betwin request included finished: true, Beexar does not send /finish. This means simple games (dice, plinko) typically do not trigger /finish at all
  • Idempotency: Handle duplicate /finish requests for the same round_id gracefully — return success both times
  • Guaranteed delivery: If your server returns an error or is unreachable, Beexar retries /finish asynchronously with exponential backoff
  • Use for reconciliation: Operators should use /finish as a signal to close the round in their bookkeeping system
Scenario /finish sent?
Dice/Plinko: single BetWin with finished: true No
Crash: final BetWin with finished: true No
Candy Cash: the round’s last BetWin (the bet of a drop that wins nothing, or the win) has finished: true No
Mine Cash: the player cashes out, the win’s BetWin has finished: true No
Mine Cash: dynamite ends the round with nothing to pay, no win transaction is sent Yes
Session expired No — expiry itself sends nothing; a round still open is completed by the game server like any other round (rows above)
Error recovery after rollback Yes