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
| Field | Type | Description | |
|---|---|---|---|
| sessionId | string (UUID) | required | Active game session identifier |
| playerId | string | required | Operator's unique identifier for the player |
| transactions | array | required | List of transactions for the round. May contain a single or multiple bet/win entries. All transactions are idempotent |
| transactions[].id | string (UUID) | required | Unique identifier for this transaction. Used for idempotency checks |
| transactions[].type | string | required | Transaction type. Allowed values: bet, win |
| transactions[].amount | number | required | Transaction amount in the player's currency |
| transactions[].jpAmount | number | optional | For bet - jackpot contribution amount, for win - jackpot win amount |
| game | string | required | Game identifier |
| round.id | string (UUID) | required | Unique identifier for this game round |
| round.finished | boolean | required | Whether the round is complete with this request |
| campaign | object | optional | Campaign context. Present only when this round is part of a campaign (free bets, tournament, etc.) |
| campaign.id | string (UUID) | optional | Unique identifier of the campaign |
| campaign.type | string | optional | Campaign type. Allowed values: freeBets |
| campaign.finished | boolean | optional | Whether this transaction exhausts the campaign allocation |
| regulatory | string | optional | Regulatory metadata string, jurisdiction-specific. Can be empty |
Response
✓ 200 OK
{
"balance": 100.57
}
Response Parameters
| Field | Type | Description |
|---|---|---|
| balance | number | Updated player balance after all transactions in the request have been applied |