public function cancelSubscription($subscriptionID, $cancelReason) {
    if ($subscriptionID != null && is_numeric($subscriptionID) && isset($cancelReason) && is_numeric($cancelReason)) {
      $url = $this->url . str_replace(":subscriptionID", $subscriptionID, Connect2PayClient::$API_ROUTES['SUB_CANCEL']);
      $trans = array();
      $trans['apiVersion'] = $this->apiVersion;
      $trans['cancelReason'] = intval($cancelReason);

      $result = $this->doPost($url, json_encode($trans));

      if ($result != null && is_array($result)) {
        $this->clientErrorMessage = $result['message'];
        return $result['code'];
      }
    } else {
      $this->clientErrorMessage = 'subscriptionID and cancelReason must be not null and numeric';
    }

    return null;
  }