# Error Codes

## Expected Errors

**Expected errors** are errors that are always returned with the HTTP status code `200 OK`. These errors indicate that the **request** was successfully processed, even if it resulted in an error. The standard JSON response format for unexpected errors is shown below:

```json
{
    "status": true,
    "status_code": 0,
    "message": "Success",
    "result": {
        "error_code": 1042,
        "message": "duplicate external id",
        "data": null,
    }
}
```

The error details are located in the `result` parameter under the `error_code` and `message` fields.

| Code               | Text message                 | Description                                                 | HTTP Status |
| ------------------ | ---------------------------- | ----------------------------------------------------------- | ----------- |
| 0                  | Success                      | The request has been processed successfully                 | 200         |
| 8301               | Unexpected db error          | Unidentified error occurred during processing resource      | 200         |
| 1407               | Cache: item not found        | The requested resource not found                            | 200         |
| 1041               | Order not found              | Payment with the specified identifier not found             | 200         |
| 1042               | duplicate external id        | Repeated payment with the same identifier                   | 200         |
| 9718               | provider not found           | The requested provider not found                            | 200         |
| 8015               | account doesn't exist        | The requested account not found                             | 200         |
| <p></p><p>9724</p> | showcase not found           | The requested showcase not found                            | 200         |
| 9721               | showcase service not found   | The requested showcase service not found                    | 200         |
| 5103               | transaction not found        | The requested transaction not found                         | 200         |
| 5413               | transaction already finished | The requested transaction is finalized                      | 200         |
| 8008               | project doesn't exist        | The requested project not found                             | 200         |
| 1410               | not enough balance           | Insufficient funds on the showcase balance                  | 200         |
| 9902               | parking doesn't exists       | Parking doesn't exists                                      | 200         |
| 9726               | project limit not found      | Error on the side of the payment organization               | 200         |
| 2012               | project commission not found | Error on the side of the payment organization               | 200         |
| 9903               | wrong vehicle number format  | Wrong vehicle number format                                 | 200         |
| 1600               | amount limit exceeded        | The transaction amount exceeds the project's allowed limits | 200         |

## Unexpected errors

**Unexpected errors** are errors returned with an HTTP status code that indicates a failure (such as 400 or 500). These errors signal that the request failed due to issues such as validation errors, authentication problems, or system errors. They follow a standardized JSON response format, as shown below:

```json
{
    "status": false,
    "status_code": 1014,
    "message": "Invalid signature",
    "result": {}
}
```

The `status_code` and `message` provide the main information about the error.

| Code   | Text message             | Description                                                 | HTTP Status |
| ------ | ------------------------ | ----------------------------------------------------------- | ----------- |
| 500    | Internal Server Error    | Unidentified server error                                   | 500         |
| 1014   | Invalid signature        | The signature has been made incorrectly                     | 400         |
| 1021   | request validation error | Invalid request body                                        | 400         |
| 1404   | Invalid action request   | Field value not passed                                      | 400         |
| 5629   | empty service code       | the service\_code value was not passed                      | 400         |
| 5610   | invalid project code     | the project value was not passed, or the value is incorrect | 400         |
| 1301   | login is not verified    | username value not passed                                   | 400         |
| 999999 | Unknown error            | Unidentified error                                          | 500         |
