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}

HeaderValue
Content-Typeapplication/json
X-REQUEST-SIGNHMAC-SHA256 signature of request body
FieldTypeRequiredDescription
account_idstringYesPlayer account identifier
currencystringYesCurrency code — standard ("USD", "EUR") or custom ("CUSTOM_GOLD")
round_idstringYesGame round identifier (Beexar’s round_id)
session_idstringNoSession identifier (UUID)
{
"account_id": "player_123",
"currency": "USD",
"round_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"session_id": "7b115688-3849-490a-95bd-7c281d81c64c"
}

FieldTypeRequiredDescription
balancestringYesCurrent player balance
{
"balance": "509.80"
}
HTTP StatusTwirp Codeapi_codeDescription
400invalid_argument400Invalid request
400invalid_argument403Invalid or missing signature
500internal500Internal 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: trueNo
Crash: final BetWin with finished: trueNo
Slots: multi-step round, last BetWin has finished: trueNo
Slots: multi-step round, no finished flag on last BetWinYes
Session expired with open roundYes
Error recovery after rollbackYes