Reference guides

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": "This merchant operates in BRL; use your group's MXN merchant",
  "statusCode": 403,
  "error": { "code": "CURRENCY_NOT_ENABLED" }
}

Decide by error.code; the message is text for people (in English) 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": "Validation error",
  "details": [{ "path": "/player_id", "message": "Expected string" }]
}

Catalog#

General (all routes)#

HTTPCodeCause
400INVALID_BODYBody sent as application/json that is not valid JSON.
404ROUTE_NOT_FOUNDRoute does not exist (check the method, the path and the /v1 version).
429RATE_LIMITEDToo many requests from the same IP in a minute; wait a few seconds and resend.

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.
402BILLING_BALANCE_EXHAUSTEDPrepaid GGR balance exhausted: games open again after a top-up.
402BILLING_CREDIT_LIMIT_EXCEEDEDOpen balance above the credit limit (postpaid).
402BILLING_INVOICE_OVERDUEGGR invoice overdue and unpaid.
403CURRENCY_NOT_ENABLEDCurrency differs from the merchant currency.
403PRODUCT_NOT_ENABLEDThe game product is not enabled.
403GAME_NOT_ENABLEDGame or provider not offered by this merchant.
403COUNTRY_NOT_ALLOWEDPlayer country blocked for the merchant, the provider or the game.
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.
503LAUNCH_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.
RATE_LIMITED (429)Yes, after a few seconds, 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.