API Error Handling and Status Codes

Payiano employs standard HTTP response codes as a means to communicate the outcome of API requests effectively. The HTTP response codes simplifies the process of understanding the outcome of API requests. It allows developers to quickly identify whether a request was successful, encountered client-side issues, or experienced server-related problems, facilitating effective error handling and troubleshooting.

Here's a breakdown of how these response codes are typically interpreted:

  • Response codes falling within the 2xx range signify a successful API request. These codes indicate that the requested operation was carried out without any issues.
  • Response codes in the 4xx range are indicative of errors that stem from the client-side of the request. These errors typically occur due to missing or incorrect information provided in the request. For example, it could be the omission of a required parameter or a failed payment transaction. In cases where a 4xx error occurs, Payiano often includes an error code that provides a brief explanation of the specific issue encountered. This information can be valuable for programmatic handling of errors.
  • Response codes within the 5xx range are uncommon and denote errors related to Payiano's servers. These errors are relatively rare and typically indicate technical issues on the service provider's side.
If you come across any errors that seem unclear, we encourage you to reach out to our support team. Our dedicated support staff is readily available to assist you in resolving any issues and addressing any questions or concerns you may have. Don't hesitate to get in touch with us, we're here to help ensure a smooth and productive experience with our services.

Check the following table to have an idea about the response codes returned by our system:

CodeMessageDescription
200OKThe request succeeded and everything worked as expected.
201CreatedA new resource was created as a result.
400Bad Request The server cannot or will not process the request due to something that is perceived, often due to missing a required parameter.
401UnauthorizedNo valid API authentication token provided.
403ForbiddenThe API authentication token doesn’t have permissions to perform the request.
404Not FoundThe requested resource doesn’t exist.
422Unprocessable Content The request was well-formed but was unable to be followed due to semantic errors. This usually happens with POST, PUT or PATCH actions.
429Too Many Requests Many requests were sent to the API rapidly. This rate limiting error occurred because the user sent an excessive number of requests within a specific time frame.
500Internal Server ErrorThe server has encountered a situation it does not know how to handle. This rarely happens.