> ## Documentation Index
> Fetch the complete documentation index at: https://docs.paynext.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Errors

> Understand PayNext Billing API error codes and response formats.

PayNext Billing APIs use standard HTTP status codes to indicate the outcome of each request:

* **2xx** — Success
* **4xx** — Client errors (missing parameters, invalid input, authentication issues)
* **5xx** — Server errors (rare)

***

## HTTP Status Codes

| Code  | Meaning           | Description                                                                   |
| ----- | ----------------- | ----------------------------------------------------------------------------- |
| `200` | OK                | Returned when the request succeeds.                                           |
| `400` | Bad Request       | Returned when the request contains invalid parameters or malformed data.      |
| `401` | Unauthorized      | Returned when no valid API key is provided or the key is invalid.             |
| `404` | Not Found         | Returned when the requested resource does not exist.                          |
| `429` | Too Many Requests | Returned when the request rate limit is exceeded (*reserved for future use*). |
| `500` | Server Error      | Returned when something goes wrong on PayNext's side (rare).                  |

<Tip>
  Always check the HTTP status code and handle errors gracefully in your application.
</Tip>

***

## Error Response Format

All error responses share a consistent structure:

```json theme={"system"}
{
  "error": {
    "message": "A human-readable description of the error."
  }
}
```

<Note>
  Fields may expand in the future (for example, error codes or subfields for validation errors).\
  Your integration should always parse the `error.message` field at a minimum.
</Note>
