This topic will explain how to set up prepaid billing integration using the SolusIO WHMCS VPS Provisioning module. Once prepaid billing integration is set up, customers receive the ability to place orders and receive SolusIO servers.

Step 1 – Install the SolusIO WHMCS VPS Provisioning module

  1. Download the latest version of SolusIO WHMCS VPS Provisioning module.
  2. Access the WHMCS server via SSH.
  3. Extract the solusiovps directory from the ZIP archive you downloaded in step 1 to /whmcs_root/modules/.

Step 2 – Generate an API token

  1. Log in to SolusIO under your administrator account.

  2. Go to Access > API Tokens tab and then click Generate API Token.

  3. Give your API token a name, select your administrator email, and then click Generate.

    image-token

  4. Click Copy & Close to copy the token and save it in a secure place. You will need the token later. You won’t see it in SolusIO anymore.

Step 3 – Add a server

  1. Log in to the WHMCS admin area.

  2. Go to Setup > Products/Services > Servers.

    image-create-server-1

  3. Click Add New Server.

    image-create-server-2

  4. Specify the server settings and then click Test Connection:

    • Under “Module”, select “SolusIO VPS”.
    • Specify the hostname or IP address of the SolusIO management server.
    • Keep the “Username” field empty or specify any username.
    • In the “Password” field, paste the API token you generated earlier.
    • Keep the “Access Hash” field empty.

    image-create-server-3

    If the server’s settings are correct and WHMCS can connect to the SolusIO management server, you will see the following success message:

    image-create-server-4

  5. You will see the page that has three sections (“Add Server”, “Nameservers, and “Server Details”). You need to specify only certain settings in the “Add Server” section:

    • In the “Name” field, specify your server name.
    • In the “Hostname” field, specify the hostname or IP address of the SolusIO management server.

    image-create-server-5

  6. Make sure that the settings in the “Server Details” section have been already auto-filled and then click Save Changes.

    image-create-server-6

You’ve added a server.

Step 4 – Create a server group

  1. Click Create New Group.

    image-create-server-group-1

  2. Specify the server group settings and then click Save Changes:

    • Give your server group a name.
    • Keep the “Add to the least full server” option.
    • In the “Selected Servers” box, add the server you created earlier.

    image-create-server-group-2

You’ve created a server group.

Step 5 – Create a product group

  1. Go to Setup > Products/Services > Products/Services.

    image-create-product-group-1

  2. Click Create a New Group.

    image-create-product-group-2

  3. Specify the group settings and then click Save Changes:

    • Specify the product group name. It’s the name that will be displayed for the group to you and your customers.
    • Select the order form template. It defines the design customers see when they want to place an order.
    • Keep the “PayPal Basic” checkbox selected.

    Note: There are other optional settings you can specify. Learn more about product group optional settings.

    image-create-product-group-3

You’ve created a product group.

Step 6 – Create a product

  1. Click Create a New Product.

    image-create-product-1

  2. Specify the product settings and then click Continue:

    • Select the “Server/VPS” product type.
    • Under “Product Group”, select the product group you created earlier (“SolusIO” in our example).
    • Give your product a name.
    • Under “Module”, select “SolusIO VPS”.
    • Turn off “Create as Hidden” to make the product visible to your customers.

    image-create-product-2

  3. Go to the “Module Settings” tab and select the module settings:

    • Under “Server Group”, select the server group you created earlier.
    • Under “Plan”, “Default Location”, and “Default Operating System”, select the SolusIO plan, location, and operating system correspondingly. When customers choose your product, they will get a SolusIO server with the plan, location, and operating system that you’ve selected.

    Note: If you want your customers to select plans, locations, and/or operating systems they want (among those created on the SolusIO management server), create corresponding configurable options.

    • (Optional) You can preconfigure servers created for customers. For example, you can create additional users or user groups in the system, run the desired commands at the first boot, and so on. To do so, fill in the “User Data” textbox. For reference, see cloud config examples.
    • Select how and when WHMCS will set up the product once customers order it. We recommend that you keep the “Do not automatically setup this product” option. Learn more about other options in the WHMCS documentation, the “Module Settings” section.

    image-create-product-3

  4. Once you’ve selected the necessary settings, click Save Changes.

You’ve created a product.

image-create-product-4

Congratulations! At this point, you’ve finished configuring SolusIO WHMCS VPS Provisioning module. Your customers can now create SolusIO servers in WHMCS.

However, customers will get servers with the plan, location, and operating system that you’ve selected for them. To give customers the ability to select the server settings (among those created on the SolusIO management server), create corresponding configurable options.

We’ll show you how to create a configurable option based on the example of operating systems. You create configurable options for locations and plans in a similar way. See more information on creating configurable options.

(Optional) Step 7 – Create a configurable option

  1. Go to Setup > Products/Services > Configurable Options.

    image-configurable-option-1

  2. Click Create a New Group.

  3. Give your group a name, select the product (the one you created earlier) to assign to the group, and then click Save Changes.

    image-configurable-option-2

  4. Click Add New Configurable Option. This will open a new browser window where you’ll specify the option settings.

  5. Give your option a name and select the option type (“Operating System” and “Dropdown” in our example).

  6. In the “Add Option” field, specify the option value following the pattern: OS_ID|OS_Name and then click Save Changes. In the mentioned pattern:

    • OS_ID is the actual ID of an OS image on the SolusIO management server. To see OS_ID,go to SolusIO (the admin area) > Images > Operating Systems and locate the IDs of the operating systems you want to add as a configurable option.
    • OS_Name is the OS name to be displayed in WHMCS.

    image-configurable-option-3

    In our example, we’re adding CentOS 8 (OS_ID 2) and Ubuntu 20.04 (OS_ID 7) as a configurable option.

    image-configurable-option-4

  7. Repeat the previous step as many times as many operating systems you want to offer. Once finished, click Close Window

    image-configurable-option-5

You’ve added a configurable option. Now, when customers choose your product, they will have a choice of operating systems for SolusIO servers.

image-configurable-option-6