Skip to main content

Error Codes

TropiPay uses conventional HTTP response codes to indicate the success or failure of an API request. In general, codes in the 2xx range indicate success, codes in the 4xx range indicate an error that failed given the information provided (e.g., a required parameter was omitted, a charge failed, etc.), and codes in the 5xx range indicate an error with TropiPay's servers.

HTTP Status Codes

CodeDescription
200OK - The request was successful.
400Bad Request - The request was unacceptable, often due to missing a required parameter.
401Unauthorized - No valid API key provided or the key has expired.
403Forbidden - The API key doesn't have permissions to perform the request.
404Not Found - The requested resource doesn't exist.
422Unprocessable Entity - The request was well-formed but was unable to be followed due to semantic errors.
500Internal Server Error - We had a problem with our server. Try again later.

API Error Codes

When an API request fails, the response body will contain a JSON object with an error code and a descriptive message. This helps you understand the specific reason for the failure.

Common Error Response Format

{
"error": "invalid_request",
"message": "The `amount` parameter is required.",
"code": "E00123"
}

General Error Codes

CodeMessageDescription
E00001invalid_credentialsThe authentication credentials provided were incorrect.
E00002token_expiredThe access token has expired. Please request a new one.
E00003permission_deniedYou do not have permission to access this resource.
E00004resource_not_foundThe requested resource could not be found.
E00005invalid_parameterA required parameter was missing or invalid. The message will provide more details.

Transfer & Payment Error Codes

CodeMessageDescription
E01001insufficient_fundsThe source account does not have enough funds to complete the transfer.
E01002beneficiary_not_foundThe specified beneficiary account does not exist.
E01003invalid_amountThe transfer amount is below the minimum or above the maximum allowed limit.
E010042fa_requiredA two-factor authentication code is required for this transaction.
E01005invalid_security_codeThe provided security code is incorrect or has expired.
E01006transfer_limit_exceededYou have exceeded your daily or monthly transfer limit.

Beneficiary Error Codes

CodeMessageDescription
E02001invalid_account_numberThe provided bank account number is invalid or does not exist.
E02002invalid_swift_codeThe provided SWIFT/BIC code is not valid.
E02003beneficiary_already_existsA beneficiary with the same account number already exists.