Cancel
Rollback a previously placed bet transaction.
POST /cancel
POST{operator endpoint}/cancel
Cancel / rollback a bet transaction. Called when NeverEnding needs to reverse a bet that could not be completed (e.g. game error, network timeout).
Request
Headers: X-Server-Authorization: hmac_sha256_hash · Authorization: Bearer {token}
{
"sessionId": "321e4567-e89b-45d3-b594-41234174249",
"originalSessionId": "321e4567-e89b-45d3-b594-41234174249",
"playerId": "player_777",
"transactionId": "321e4567-e89b-45d3-b594-41234174249",
"roundId": "123e4567-e89b-12d3-a456-426614174000",
"game": "firefruit-sevens-classic"
}
Request Parameters
| Field | Type | Description | |
|---|---|---|---|
| sessionId | string (UUID) | required | Current game session identifier |
| originalSessionId | string (UUID) | optional | The session ID from the original bet, if different from the current session (e.g. session was refreshed between bet and cancel) |
| playerId | string | required | Operator's unique identifier for the player |
| transactionId | string (UUID) | required | The ID of the bet transaction to cancel/rollback |
| roundId | string (UUID) | required | Identifier of the round the transaction belongs to |
| game | string | required | Game identifier |
Response
✓ 200 OK
{
"balance": 100.57
}
Response Parameters
| Field | Type | Description |
|---|---|---|
| balance | number | Updated player balance after the cancellation has been applied |