API Setup
Error Handling
Use this error handling guide to interpret Brick API and callback failures without marking uncertain payments or payouts as final too early. Developers should inspect the HTTP status, Brick error code, recommended action, and callback behavior before retrying requests, escalating to support, or updating internal transaction records.
Client Side Errors
| Type | Reason | Status code | Code |
|---|---|---|---|
| Unauthorised/Unauthenticated | Username & password in not correct(in Auth API) | 401 | missing_parameters_in_headers |
| Unauthorised/Unauthenticated | Public token is invalid | 401 | invalid_parameters_in_headers |
| Unauthorised/Unauthenticated | Public token is missing | 401 | missing_parameters_in_headers |
| Unauthorised/Unauthenticated | Public token is expire | 401 | expired_parameters_in_headers |
| Unauthorised/Unauthenticated | User access token is invalid | 401 | invalid_parameters_in_headers |
| Unauthorised/Unauthenticated | User access token is missing | 401 | missing_parameters_in_headers |
| Unauthorised/Unauthenticated | User access token is expire | 401 | expired_parameters_in_headers |
| Unauthorised/Unauthenticated | Unauthorised access to transaction | 401 | unauthorized_access |
| Forbidden | User access token is not mapped with Public access token(Client) | 403 | client_not_authorized |
| Bad Request(Parameters is missing or Invalid) | Parameter is missing in request(Either one or more parameters) | 400 | missing_parameters_in_request |
| Bad Request(Parameters is missing or Invalid) | Parameters are not incorrect(If value is not correct) | 400 | wrong_parameters_in_request |
| Bad Request(Parameters is missing or Invalid) | Parameters are not incorrect (If value is not valid) | 400 | invalid_parameters_in_request |
| Bad Request(Parameters is missing or Invalid) | Parameters are not in correct format | 400 | incorrect_format_of_parameters_in_request |
| Bad Request(Parameters is missing or Invalid) | Parameter are not in correct type(Wrong type of parameters) in request | 400 | incorrect_type_of_parameters_in_request |
| Bad Request(Parameters is missing or Invalid) | Callback is not available | 400 | missing_callback_url |
| Bad Request(Parameters is missing or Invalid) | Parameters is expired | 400 | expired_parameters_in_request |
| Unprocessable request | Dormant user | 422 | inactive_user |
| Unprocessable request | Concurrent user/ Session is available is other device | 400 | session_available_in_other_device |
| Resource not available | Not authorised to complete the request | 404 | feature_not_available |
| Source is not authorised | Request is not from whitelisted IP | 401 | ip_not_whitelisted |
| Rate limit exceeded | More number of request than rate limit | 401 | rate_limit_exceeded |
| Method not allowed | Wrong method | 405 | method_not_allowed |
Server Side Errors
| Type | Reason | Status Code | Code |
|---|---|---|---|
| Service unavailable | Service unavailable (Brick) | 500 | service_unavailable |
| Service unavailable | Service unavailable (Institution level) | 500 | institution_not_available |
| Unexpected behaviour | Data can not retrieved | 500 | unexpected_behaviour |
| Unexpected behaviour | Internal crash | 500 | unexpected_behaviour |
| Server unavailable | Server unavailable | 500 | server_unavailabl |
Callback Errors
Here are the list of errors that you might get when receiving callback.
| Error Code | Error Detail Code | Message | Category | Reason | Action |
|---|---|---|---|---|---|
| 4000100 | bad_request | General request failed | Failed | There was an issue with the request format or data, which led to a failure. Check for any missing or incorrect fields. | Verify the request parameters and retry the request. |
| 4030102 | amount_limit_not_eligible | Transaction Amount Outside Allowed Limit | Failed | The requested amount is either above or below the permitted transaction limit. Ensure the amount falls within acceptable thresholds. | Adjust the transaction amount to meet eligible limits and retry. |
| 4030103 | suspected_fraud | Suspected fraud | Failed | The transaction triggered a fraud detection alert. Further review is needed to confirm the transaction's legitimacy. | Contact support to review this transaction. |
| 4040111 | invalid_bank_account | Bank account invalid | Failed | The bank account information provided is invalid. Double-check the account number and try again. | Verify the bank account details and resubmit the request. |
| 5000100 | general_error | General error | Failed | A general error occurred while processing the request. This may be due to a temporary issue on our end. | Please wait and retry again. If issue persists, please contact customer support. |
| 5000102 | general_external_error | External server error (hanging transaction) | Pending | An external server error caused the transaction to hang, leaving the status pending. This issue will require manual reconciliation to ensure the transaction is processed correctly. | Please contact support for manual reconciliation. |
| 5040100 | timeout | Timeout (hanging transaction) | Pending | The transaction request timed out due to a prolonged delay, and the status remains pending. Manual reconciliation is necessary to confirm the final transaction outcome. | Contact support for manual reconciliation of the pending transaction. |
Last modified on
