Errors

Format#

API responses have an envelope. On error, the HTTP status is the same statusCode as in the body and the stable code is in error.code:

JSON
{
  "success": false,
  "message": "Este merchant opera em BRL; use o merchant de MXN do seu grupo",
  "statusCode": 403,
  "error": { "code": "CURRENCY_NOT_ENABLED" }
}

Decide by error.code; the message is text for people (in Portuguese) and may change.

Validation error (422)#

A body or query that does not match the schema has its own format, with the list of invalid fields:

JSON
{
  "data": null,
  "status": 422,
  "error": "VALIDATION_ERROR",
  "message": "Erro de validação",
  "details": [{ "path": "/player_id", "message": "Expected string" }]
}

Catalog#

Authentication (all routes)#

HTTPCodeCause
401MISSING_AUTH_HEADERSX-Merchant-Id, X-Timestamp, X-Nonce or X-Signature is missing.
401REQUEST_EXPIREDX-Timestamp outside the 5-minute window.
401INVALID_MERCHANTUnknown merchant.
401MERCHANT_BLOCKEDMerchant is blocked.
401INVALID_SIGNATUREThe signature does not match.
401IP_NOT_ALLOWEDSource IP not in the merchant list.
401NONCE_REUSEDRepeated nonce.
503AUTH_UNAVAILABLETemporary failure; resend with a new nonce.

Game launch#

HTTPCodeCause
400UNSUPPORTED_CURRENCYCurrency not in the supported list.
400INVALID_COUNTRYCountry is not a valid ISO 3166-1 alpha-2 code.
403CURRENCY_NOT_ENABLEDCurrency differs from the merchant currency.
403PRODUCT_NOT_ENABLEDThe game product is not enabled.
404GAME_NOT_FOUNDGame does not exist or is inactive.
409WALLET_NOT_CONFIGUREDMerchant without walletUrl.
409AMBIGUOUS_GAMECode exists in more than one provider; send provider.
422PROVIDER_NOT_SUPPORTEDProvider without a launch integration.
500LAUNCH_GAME_FAILEDInternal error.
502LAUNCH_FAILEDThe provider did not open the game.

Queries#

HTTPCodeRoute
400INVALID_RANGEGET /v1/reports/ggr: from is not before to.
400RANGE_TOO_LARGEGET /v1/reports/ggr: period longer than 93 days.
500GGR_REPORT_FAILEDGET /v1/reports/ggr
500LIST_GAMES_FAILEDGET /v1/games
500LIST_PROVIDERS_FAILEDGET /v1/providers
500LIST_TRANSACTIONS_FAILEDGET /v1/transactions

Your wallet replies#

Codes your wallet returns in { "ok": false, "error": "..." } (see Seamless wallet):

CodeWhen to use
INSUFFICIENT_FUNDSNot enough balance for the bet.
PLAYER_NOT_FOUNDUnknown player.
PLAYER_BLOCKEDPlayer is blocked.
TRANSACTION_NOT_FOUNDrefund/rollback of a transaction you never applied.
INVALID_SIGNATURECallback with an invalid signature (reply HTTP 401).

Retries#

SituationCan you resend?
5xx, timeout, network errorYes, with a new X-Nonce and X-Timestamp.
AUTH_UNAVAILABLE (503)Yes, with a new nonce.
REQUEST_EXPIREDYes, after fixing the clock.
Other 4xxNo — fix the request.

A failed launch leaves nothing pending: just open it again.