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

Scroll inside to view more
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.

Scroll inside to view more
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
Step 1.1 b
Error Codes
Last updated 1 year ago