Skip to content

Replay all transactions of a closed gameround to the operator

POST
/reconcileTransactions

Asks hizi.io to resend every transaction of a real-money gameround as a doTransactions call to the operator. The transaction hashes are the same as in the original calls, so the operator's doTransactions endpoint must be idempotent on them. If the round is still open it is closed automatically.

Round status can be checked with getGameRoundDetails; open rounds per game with getOpenGameRoundsByGame.

Fields to sign (in order): secret, X-H-AUTH-ID, X-H-TIMESTAMP, gameRound.

Authorizations

hiziAuthId

Operator ID. Sent on every request in both directions, and part of every signature.

Type
API Key (header: X-H-AUTH-ID)
+
hiziAuthSignature

Signature of the request, sent on every request in both directions.

OpenAPI cannot express an HMAC-over-computed-string scheme natively, so this is modelled as an apiKey header. The value is not a static key: it is the base64-encoded SHA-256 HMAC digest of a defined, ordered set of request fields joined with a hash character (#).

The first three fields are always the shared secret, the X-H-AUTH-ID header and the X-H-TIMESTAMP header; the remaining fields differ per operation and are listed in each operation's description under "Fields to sign". For doTransactions the per- transaction hashes (and non-zero amounts) are appended in exactly the order the transactions appear in the payload.

The secret is retrieved by logging in to the hizi.io backoffice, which also provides sample implementations. Including the timestamp in the signature is what makes it safe to share the secret without ever sending it.

Type
API Key (header: X-H-AUTH-SIG)
+
hiziTimestamp

ISO 8601 timestamp of the request (UTC recommended, e.g. 2020-01-21T14:48:04Z). Sent on every request in both directions and always included in the signature.

Type
API Key (header: X-H-TIMESTAMP)

Request Body

application/json
JSON
{
  
"gameRound": "123e4567-e89b-12d3-a456-426655440000"
}

Responses

The round was replayed. The response mirrors what the operator answered to the replayed doTransactions call.

application/json
JSON
{
  
"gameRound": {
  
  
"hash": "123e4567-e89b-12d3-a456-426655440000",
  
  
"player": "string",
  
  
"mode": "string",
  
  
"game": "string",
  
  
"operator": "string",
  
  
"status": "string",
  
  
"language": "en",
  
  
"currency": "EUR",
  
  
"environment": "string",
  
  
"timestamp": "2020-01-21T14:48:04Z",
  
  
"totalBetAmount": 1200,
  
  
"totalWinAmount": 1200,
  
  
"transactions": [
  
  
  
{
  
  
  
  
"type": "string",
  
  
  
  
"isFirstDebit": true,
  
  
  
  
"amount": 1200,
  
  
  
  
"discountAmount": 1200,
  
  
  
  
"discountCampaignId": "string",
  
  
  
  
"currency": "EUR",
  
  
  
  
"hash": "123e4567-e89b-12d3-a456-426655440000",
  
  
  
  
"timestamp": "2020-01-21T14:48:04Z",
  
  
  
  
"reason": "string",
  
  
  
  
"freePlayStake": 1200,
  
  
  
  
"freePlayUsed": true,
  
  
  
  
"serial": "string"
  
  
  
}
  
  
],
  
  
"additionalProperties": "string"
  
},
  
"hashesProcessed": [
  
  
{
  
  
  
"hash": "123e4567-e89b-12d3-a456-426655440000",
  
  
  
"errorCode": {
  
  
  
  
"id": 1,
  
  
  
  
"msg": "player id unknown",
  
  
  
  
"clientmsg": "You reached your daily betting limit!"
  
  
  
}
  
  
}
  
],
  
"balance": 0,
  
"currency": "EUR",
  
"mode": "string",
  
"errorCode": {
  
  
"id": 1,
  
  
"msg": "player id unknown",
  
  
"clientmsg": "You reached your daily betting limit!"
  
}
}

Samples

Powered by VitePress OpenAPI