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.
type
string
Every error includes a type. We have 4 possible values api_error, authentication_error, idempotency_error, or invalid_request_error
These are unexpected errors from our end.
Authentication error has to do with your API keys or the Bearer authentication scheme not passed correctly
Another request with same idempotency key is still processing
Your request include incorrect or invalid parameters
code
string
This is a more specific error code that summarises the error. Can be implemented or caught in your code for specific error handling.
message
string
A detailed human-readable message providing information about the error.

Example error response

{
  "error": {
    "type": "authentication_error",
    "code": "request_signature_invalid",
    "message": "Authorization failed, invalid signature"
  }
}