Implement a webhook endpoint into a plugin

you can create a new API route like that :

add_action("rest_api_init", function () {
    
    register_rest_route(
          "test_api"
        , "reading_http_json"
        , [
            "methods" => WP_REST_Server::EDITABLE, // POST PUT PATCH
            "callback" => function (WP_REST_Request $request) {
                
                $body = file_get_contents("php://input");
                
                $json = json_decode($body, TRUE);
                
                
                // here you have data in the array $json
                
                
                
                return NULL;
                
            },
            "permission_callback" => fn (WP_REST_Request $request) => TRUE,
        ]
    );
    
    
});

You give the url https://server/wp_directory/wp-json/test_api/reading_http_json in their portal and then you receive the data in the array $json.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)