Make an Ajax call to plug-in controller
You need to define a route via action param otherwise Craft has no idea where to route the request. Your data variable only only contains

data = [
    'test' =&gt; 'test',
    TOKEN_NAME =&gt; TOKEN_VALUE
]


and nothing else

You need to include action =&gt; plugin-handle/controller-id/function-name

You can see a working example at basic ajax how to