WHMCS integration is available only for 2Checkout accounts that handle their own tax and invoice management (2Sell and 2Subscribe accounts).
Perform the below set of instructions in your WHMCS account to integrate it with 2Checkout.
- Sign in to your WHMCS admin.
- Navigate to the payment gateway configuration page and enable 2Checkout.
- Enter your 2Checkout Account Number (SID).
- Enter the INS Secret Word from the 2Checkout Merchant Control Panel. After logging in to your 2Checkout account, navigate to Control Panel: → Integrations → Webhooks & API → Secret Word → INS Secret word.
- Your INS secret word should be the same as your buy-link secret word (found under Dashboard → Integrations → Webhooks & API, scroll down to the Secret Word area, as shown in the image below). Edit your INS secret word and buy-link secret word to match each other, then copy and paste them into the WHMCS admin.
- Enter your API username and password (an additional user that you set up in your 2Checkout account). The API username will require both “API Access” and “API Updating” permissions. Check this article to learn how to create API roles.
- Disable the “Add Funds” option.
- Navigate to Setup → General Settings → Credit, and un-tick the “Enable” box.
Since WHMCS does not support special characters, but only letters (a-z) and digits, you can use a code generator to obtain a Secret Word that needs to be saved both in the 2checkout Control Panel and the WHMCS admin.
Follow the below instructions in your 2Checkout Control Panel to finalize the WHMCS integration process.
- Sign in to your 2Checkout account.
- Navigate to Dashboard → Integrations → Webhooks & API section
- Follow these steps to activate Redirect URL:
- In the Redirect URL section check “Enable return after sale”
- For the Return method, select Header Redirect (for both Standard and Inline checkout)
- Set the Approved URL to http://www.yourdomain.com/whmcs/modu.../2checkout.php (Replace http://yourdomain.com with the actual URL to your domain)
- Save settings
- In the Webhooks and API section, under the Instant Notification Service (INS) card, check the Enable Global URL box.
- Enter http://www.yourdomain.com/whmcs/modu...llback/tco.php as the global endpoint URL.
- Save your changes.
Make sure the plugin installation is made as per the path described by the directory names in the URL endpoint above. The installation of the plug-in in the root directory will result in a communication mismatch.
Test orders via WHMCS
You can place test orders when using the WHMCS connector by following these steps:
1. Log into your WHMCS account and select the checkbox shown in the image below.
2. Since this is an account set-up, the selection will apply to all your orders, so all your orders will be test orders. When you are ready to start transacting real orders, simply uncheck this box.
WHMCS is an all-in-one client management, billing & support solution for online businesses. Handling everything from signup to termination, WHMCS is a powerful business automation tool that puts you firmly in control.
For more information visit: WHMCS.com