The ComputeStacks integration for WHMCS has multiple parts:
- WHMCS Addon Module
- A way to store settings unique to your deployment with WHMCS.
- WHMCS Provisioning Module
- Handles Creating, Terminating, Upgrading, Suspension, and Plan / QTY changes
- ComputeStacks direct API Integration
End-User Order Flow
When a new order is placed with ComputeStacks (new orders, and changes to existing services), an API call is made to WHMCS to setup the order and determine if any amount is owed.
If an invoice is generated with a balance, ComputeStacks will craft a signed URL that will allow the user to seamlessly move to the invoice screen within WHMCS as their user.
When a successful payment is received, a hook in WHMCS will craft a signed URL and send the user back to ComputeStacks. The normal provisioning module will actually tell ComputeStacks to proceed with the order.
- User Sync: When a user updates their name or email address, those settings are synced automatically.
- Single Sign On: Users can login using the same credentials (except for Administrators).
- Provisioning: WHMCS can trigger an order to be provisioned, terminate or suspend an account, and upgrade or downgrade a package.
- Container orders must initially be placed within ComputeStacks. They will be 'pending' until WHMCS confirms the order can proceed.
- WHMCS: v7.1+
- ComputeStacks: v4.0+
- Cancelling an order in WHMCS will delete the associated deployment, containers, and ALL data.
- If you set the WHMCS product module to "automatically setup the product as soon as the first payment is received", WHMCS will NOT automatically setup the products if an invoice is paid from credits. You will need to manually approve and run the Module Create command.
- Download and extract the WHMCS module into your WHMCS installation.
Navigate to Setup → Addon Modules. Activate and Configure the module using the settings provided by ComputeStacks
API Key / Secret: These are the unique API credentials for your ComputeStacks Admin account.
- Shared Secret: This is the key used to craft a signed URL to direct the user back to ComputeStacks after their invoice is paid.
- Access Control: It is recommended that you limit this to only your WHMCS administrators.
- Set all user fields as optional except First & Last Name:
- Setup → General Settings → Other → Optional Client Profile Fields
- Enable AuthAuth for your WHMCS installation using these instructions: http://docs.whmcs.com/AutoAuth
- Create a user called cstacks with full Admin privileges.
- This username is important as we include this in our WHMCS API calls.
- Create an Access Key as described here: https://developers.whmcs.com/api/access-control/
- Product Type: Hosting Account
- Hidden: true. The order process should be initiated from ComputeStacks, so set this to true to hide these products from your order form.
- Payment Type: Recurring
- Enable One Time / Monthly with a price of 0.00. Price will be determined by the configurable option later.
- Enable Prorated billing (optional).
- Keep in mind that some credit card processors require a minimum amount (Stripe is $0.30 for example), and will decline the transaction if it's less. If you enable this, please be sure to set an appropriate value for charge next month.
- Choose ComputeStacks as the Product Module, and configure the settings the match your business rules, and the product.
- Allow configurable options to be upgraded / downgraded
- Select the higher-tier product plans as upgrade options.
Navigate to Setup → Products/Services → Configurable Options
- Create a group for Each Product that was created in the previous step.
- For each group, create a Configurable Option of type Quantity.
- Call this option Container and set the price per container here.
- Set the minimum quantity to 1.
- Assign the newly created option group to the product package.