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

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"
  }
}