public function makeRequest($url, $method = 'GET', $data = [], $headers = [])
    {
        //we cant send to the API the array with get GET, JSON, form_params parameters
        //the API doesnt get it taht way, guzzle sends it directly
        //so we extract it
        $rawData = count(array_keys($data)) > 0 ?  $data[array_keys($data)[0]] : [];


        $client = (new ClientSecurity($this->apiPublicKey, $this->apiPrivateKey, $rawData, $headers))->getGuzzle();

        $parse = function ($error) {
            if ($error->hasResponse()) {
                return $error->getResponse();
            }

            return json_decode($error->getMessage());
        };

        try {
            return $client->request($method, $url, $data);
        } catch (\GuzzleHttp\Exception\BadResponseException $error) {
            return $parse($error);
        } catch (\GuzzleHttp\Exception\ClientException $error) {
            return $parse($error);
        } catch (\GuzzleHttp\Exception\ConnectException $error) {
            return $parse($error);
        } catch (\GuzzleHttp\Exception\RequestException $error) {
            return $parse($error);
        }
    }