Billing actions:

ResourceActionDescription
whmcs.phpget_clientGet customer information
whmcs.phpcreate_addfundsCreate add funds invoice
whmcs.phpgetpaymentgwGet information how to pay this invoice
whmcs.phpget_billing_dataThis call retrieve billing information for the server.

Whmcs/Get_client

HOSTKEY is using WHMCS as billing software.  With get_client you will have necessary customer data from billing. Important keys are in bold.


HTTP Method - POST


ParameterRequiredType Value/defaultDescription
action    *        stringget_client Main action - Get customer information
token      *        string              Your session token

curl -s "https://invapi.hostkey.com/whmcs.php" -X POST \
--data "action=get_client" \
--data "token=" \


Whmcs/Create_addfunds


HTTP Method - POST


ParameterRequiredType Value/defaultDescription
action   *        stringcreate_addfundst Main action - Create add funds invoice
amount *        int               Replenishment amount
token    *        string              Your session token

curl -s "https://invapi.hostkey.com/whmcs.php" -X POST \
--data "action=create_addfunds" \
--data "amount=" \
--data "token=" \


Whmcs/Getpaymentgw


HTTP Method - POST


ParameterRequiredType Value/defaultDescription
action   *        stringgetpaymentgw Main action - Get information how to pay this invoice
invoice_id *        int               Invoice id number
token    *        string              Your session token

curl -s "https://invapi.hostkey.com/whmcs.php" -X POST \
--data "action=getpaymentgw" \
--data "invoice_id=" \
--data "token=" \


In order to proceed with this invoice, you should show HTML from the "call" key to the customer. It contains all the necessary form data to proceed with payment. When customer's pay, it will increase account credit. You could check the actual credit amount with whmcs/get_client  call 

Whmcs/Get_billing_data


HTTP Method - POST


ParameterRequiredType Value/defaultDescription
action   *        string get_billing_data Main action - this call retrieve billing information for the server.
id *        int               Server token
token    *        string              Your access token

curl -s "https://invapi.hostkey.com/whmcs.php" -X POST \
--data "action=get_billing_data" \
--data "token=" \
--data "id=" \


Tags: