API Reference

Errors

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.

CodeStatusDescription
200OKThe request was processed successfully.
201CreatedThe request was processed successfully, and a new resource was created.
400Bad RequestThe request contains missing parameters, is in an incorrect shape, or failed another validation test.
401UnauthorizedPlease verify that the authentication token is provided and is valid.
404Not FoundThe requested endpoint does not exist.
500Server ErrorSomething 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

FieldDescription
typeType of error.
codeError code
messageA 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."
}