---
page_source: https://juspay.io/in/docs/lotuspay/web/base-integration/errors
page_title: Errors
---


# Errors 



LotusPay uses conventional HTTP response codes to indicate the success or failure of an API request. In general: Codes in the `2xx` range indicate success. Codes in the `4xx` range indicate an error that failed given the information provided (e.g., a required parameter was omitted, an ACH debit creation failed, etc.). Codes in the `5xx` range indicate an error with LotusPay's servers (these are rare).

**HTTPS status code summary** 


| Code | Meaning |
|---|---|
| 200	 | OK -- Everything worked as expected. |
| 400 | Bad Request -- The request was unacceptable, often due to missing a required parameter. |
| 401 | Unauthorized -- No valid API key provided. |
| 402 | Request Failed -- The parameters were valid but the request failed. |
| 404	 | Not Found -- The requested resource doesn't exist. |
| 405 | Method Not Allowed -- You tried to access a resource with an invalid method. |
| 406 | Not Acceptable -- You requested a format that isn't json. |
| 429	 | Too Many Requests -- Too many requests hit the API too quickly. |
| 500 | Internal Server Error -- Something went wrong on LotusPay's end. (These are rare.) Try again later. |
| 503	 | Service Unavailable -- We're temporarily offline for maintenance. Try again later. |


Some `4xx` errors that could be handled programmatically (e.g., a parameter is declined) include an error code that briefly explains the error reported.

Our API libraries raise exceptions for many reasons, such as invalid parameters, authentication errors, and network unavailability. We recommend writing code that gracefully handles all possible API exceptions.


| Attribute | Description |
|---|---|
| type string | The type of error returned. One of api_connection_error, api_error, authentication_error, invalid_request_error, rate_limit_error or validation_error. |
| code optional string	 | For some errors that could be handled programmatically, a short string indicating the error code reported. |
| doc_url optional string	 | A URL to more information about the error code reported. |
| param optional string	 | If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field. |



### Step 1.1 a Error types



| Type | Meaning |
|---|---|
| api_connection_error	 | Failure to connect to LotusPay's API. |
| api_error | API errors cover any other type of problem (e.g., a temporary problem with LotusPay's servers), and are extremely uncommon. |
| authentication_error	 | Failure to properly authenticate yourself in the request. |
| invalid_request_error	 | Invalid request errors arise when your request has invalid parameters. |
| rate_limit_error | Too many requests hit the API too quickly. |
| validation_error | Errors triggered by our system when failing to validate fields (e.g., when an account number or expiration date is invalid or incomplete). |





### Step 1.1 b Error Codes


**account_number_invalid**  The bank account number provided is invalid (e.g., missing digits). Bank account information varies from bank to bank. We recommend creating validations in your entry forms based on the bank account formats we provide.

**amount_too_large**  The specified amount is greater than the maximum amount allowed. Use a lower amount and try again.

**amount_too_small**  The specified amount is less than the minimum amount allowed. Use a higher amount and try again.

**email_invalid**  The email address is invalid (e.g., not properly formatted). Check that the email address is properly formatted and only includes allowed characters.

**invalid_charge_amount**  The specified amount is invalid. The charge amount must be a positive integer in paisa (one hundredths of a Rupee), and not exceed the minimum or maximum amount.

**invalid_mandate_usage**  The mandate cannot be used because it is not in the correct state (e.g., a charge request is trying to use a mandate with a failed or cancelled mandate). Check the status of the mandate you are attempting to use.

**livemode_mismatch**  Test and live mode API keys, requests, and objects are only available within the mode they are in.

**missing**  Both a customer and mandate ID have been provided, but the mandate does not belong to the customer. To create a charge for a customer with a specified mandate, you must provide the valid customer or provide none.

**parameter_invalid_empty**  One or more required values were not provided. Make sure requests include all required parameters.

**parameter_invalid_integer**  One or more of the parameters requires an integer, but the values provided were a different type. Make sure that only supported values are provided for each attribute. Refer to our API documentation to look up the type of data each attribute supports.

**parameter_invalid_string_blank**  One or more values provided only included whitespace. Check the values in your request and update any that contain only whitespace.

**parameter_invalid_string_empty**  One or more required string values is empty. Make sure that string values contain at least one character.

**parameter_missing**  One or more required values are missing. Check our API documentation to see which values are required to create or modify the specified resource.

**parameter_unknown**  The request contains one or more unexpected parameters. Remove these and try again.

**processing_error**  An error occurred while processing the charge. Check the mandate details are correct or use a different mandate.

**resource_missing**  The ID provided is not valid. Either the resource does not exist, or an ID for a different resource has been provided.

**routing_number_invalid**  The bank IFSC number provided is invalid.

**secret_key_required**  The API key provided is a publishable key, but a secret key is required. Obtain your current API keys from the Dashboard and update your integration to use them.

**url_invalid**  The URL provided is invalid.



## Sample Code Snippets:
### Snippet:

#### Response:
```json
{"success":false,"message":"No Data found for the given path"}
```

