> For the complete documentation index, see [llms.txt](https://piqpay.gitbook.io/merchant-integration/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://piqpay.gitbook.io/merchant-integration/additional-information/api-errors.md).

# API errors

| Http status code | Error text                                                                  | Error description                                                                                                                                                   | Error code          |
| ---------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------- |
| 500              | Something went wrong. Unhandled server error.                               | Invalid/inactive API key in the request body, merchant not ACTIVE, other unhandled errors                                                                           | 0                   |
| 401              | Unauthorized action is forbidden. Something is wrong with the api key.      | Missing or empty Authorization: Bearer token (secretKey), invalid secretKey, API key in TERMINATED status; IP not in allowed\_ips list (if whitelist is configured) | 1                   |
| 403              | Requested action is forbidden. Something is wrong with api key permissions. | The requested action is prohibited. There are permission issues with the specified API key.                                                                         | 3                   |
| 404              | Requested resource not found.                                               | The deposit/withdrawal amount (minorAmount) is below/above the limit. Additional merchant account settings are required.                                            | 4                   |
| 400              | Customer client is suspended. BadRequest                                    | The user with the specified client ID has been blocked. Unsupported payment method. Broken JSON, invalid fields.                                                    | 60037, 60031, 12, 2 |
| 409              | Payment/payout already exists for merchant and client id.                   | Deposit/withdrawal for the specified client ID already exists                                                                                                       | 60033, 60036        |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://piqpay.gitbook.io/merchant-integration/additional-information/api-errors.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
