Skip to main content

HTTP Status Codes

HTTP Status Codes

This section provides an overview of the HTTP status codes returned by the API.
These codes indicate whether a request was successfully processed or if an error occurred.

Understanding these responses is essential for implementing proper error handling and ensuring reliable communication with the PaysafeCard API.

Status Codes

CodeShort DescriptionDescription
200OKThe request was successfully processed.
201CreatedThe resource was successfully created.
400Bad RequestThe request contains invalid or malformed data.
401UnauthorizedThe request could not be authenticated (e.g. invalid or expired API key).
404Not FoundThe requested resource or feature is not available (e.g. cashout feature disabled).
500Internal Server ErrorAn unexpected error occurred on the PaysafeCard side.
501Not ImplementedThe requested functionality or API version is not supported.
502Bad GatewayAn invalid response was received from an upstream system.
503Service UnavailableThe service is temporarily unavailable (e.g. due to high load).
504Gateway TimeoutThe upstream system did not respond within the expected timeframe.

Example: Error Response

The following example illustrates a typical error response for an invalid request:

400 Bad Request

{
"code": "invalid_request_parameter",
"message": "Correlation-ID is invalid: 'test123!'",
"number": 10028,
"param": "Correlation-ID"
}