Platform Errors
Transactions may fail due to different circumstances during the processing flow. Next we present the general error structure.
{
"error": {
"name": "string",
"message": "string",
"details": {
"reason": "string",
"message": "string",
"path": "string",
"code": "string",
"info" : {
"missingProperty": "string",
"allowedValues" : [
"string"
]
}
}
}
These fields are detailed bellow:
Field | Type | Description |
---|---|---|
error.name | string | An error group identifier, which can be reused for several details.reason . |
error.message | string | A high level description for the error group. |
details.reason | string | The low level identifier, which can be used to map errors to end-users if integrators wish to provide a lower-level explanation about an occurred error. |
details.message | string | A low level textual description for the details.reason . |
details.path | string | The service path that caused the error. Specially usefull for incomplete service invocations. |
details.code | string | A code to help understand errors related to services invocations. |
details.info.missingProperty | string | It specifies the property that was missing in the service invocation. |
details.info.allowedValues | string | It specifies the set of values that can be used for a specific field (and was not respected). |
Errors Examples
Example #1: Authentication Error
{
"statusCode": "Error",
"error": {
"name": "AuthenticationError",
"message": "The authorization token is invalid",
"details": {
"reason": "AuthenticationTokenInvalid"
}
}
}
Example #2: Missing required parameter
{
"statusCode": "Error",
"error": {
"name": "InvalidRequestFormatError",
"message": "The request body is invalid. See error object `details` property for more info",
"details": [
{
"path": "/payment/payer",
"code": "required",
"message": "must have required property 'cpf'",
"info": {
"missingProperty": "cpf"
}
}
]
}
}
Example #3: Providing invalid parameter value
{
"statusCode": "Error",
"error": {
"name": "InvalidRequestFormatError",
"message": "The request body is invalid. See error object `details` property for more info",
"details": [
{
"path": "/payment/key/type",
"code": "enum",
"message": "must be equal to one of the allowed values",
"info": {
"allowedValues": [
"CPF",
"EMAIL",
"PHONE",
"EVP"
]
}
}
]
}
}
Note: In the API section we explore another scenarios by presenting errors examples related to each endpoint individually.
Errors Identifiers
As mentioned earlier, while in the transaction detailing, the details.reason
is the proper low-level identifier for integrators. The same applies for the webhook event on its stateErrorCause
field.
Here is a the set of values that you should expect, grouped by context and presented in alphabetical order.
- General Errors.
Identifier | Description |
---|---|
BankingIntegrationError | The transaction could not be transfered to a bank, tipically due to a short-time instability from the banking institution. |
BankingProcessingFail | The transaction could not be processed by the bank, due to an unidentified restriction. |
CustomerAccountInsufficientFunds | The account does not have sufficient funds to complete the operation. |
PaymentProcessingError | A generic error identifier that happens on Sandbox, when forcing an error via API. For details refer to our API Sandbox Endpoints to force errors. |
TransactionDailylAmountLimit | Transaction value exceeds the maximum allowed for a single CPF on a day. Since limit depends on the USD to BRL flotations, additional information is provided in the message. |
TransactioWeeklylAmountLimit | Transaction value exceeds the maximum allowed for a single CPF on a week. Since limit depends on the USD to BRL flotations, additional information is provided in the message. |
TransactioMonthlylAmountLimit | Transaction value exceeds the maximum allowed for a single CPF on a month. Since limit depends on the USD to BRL flotations, additional information is provided in the message. |
TransactionGlobalAmountAboveAllowed | Error when trying to execute a transaction above the limit. Since limit depends on the USD to BRL flotations, additional information is provided in the message. |
TransactionInternalCashoutFail | If for any reason PayBrokers was not able to process the cashout internally. Please refer to PayBrokers team if such error emerges. |
TransactionMultipleCashouts | This error occurs if multiple withdraw occurs within the same second for the same CPF (even coming from different merchants). |
TransactionPayerIsInvalid | The payer details are invalid |
TransactionStateWithInvalidDocumentAmount | The payment amount differs from the original transaction amount |
TransactionOrderIdRequired | If the transaction idempotency is set on your account, the orderId parameter is mandatory and this error is returned if it is not provided. |
TransactionOrderIdDuplicated | If the transaction idempotency is set on your account, this error is returned if two or more requests have the same orderId. |
TransactionBankCashoutNotAllowed | If the destination bank is in banks blacklist. |
- PIX Exclusive.
Identifier | Description |
---|---|
TransactionInvalidPixKey | The provided PIX Key is not valid. |
TransactionPixKeyUnsupportedType | The PIX key type is not supported by this operation. |
TransactionPixKeyValidationFail | The PIX Key could not be found or points to an invalid account, such as salary, savings, or blocked accounts. |
PixKeyTypeNotAllowed | The PIX key type is not allowed to this merchant. |
- Transaction Participants Related.
Identifier | Description |
---|---|
CounterpartyAgeUnder18 | The CPF owner is under 18 years old. |
CounterpartyAgeAbove80 | The CPF owner is over 80 years old. |
CounterpartyDeathNotice | The CPF owner is deceased. |
CounterpartyServiceError | The counterpart tax number (CPF or CNPJ) can't be validated as a real-world number, or belong to an underaged. |
CounterpartyTaxNumberInvalid | The counterpart tax number (CPF or CNPJ) can't be validated within the banking system. |
TransactionGlobalTaxNumberNotAllowed | Represents an attempt to make a transaction with a person who was blocked by the PayBrokers platform. |
TransactionInvalidPixRecipient | The destination account does not belong to the CPF provided in the request. |
TransactionPartnerTaxNumberNotAllowed | This error represents the attempt to make a transaction with a person who was blocked by your company. |
UnacceptablePayerTaxNumber | The payer's CPF differs for any reason from the one expected for the payment. |
These errors are sporadically updated when new use error cases or restrictions are introduced to the platform.
Focusing on a smooth integration experience, PayBrokers team will keep integrators informed about any relevant changes.
Updated about 1 year ago
Now, you are fully able to start the effective integration with our platform!