Predefined Application

Navigation:  Billing Integration (Supported Systems) > Billing API >

Predefined Application

Previous pageReturn to chapter overviewNext page

The logic of interaction between KuberDock and billing system, implemented to start predefined application, is as follows:


When a user clicks Order now on Start predefined application page, she is redirected to the script specified in KuberDock settings (see Administration -> Predefined application section of the present manual). Script uses application YAML file with data specified by a user and the information that is needed for predefined application billing.


For example in WHMCS:"data_from_YAML_here"


cart.php script has to receive data from yaml=”data_from_YAML_here” parameter and form invoice according to this data.


Here is an example of YAML file which starts Wordpress and MySQL in one pod (predefined application cost is defined by fields in bold):


After purchase succeeded, a request for adding a user and starting predefined application should be sent to KuberDock. KuberDock WHMCS plugin will do it automatically, for other billing systems perform the following steps:

(Note that packages and Kube Types should be created in the billing system and in KuberDock according to the instructions for package and Kube Type).

Send request for creating a user according to the Requests for working with users section.

Send request for creating a predefined application and save response to POD_ID request for the further work:

POST /api/yamlapi


'data' => data_from_YAML_file

Send request for acquiring user authorization token according to the instructions.

Readdress user to the following link:

http://kubedock.master?token=user_token&next=pods/POD_ID, where:

kuberdock.master - KuberDock master server domain or IP address;

user_token - acquired user authorization token;

pod_id - acquired ID of a created pod after adding a predefined application.