Pular para o conteúdo principal

HTTP errors

The error envelope, what each status code means, and how to decide whether a request can be retried. Codes specific to one operation are on that operation's page.

This section lists error codes returned by the LB Pay iGaming API and related webhook management routes. Errors are grouped by HTTP status code.

Use the type or errorCode field in the JSON body to branch in your integration. See the API Reference for per-route details.

What to do, by status code​

Before looking up a specific code, decide whether the request is safe to retry. Retrying the wrong class of error either wastes time or duplicates money.

HTTPMeaningAction
400Validation errorFix the payload. Do not retry automatically — the same request fails identically.
401Token invalid or expiredRenew the token and retry once.
403ForbiddenCheck account configuration. Do not retry automatically.
404Resource does not existFor withdrawals: invalid PIX key or account. Notify the player.
422Business rule violatedDefinitive. Never retry. Branch on errorCode and inform the player.
500Internal errorConfirmed failure. The transaction was rejected. Close it as failed.
502 / 503Upstream or timeoutOutcome unknown. Query via GET before retrying. Never assume failure.
A timeout is not a failure

503 and network timeouts mean no answer, not no transaction. LB Pay may have processed the request. Always confirm with a GET using the same externalId before retrying or rolling anything back — see Retries and timeouts.

Response format​

iGaming API​

{
"type": "InvalidParameter",
"title": "Bad Request",
"status": 400,
"detail": "Parameter 'externalId' must be a valid UUID",
"timestamp": "2026-04-07T12:00:00Z",
"path": "/v1/pix/withdraw/pix-key",
"errorCode": "IGAMING_CPF_MISMATCH",
"retryable": false,
"violations": [
{
"reason": "must be a valid UUID",
"property": "externalId",
"value": "invalid"
}
]
}
FieldDescription
typeError category (e.g. InvalidParameter, NotFound)
errorCodeBusiness code on 422 responses; use for deterministic branching
retryablefalse when retrying the same request will not succeed
violationsValidation details for malformed input

Webhook management​

{
"code": "invalid_event",
"message": "One or more subscribed events are invalid"
}

Common errors​

These codes can appear on multiple routes.

BAD_REQUEST (400)​

Error codeDescription
InvalidContentTypeRequest Content-Type is not application/json.
MalformedRequestEmpty body or DTO validation failed.
InvalidJSONRequest body is not valid JSON.
MissingParameterA required path or query parameter is missing.
InvalidParameterA path, query, or body parameter has an invalid value (e.g. externalId is not a UUID).
INVALID_DATE_RANGEStatement date range is invalid, incomplete, in the future, or exceeds 90 days.
MISSING_REQUIRED_FILTERStatement query requires a date range or an endToEndId / productTransactionId filter.
INVALID_PAGE_SIZEStatement pageSize must be between 1 and 100.
INVALID_QUERY_PARAMETERStatement query parameter is invalid or unparsable (e.g. productTransactionId is not a UUID).

UNAUTHORIZED (401)​

Error codeDescription
UnauthorizedMissing or invalid Bearer token, or account context could not be resolved.

FORBIDDEN (403)​

Error codeDescription
ForbiddenThe authenticated client does not have permission to perform this action.

NOT_FOUND (404)​

Error codeDescription
NotFoundThe requested resource was not found (withdrawal, deposit, refund, transfer, or account).
PIX_KEY_NOT_FOUNDThe Pix key used for withdraw does not exist.
ACCOUNT_NOT_FOUNDThe account referenced in the request was not found.

UNPROCESSABLE_ENTITY (422)​

Error codeDescription
IGAMING_CPF_MISMATCHPix key holder CPF does not match the account tax_id.
SECURE_LOOP_ACCOUNT_MISMATCHSecure Loop verification failed for the expected payer or creditor.
ACCOUNT_MISMATCHCreditor account data does not match the settled payment (withdraw GET).

INTERNAL_SERVER_ERROR (500)​

Error codeDescription
InternalErrorAn unexpected error occurred while processing the request.
INTERNAL_SERVER_ERRORFailed to retrieve statement or balance data.

BAD_GATEWAY (502)​

Error codeDescription
INTERNAL_SERVER_ERRORUpstream ledger service returned an error.

SERVICE_UNAVAILABLE (503)​

Error codeDescription
ServiceNotAvailableA downstream service (processor or ledger) timed out or is temporarily unavailable.

Seamless Pix (BACEN-aligned)​

Routes under /v1/cob, /v1/pix/payments, and legacy Seamless paths use BACEN-style error types in the type field:

BAD_REQUEST (400)​

Error codeDescription
RequisicaoInvalidaInvalid request schema.
ChaveInvalidaInvalid Pix key.
ValorInvalidoInvalid amount.

FORBIDDEN (403)​

Error codeDescription
AcessoNegadoAuthorization denied.

NOT_FOUND (404)​

Error codeDescription
NaoEncontradoResource not found.

SERVICE_UNAVAILABLE (503)​

Error codeDescription
ServicoIndisponivelService temporarily unavailable.

Full route list: API Reference.