Do I need to create an endpoint?

Am I in the right direction?

Yes, and I’d also use the REST API if I were you.

I have tried following instructions but I always get error 404.

That is actually normal if the request method is not POST — e.g. using the browser to manually access/visit the endpoint at example.com/wp-json/real-estate-lite/v1/endpoint whereby the (HTTP) request method is (or defaults to) GET.

And why it’s normal is because the methods of your endpoint is set to POST only (i.e. 'methods' => 'POST'), hence all other request methods like GET are not allowed and therefore WordPress throws the error 404 when the endpoint is accessed through GET or another disallowed (HTTP) method.

So if for example you want GET method to be allowed, then set the methods to an array like so:

register_rest_route( 'real-estate-lite/v1', '/endpoint', array(
    'methods'  => [ 'POST', 'GET' ], // allowed request methods
    'callback' => 'my_awesome_func',
) );

/* The above code is equivalent to:
register_rest_route( 'real-estate-lite/v1', '/endpoint', array(
    // Endpoint 1, for POST request method.
    array(
        'methods'  => 'POST',
        'callback' => 'my_awesome_func',
    ),

    // Endpoint 2, for GET request method.
    array(
        'methods'  => 'GET',
        'callback' => 'my_awesome_func', // * the same callback
    ),
) );
*/

But of course, you wouldn’t want to do that in your case since the webhook is using the POST method to connect to your custom WordPress REST API endpoint. For testing purposes though, you can temporarily allow GET requests (and then just go to the endpoint using your browser).

And as you can see in the example, we can have two or more endpoints at a route, and each request method should have its own callback.

BTW, sorry for not really understanding your issue/question earlier. 🙂