invalid response from WSE API: array ( 'message' => 'REST API is not licensed', 'code' => '402', 'wowzaServer' => '4.8.17+1', 'success' => false, )
Error 402 is a message from Wowza that means Payment Required. Because this is a Wowza Licensing error you will need to contact Wowza support because the error is being sent by them.
We do have a guide for preparing files for Wowza support if they ask for them: https://www.mediacp.net/doc/admin-server-manual/troubleshooting/wowza-streaming-engine/#prepare-files-for-wowza-support-8