> For the complete documentation index, see [llms.txt](https://docs.mugglepay.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mugglepay.com/basic/errorcodes.md).

# HTTP Response and Error Codes

## API Errors

Most common API errors are as follows, including message, reason and status code.

Response example:

```
{
  "error": "API request limit is exceeded",
  "error_code": "API_LIMIT_EXCEEDED",
  "status": "400"
}
```

| status | error\_code                           | error                                                                                 |
| ------ | ------------------------------------- | ------------------------------------------------------------------------------------- |
| 400    | AUTHENTICATION\_FAILED                | Authentication Token is not set or expired.                                           |
| 400    | INVOICE\_NOT\_EXIST                   | Invoice does not exist.                                                               |
| 400    | INVOICE\_VERIFIED\_ALREADY            | It has been verified already.                                                         |
| 400    | INVOICE\_CANCELED\_FAIILED            | Invoice does not exist, or it cannot be canceled.                                     |
| 400    | ORDER\_NO\_PERMISSION                 | Order does not exist or permission denied.                                            |
| 400    | ORDER\_CANCELED\_FAIILED              | Order does not exist, or it cannot be canceled.                                       |
| 400    | ORDER\_REFUND\_FAILED                 | Order does not exist, or it\`s status is not refundable.                              |
| 400    | ORDER\_VERIFIED\_ALREADY              | Payment has been verified with payment already.                                       |
| 400    | ORDER\_VERIFIED\_PRICE\_NOT\_MATCH    | Payment money does not match the order money, please double check the price.          |
| 400    | ORDER\_VERIFIED\_MERCHANT\_NOT\_MATCH | Payment money does not the order of current merchant , please double check the order. |
| 400    | ORDER\_NOT\_VALID                     | Order id is not valid.                                                                |
| 400    | ORDER\_PAID\_FAILED                   | Order not exist or is not paid yet.                                                   |
| 400    | ORDER\_MERCHANTID\_EXIST              | Order with same merchant\_order\_id exisits.                                          |
| 400    | ORDER\_NOT\_NEW                       | The current order is not new, and payment method cannot be switched.                  |
| 400    | PAYMENT\_NOT\_AVAILABLE               | The payment method is not working, please retry later.                                |
| 400    | MERCHANT\_CALLBACK\_STATUS\_WRONG     | The current payment status not ready to send callback.                                |
| 400    | PARAMETERS\_MISSING                   | Missing parameters.                                                                   |
| 400    | PAY\_PRICE\_ERROR                     | Price amount or currency is not set correctly.                                        |
| 400    | CREDENTIALS\_NOT\_MATCH               | The email or password does not match.                                                 |
| 400    | USER\_NOT\_EXIST                      | The user does not exist or no permission.                                             |
| 400    | USER\_FAILED                          | The user operatioin failed.                                                           |
| 400    | INVITATION\_FAILED                    | The invitation code is not filled correctly.                                          |
| 400    | ERROR                                 | Error.                                                                                |
| 401    | (Unauthorized)                        | API credentials are not valid                                                         |
| 404    | (Not Found)                           | Page, action not found                                                                |
| 421    | (Too Many Requests)                   | API request limit is exceeded                                                         |
| 500    | (InternalServerError)                 | Server error in MugglePay                                                             |


---

# 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, and the optional `goal` query parameter:

```
GET https://docs.mugglepay.com/basic/errorcodes.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
