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

# Errors

Paycashless follows the conventional HTTP status codes.
Code in the range of `2xx` indicate success, while codes in the range of `4xx` indicates that the request failed as a result of the something provided in the request data.
And codes in the range `5xx` are unexpected server errors.

<ResponseField name="type" type="string">
  Every error includes a type. We have 4 possible values `api_error`, `authentication_error`, `idempotency_error`, or `invalid_request_error`

  <AccordionGroup>
    <Accordion title="api_error">
      These are unexpected errors from our end.
    </Accordion>

    <Accordion title="authentication_error">
      Authentication error has to do with your API keys or the Bearer authentication scheme not passed correctly
    </Accordion>

    <Accordion title="idempotency_error">
      Another request with same idempotency key is still processing
    </Accordion>

    <Accordion title="invalid_request_error">
      Your request include incorrect or invalid parameters
    </Accordion>
  </AccordionGroup>
</ResponseField>

<ResponseField name="code" type="string">
  This is a more specific error code that summarises the error. Can be implemented or caught in your code for specific error handling.
</ResponseField>

<ResponseField name="message" type="string">
  A detailed human-readable message providing information about the error.
</ResponseField>

## Example error response

```json theme={null}
{
  "error": {
    "type": "authentication_error",
    "code": "request_signature_invalid",
    "message": "Authorization failed, invalid signature"
  }
}
```
