Cannot create subscription in WHMCS. Malformed response from PPA

Symptoms

WHMCS displays the error when submitting the provisioning order:

An unexpected error has occurred during subscription creation: 'Malformed response from PPA. Please make sure the PPA management node is available and the IP address of your WHMCS server is added to the list of allowed networks for PPA API. You can check this at PPA > System > Settings > Public API'

The following message can be found in activity log of WHMCS (Utilities > Logs > Activity Log) at the same time the order was submitted: