Errors · Error format

Errors

API Errors

When a Sports or Casino request fails, the answer is a small JSON object with error and message. Your code should check error: it is a fixed code that never changes. message is a short fixed sentence for people to read.

Error format

JSON
{
  "error": "event_not_found",
  "message": "Event not found"
}
FieldMeaning
errorThe error code. Use this in your code.
messageA short sentence about the error. It is always the same for a code.

GET /api/v1/health answers differently: { "status": "ok", ... } with HTTP 200 when the API is working, or { "status": "degraded", ... } with HTTP 503 when part of it is not answering.

A 429 answer also has a Retry-After header: the number of seconds to wait. The body is { "error": "rate_limited", "message": "Too many requests" }.

Status codes

HTTPerrorMessageWhen
400invalid_sportUnsupported sport. Supported sports: cricket, football, tennis, horse-racing, greyhound-racingThe sport in the address is not one of the supported sport keys.
400invalid_event_idEvent id must be a positive integerThe event id is not a whole number above zero, or is longer than 20 digits.
400invalid_queryQuery parameters are not validA games filter is empty or too long, or the query could not be read.
400invalid_pagePage must be a positive integerpage is not a whole number of 1 or more. Leave it out to get page 1.
400invalid_limitLimit must be between 1 and 100limit is not a whole number from 1 to 100.
400unsupported_currencyCurrency is not enabled for this API clientThe currency is not allowed for your account, or it is not the player's currency. A player keeps the currency of their first launch.
400invalid_providerProvider filter is not validprovider is not a provider id from GET /api/v1/casino/providers. Ids are case-sensitive.
400invalid_categoryCategory filter is not validcategory is not a category id from the games list. Ids are case-sensitive.
400invalid_launchLaunch request is not validThe launch request has a missing or wrong field, an unknown field, or is not valid JSON.
400invalid_walletWallet request is not validThe wallet request has a missing or wrong field, an unknown operation, a badly written amount or currency, or a rollback amount that differs from the original.
400player_not_configuredPlayer country or currency is not configuredYour account's casino settings (country, currency or language) are not complete, so a new player cannot be created. Contact HZURA.
403ip_not_allowedClient address is not allowedAccess was refused. The API key is missing, empty, unknown or switched off, or your server's IP address is not on your allow-list. For safety, the answer does not say which.
403sport_not_allowedThis sport is not enabled for this API clientThe sport exists, but it is not enabled for your account.
403casino_access_disabledCasino access is not enabledCasino is switched off for your account. On the transfer wallet only CREDIT is refused, so players can still be paid out.
403game_not_availableGame is not availableThe game exists but cannot be opened with this currency, language, device or mode. Demo needs a game with demo_support: true.
404not_foundRoute not foundThe address does not exist. If your access check fails first, you get ip_not_allowed instead.
404event_not_foundEvent not foundNo event with this id exists for this sport.
404odds_not_foundOdds are not available for this eventThe event exists, but it has no odds yet.
404game_not_foundGame not foundNo game with this id exists.
404player_not_foundPlayer not foundThis player_id has never been launched. A player is created by their first launch, not by the wallet.
404wallet_transaction_not_foundWallet transaction not foundThe rollback points to a transaction_id this player does not have.
405method_not_allowedMethod not allowedThe address exists, but not with this HTTP method (for example GET instead of POST).
409insufficient_balanceWallet balance is not sufficientThe player's casino balance is too low for this withdrawal or rollback. Nothing moved.
409wallet_idempotency_conflictWallet transaction does not match the original requestThis transaction_id was already used for a different request (another player, operation, amount, currency or rollback reference).
409wallet_transaction_pendingWallet transaction is still in progressOnly when you repeat a transfer made with the previous version of the wallet. New transfers never return it. Contact HZURA.
409wallet_already_rolled_backWallet transaction is already rolled backThe transfer you want to reverse has already been reversed.
409wallet_transaction_not_reversibleWallet transaction cannot be rolled backThe transfer you want to reverse was refused, or is itself a rollback.
409wallet_mode_mismatchThis customer uses the seamless walletYour account uses the seamless wallet, so HZURA holds no balance and this route is not used.
413payload_too_largeRequest payload too largeThe request body is larger than 8 KiB.
429rate_limitedToo many requestsToo many sports requests in a short time. Wait the number of seconds in the Retry-After header.
500internal_errorInternal server errorSomething went wrong on our side. Try again later.
502malformed_upstream_dataUpstream data could not be readThe event or odds data could not be read. Try again shortly.
502launch_authentication_failedGame launch could not be authenticatedThe game could not be opened right now. Try again shortly.
502launch_failedGame launch failedThe game provider refused to open the game or sent no game link.
502wallet_provider_failedWallet transaction failedOnly when you repeat a transfer that the previous version of the wallet refused. New transfers never return it.
503security_config_unavailableService is temporarily unavailableYour access could not be checked right now, so the request was refused. Try again shortly.
503catalog_unavailableEvent data is not available yet, retry shortlyEvents for this sport are not available yet. Try again shortly.
503redis_unavailableUpstream data store is unavailableThe service is temporarily unavailable. Try again shortly.
503casino_catalog_unavailableCasino catalog is not available yet, retry shortlyThe game list is temporarily unavailable. Try again shortly.
503launch_not_configuredGame launch is not availableGame launch is temporarily unavailable. Try again later or contact HZURA.
503player_store_unavailablePlayer identity is not availablePlayers could not be looked up right now. Try again shortly.
503wallet_not_configuredCasino wallet is not availableThe wallet is not ready for your account. On the seamless wallet this means your wallet URL or signing secret is not set up yet, so real-money launches are refused. Contact HZURA.
503wallet_store_unavailableCasino wallet is not availableThe wallet is temporarily unavailable. Repeat the same request; money never moves twice.
504redis_timeoutUpstream data store timed outThe service took too long to answer. Try again shortly.
504launch_unavailableGame launch is temporarily unavailableThe game provider did not answer in time. Launch never moves money, so it is safe to try again.

