Get Started
Errors
PaySway uses standard HTTP response status codes to indicate the success or failure of an API request.
- Status codes in the
2xx
range indicate success. - Status codes in the
4xx
range indicate a failure given the information provided. - Status codes in the
5xx
range indicate an error with the PaySway servers (shouldn’t normally happen).
Error response
In case of 4xx
or 5xx
response status codes, PaySway will provide an error payload containing the code and message that briefly explain the error.
A unique error code representing the specific error. See the error codes section below for possible values.
A human-readable message providing details about the error. This message is intended for developers and may contain technical information.
Error codes
Request errors
Error code | Error description |
---|---|
BAD_REQUEST | Invalid or badly formatted request. |
NOT_FOUND | The requested resource was not found. |
UNEXPECTED_ERROR | Oops! Something went wrong in processing your request. Please contact support. |
JSON errors
Error code | Error description |
---|---|
JSON_PAYLOAD_MALFORMED | The JSON payload is not valid or well-formed. |
JSON_PAYLOAD_MISSING_REQUIRED_FIELD | A required field is missing from the JSON payload. |
JSON_PAYLOAD_INVALID_ENUM_VALUE | An invalid value was provided for an enum field in the JSON payload. |
Authentication errors
Error code | Error description |
---|---|
AUTH_UNSUPPORTED_GRANT_TYPE | The specified grant_type is not supported. |
AUTH_MISSING_CLIENT_CREDENTIALS | Client credentials are missing. |
AUTH_INVALID_CLIENT_CREDENTIALS | Provided client credentials are invalid. |
AUTH_TOO_MANY_REQUESTS | Too many authentication attempts. Please try again later. |
AUTH_TOKEN_NOT_FOUND | Auth token header not found. Obtain an auth token first. |
AUTH_TOKEN_INVALID | Provided token is expired, malformed, or invalid for other reasons. |
Webhook errors
Error code | Error description |
---|---|
WEBHOOK_SUBSCRIPTIONS_LIMIT_REACHED | The maximum number of webhook subscriptions has been reached. |
WEBHOOK_ENDPOINT_URL_INVALID | The provided webhook endpoint URL is invalid or unreachable. |