UQPAY uses conventional HTTP response codes to indicate the success or failure of an API request. Typically a status code in the 2xx range indicates success, status codes in the 4xx range indicate an error that has been triggered due to the information provided (for example; a parameter does not meet the validation requirements or was not provided), and status codes in the 5xx range indicate an error with our servers.
Code | Status | Description |
---|---|---|
200 | OK | The request was processed successfully. |
201 | Created | The request was processed successfully, and a new resource was created. |
400 | Bad Request | The request contains missing parameters, is in an incorrect shape, or failed another validation test. |
401 | Unauthorized | Please verify that the authentication token is provided and is valid. |
404 | Not Found | The requested endpoint does not exist. |
500 | Server Error | Something went wrong on our end; please let us know if you are receiving this error. |
When we send an error response, the body will generally contain the following fields:
Error Attributes
Field | Description |
---|---|
type | Type of error. |
code | Error code |
message | A human-readable message that describes the reason for this error. Note that the content of this message is not intended to be parsed, and the format of this message can change at any moment. |
Example 400 Error Response Body
{
"type" : "card_error",
"code" : "invalid_number",
"message" : "The card number is not a valid one."
}