Skip to main content

Transaction

Process bet and win transactions for a game round.


POST /transaction

POST{operator endpoint}/transaction

Process a list of bet/win transactions for a game round. The list may contain a single bet/win transaction or multiple — both behaviours must be supported. All transactions are idempotent.

Request

Headers: X-Server-Authorization: hmac_sha256_hash · Authorization: Bearer {token}

{
"sessionId": "321e4567-e89b-45d3-b594-41234174249",
"playerId": "player_777",
"transactions": [
{
"id": "321e4567-e89b-45d3-b594-41234174249",
"type": "bet",
"amount": 10.55,
"jpAmount": 0
},
{
"id": "c01da019-87d4-4b88-b454-ccb318932e73",
"type": "win",
"amount": 21.10,
"jpAmount": 0
}
],
"game": "firefruit-sevens-classic",
"round": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"finished": true
},
"campaign": {
"id": "15f6402d-c242-4750-900a-805a0f15241c",
"type": "freeBets",
"finished": true
},
"regulatory": ""
}
Request Parameters
FieldTypeDescription
sessionIdstring (UUID)requiredActive game session identifier
playerIdstringrequiredOperator's unique identifier for the player
transactionsarrayrequiredList of transactions for the round. May contain a single or multiple bet/win entries. All transactions are idempotent
transactions[].idstring (UUID)requiredUnique identifier for this transaction. Used for idempotency checks
transactions[].typestringrequiredTransaction type. Allowed values: bet, win
transactions[].amountnumberrequiredTransaction amount in the player's currency
transactions[].jpAmountnumberoptionalFor bet - jackpot contribution amount, for win - jackpot win amount
gamestringrequiredGame identifier
round.idstring (UUID)requiredUnique identifier for this game round
round.finishedbooleanrequiredWhether the round is complete with this request
campaignobjectoptionalCampaign context. Present only when this round is part of a campaign (free bets, tournament, etc.)
campaign.idstring (UUID)optionalUnique identifier of the campaign
campaign.typestringoptionalCampaign type. Allowed values: freeBets
campaign.finishedbooleanoptionalWhether this transaction exhausts the campaign allocation
regulatorystringoptionalRegulatory metadata string, jurisdiction-specific. Can be empty

Response

✓ 200 OK
{
"balance": 100.57
}
Response Parameters
FieldTypeDescription
balancenumberUpdated player balance after all transactions in the request have been applied