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)#
| HTTP | Code | Cause |
|---|---|---|
| 400 | INVALID_BODY | Body sent as application/json that is not valid JSON. |
| 404 | ROUTE_NOT_FOUND | Route does not exist (check the method, the path and the /v1 version). |
| 429 | RATE_LIMITED | Too many requests from the same IP in a minute; wait a few seconds and resend. |
Authentication (all routes)#
| HTTP | Code | Cause |
|---|---|---|
| 401 | MISSING_AUTH_HEADERS | X-Merchant-Id, X-Timestamp, X-Nonce or X-Signature is missing. |
| 401 | REQUEST_EXPIRED | X-Timestamp outside the 5-minute window. |
| 401 | INVALID_MERCHANT | Unknown merchant. |
| 401 | MERCHANT_BLOCKED | Merchant is blocked. |
| 401 | INVALID_SIGNATURE | The signature does not match. |
| 401 | IP_NOT_ALLOWED | Source IP not in the merchant list. |
| 401 | NONCE_REUSED | Repeated nonce. |
| 503 | AUTH_UNAVAILABLE | Temporary failure; resend with a new nonce. |
Game launch#
| HTTP | Code | Cause |
|---|---|---|
| 400 | UNSUPPORTED_CURRENCY | Currency not in the supported list. |
| 400 | INVALID_COUNTRY | Country is not a valid ISO 3166-1 alpha-2 code. |
| 402 | BILLING_BALANCE_EXHAUSTED | Prepaid GGR balance exhausted: games open again after a top-up. |
| 402 | BILLING_CREDIT_LIMIT_EXCEEDED | Open balance above the credit limit (postpaid). |
| 402 | BILLING_INVOICE_OVERDUE | GGR invoice overdue and unpaid. |
| 403 | CURRENCY_NOT_ENABLED | Currency differs from the merchant currency. |
| 403 | PRODUCT_NOT_ENABLED | The game product is not enabled. |
| 403 | GAME_NOT_ENABLED | Game or provider not offered by this merchant. |
| 403 | COUNTRY_NOT_ALLOWED | Player country blocked for the merchant, the provider or the game. |
| 404 | GAME_NOT_FOUND | Game does not exist or is inactive. |
| 409 | WALLET_NOT_CONFIGURED | Merchant without walletUrl. |
| 409 | AMBIGUOUS_GAME | Code exists in more than one provider; send provider. |
| 422 | PROVIDER_NOT_SUPPORTED | Provider without a launch integration. |
| 500 | LAUNCH_GAME_FAILED | Internal error. |
| 503 | LAUNCH_FAILED | The provider did not open the game. |
Queries#
| HTTP | Code | Route |
|---|---|---|
| 400 | INVALID_RANGE | GET /v1/reports/ggr: from is not before to. |
| 400 | RANGE_TOO_LARGE | GET /v1/reports/ggr: period longer than 93 days. |
| 500 | GGR_REPORT_FAILED | GET /v1/reports/ggr |
| 500 | LIST_GAMES_FAILED | GET /v1/games |
| 500 | LIST_PROVIDERS_FAILED | GET /v1/providers |
| 500 | LIST_TRANSACTIONS_FAILED | GET /v1/transactions |
Your wallet replies#
Codes your wallet returns in { "ok": false, "error": "..." } (see Seamless wallet):
| Code | When to use |
|---|---|
INSUFFICIENT_FUNDS | Not enough balance for the bet. |
PLAYER_NOT_FOUND | Unknown player. |
PLAYER_BLOCKED | Player is blocked. |
TRANSACTION_NOT_FOUND | refund/rollback of a transaction you never applied. |
INVALID_SIGNATURE | Callback with an invalid signature (reply HTTP 401). |
Retries#
| Situation | Can you resend? |
|---|---|
| 5xx, timeout, network error | Yes, 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_EXPIRED | Yes, after fixing the clock. |
| Other 4xx | No — fix the request. |
A failed launch leaves nothing pending: just open it again.