Access refused

Every access failure returns the same code. A wrong key and an unknown IP address look the same, so nobody can use the answer to guess which part failed.

HTTPerrorWhere
403ip_not_allowedSports and Casino

Not enabled for you

Access worked, but this sport, the casino, or this game is not enabled for your account.

HTTPerrorWhere
403sport_not_allowedSports
403casino_access_disabledCasino
403game_not_availableCasino

Request problems

Something in the address, the filters or the JSON body is wrong. Fix it before sending again.

HTTPerrorWhere
400invalid_sportSports
400invalid_event_idSports
400invalid_queryCasino
400invalid_pageCasino
400invalid_limitCasino
400unsupported_currencyCasino
400invalid_providerCasino
400invalid_categoryCasino
400invalid_launchCasino
400invalid_walletWallet
400player_not_configuredCasino
405method_not_allowedAll routes
413payload_too_largeCasino launch and wallet

Not found

The address, event, game, player or transfer does not exist for your account.

HTTPerrorWhere
404not_foundAll routes
404event_not_foundSports
404odds_not_foundSports
404game_not_foundCasino
404player_not_foundWallet
404wallet_transaction_not_foundWallet

Wallet refusals

The wallet refused the operation and nothing moved. Repeating the same transaction_id returns the same answer and never moves money twice.

HTTPerrorWhere
409insufficient_balanceWallet
409wallet_idempotency_conflictWallet
409wallet_transaction_pendingWallet
409wallet_already_rolled_backWallet
409wallet_transaction_not_reversibleWallet
409wallet_mode_mismatchWallet

Rate limits

Sports requests have a limit per time window. Wait for Retry-After. Casino requests do not have this limit.

HTTPerrorWhere
429rate_limitedSports

Data or game problems

The data could not be read, or the game could not be opened. Try again shortly.

HTTPerrorWhere
500internal_errorAll routes
502malformed_upstream_dataSports
502launch_authentication_failedCasino
502launch_failedCasino
502wallet_provider_failedWallet

Temporarily unavailable

Try again shortly with the same request. Wallet requests are safe to repeat with the same transaction_id.

HTTPerrorWhere
503security_config_unavailableSports and Casino
503catalog_unavailableSports
503redis_unavailableSports and Casino
503casino_catalog_unavailableCasino
503launch_not_configuredCasino
503player_store_unavailableCasino
503wallet_not_configuredCasino launch and wallet
503wallet_store_unavailableCasino launch and wallet
504redis_timeoutSports
504launch_unavailableCasino

What to do

AnswerWhat to do
400Fix the request. Sending it again unchanged gives the same error.
403 ip_not_allowedCheck your API key and your server's public IP address with HZURA.
429 rate_limitedWait Retry-After seconds, then try again. Sports only.
409 insufficient_balanceThe balance is too low. Try again only when it is enough, with a new transaction_id.
409 wallet_idempotency_conflictThis transaction_id was used for a different request. Use a new one.
409 wallet_mode_mismatchYour account uses the seamless wallet. Your own wallet answers HZURA's requests instead.
409 wallet_transaction_pending or 502 wallet_provider_failedOnly seen when repeating a transfer from the previous wallet version. Contact HZURA, and use a new transaction_id for a new attempt.
503 wallet_store_unavailableSend the same request again with the same transaction_id. Money never moves twice.
504 launch_unavailableSend the same launch again. Launching never moves money.
Other 502, 503 and 504 errorsTemporary. Wait a little and send the same request again.