Module Logging
We recommend you make use of the built in module logging functionality for WHMCS modules.
This makes debugging the external API calls your module makes follow the standardised pattern and makes it easier to debug.
Please refer to the URL below for more details on how to do this.
https://developers.whmcs.com/provisioning-modules/module-logging/