Developer

Errors

KEYZY uses conventional HTTP response codes to indicate the success or failure of an API request. In general: Codes in the 2xx range indicate success. Codes in the 4xx range indicate an error that failed given the information provided (e.g., a required parameter was omitted, a charge failed, etc.). Codes in the 5xx range indicate an error with Stripe's servers (these are rare).

KEYZY will respond with the following messages in case of errors in the endpoint request.

  • If the app_id or the api_key is wrong.

    {
        "error": {
            "message": "You are not authorized!",
            "status_code": 401
        }
    }
  • If the SKU number is wrong.

    {
        "error": {
            "message": "Sku does not exist!",
            "status_code": 404
        }
    }
  • If you have not generated, or if you do not have any available licenses remaining for the SKU.

    {
        "error": {
            "message": "You do not have any free licenses for this sku. Please generate new licenses for this sku!",
            "status_code": 403
        }
    }
  • When validating, if the product code is wrong.

    {
        "error": {
            "message": "Product does not exist!",
            "status_code": 404
        }
    }
  • When validating, if the serial number in the endpoint request is not correct, or is already registered.

    {
        "error": {
            "message": "Serial does not exist or registered!",
            "status_code": 404
        }
    }