Errors
We use the HTTP status codes to communicate the result of a response. 2xx responses are successful, 4xx responses are failures due to provided information—e.g. a parameter was omitted—and 5xx responses are failures due to banca.me errors.
HTTP Status Code
| HTTP Status Code | Description |
|---|---|
| 200 | OK - The request was successful |
| 201 | Created - The resource was successfully created |
| 400 | Bad Request - The request was invalid or cannot be served |
| 400 | ERR_BNPL_PRODUCT_TYPE_NOT_ALLOWED - The BNPL product type is not allowed |
| 401 | Unauthorized - Authentication credentials were missing or incorrect |
| 403 | Forbidden - The request is understood but has been refused or access is not allowed |
| 404 | Not Found - The requested resource could not be found |
| 422 | Unprocessable Entity - The request was well-formed but was unable to be followed due to semantic errors |
| 422 | ERR_BNPL_DATA_NOT_OK - The BNPL data validation failed |
| 429 | Too Many Requests - Rate limit exceeded |
| 500 | Internal Server Error - Something went wrong on our end |
| 503 | Service Unavailable - The service is temporarily unavailable |
| 503 | BNPL_FETCH_DATA_ERROR - Error fetching BNPL data from provider |
Error object
When an error occurs, banca.me will return an error object in the response body. Here's an example of the error structure:
{
"data": {
"status": <STATUS_CODE>,
"url": <REQUEST_URL>,
"ip": <IP>,
}
}
Error Object Attributes
| Attribute | Type | Description |
|---|---|---|
| status | number | An HTTP status error code that can be mapped to the errors shown in the previous section. |
| url | string | A URL of where the request came from. |
| ip | object | IPv4 format for the request IP address. |