Learn WHMCS

WHMCS is the top web host billing and support automation tool used by thousands of customers across the globe!

• Last Updated: 05/10/2024
• ( 15 minutes reading )

How to add payment gateways in WHMCS

Introduction

Payment gateways are essential to any online business these days. Without them, website owners would need to apply very harsh security settings on their hosting servers to enable credit card processing. To explain why this is, let's first introduce you to what a Payment Gateway is.

 

A payment gateway is a platform through which your clients will transfer money to you in exchange for a specific service or product. It serves as the "bridge" between you and your customer's bank/credit institution. The Gateway is also a mediator and tracks for any unclarities with the transaction using various security implementations, such as Fraud Protection, 3D passwords, and different authentication methods. People use them in their everyday life without even knowing it. PayPal, Stripe, Apple Pay, and Amazon Pay are good examples of payment gateways.

 

Now that we know what Payment Gateways are let's continue with this tutorial and explain how you can integrate them into your WHMCS and enable safe credit card processing for your customers.

Getting Started

Before proceeding with the Payment Gateway integration, you must log inside your WHMCS admin area. Once logged in, please hover your mouse over the wrench icon on the top right side of the screen. Once you do that, you will see a drop-down menu with a few options. Please click on the "System Settings" option.

 

system-settings

 

Doing so will redirect you to the "System Settings" page, where you will find a variety of settings related to WHMCS. Please use the search bar on the left side of the screen and type in "Payment Gateways" to filter out available functionalities and find the one you need to proceed with the integration.

 

payment-gateways

 

Once this option presents itself, please click the "Payment Gateways" option.

 

After doing so, you will be redirected to the "Payment Gateway" integration page. From there, you can choose which payment gateway to integrate, and WHMCS will provide you with the means to do so.

 

To begin your selection, please click on the "-> Visit Apps and Integrations" button located on the top right side of the screen.

 

apps-and-integrations

 

Performing this action will redirect you to the "Apps & Integrations" page, revealing all the Payment Gateway settings. 

 

On the top, you will see WHMCS's recommended options. You will find many other options underneath, as WHMCS has APIs and integration options for anything you can think of.

 

recommended-apps

 

However, we suggest using the recommended options, as they are regarded as very reputable gateways, and customers will feel safer when making purchases. In addition, their integrations will likely be much easier for you as a service provider. 

 

This tutorial will show the integration method for PayPal and Stripe, which are recommended and the most common choice for any service provider.

 

PayPal

 

PayPal is a payment gateway allowing you to safely and securely receive customers' money for your digital/physical products.

 

Customers have to link their bank accounts and credit/debit cards to their PayPal account to use it. In turn, PayPal will serve as the middleman between you (the merchant/vendor) and their bank institution, allowing them to securely transfer money for digital/physical products.

 

To start the PayPal payment gateway integration, please return to the "Payment Gateway" integration page. You should be able to do so by clicking your browser's "Go Back" button.

 

go-back

 

Once there, you will see the "PayPal Basic" drop-down menu.

 

paypal-drop-down

 

Please click on it to reveal all settings allowing you to integrate it on your order form. Let's go through all the configurations and explain them for better understanding.

 

  • Show on Order Form -  Please tick this checkbox to enable the PayPal payment gateway on your order form.
  • Display Name - Please use this text field to type in your PayPal Display name. This text field is optional.
  • PayPal Email - Please use this text field to enter your PayPal email address. This text field is required.
  • Force One-Time Payments - Please check this tickbox to prevent subscriptions from your customers and only allow one-time payments from PayPal. 
  • Force Subscriptions  - Please tick this checkbox to enable only subscriptions and disable one-time payments for your customers. These payments will occur automatically each month, and the customer won't need to submit them manually. For this to work, you need to disable the above setting.
  • Require Shipping Address - Please check this tickbox to oblige customers to enter a shipping address on the PayPal website. This option could be useful if you are selling physical products and also enables PayPal's Seller Protection.
  • Client Address Matching - Please tick this checkbox to enable WHMCS to cross-reference the address provided during the registration with the address the customer added in PayPal. You can enable this for additional security.
  • API Username - Please use this text field to enter your PayPal API username. You can fetch these from Tools -> All Tools -> API Credentials in your PayPal Business dashboard.
  • API Password - Please use this text field to enter your PayPal API password. You can locate this in Tools -> All Tools -> API Credentials in your PayPal Business dashboard.
  • API Signature Please use this text field to enter your PayPal API signature. You can get this from Tools -> All Tools -> API Credentials in your PayPal Business dashboard.

 

IMPORTANT: If you do not type in the API credentials, you will not be able to manage refunds, subscription cancellations, and account balances from WHMCS and will have to log inside PayPal to do so.

 

  • Sandbox Mode - Please enable this checkbox if you want to use PayPal's virtual sandbox test environment. Test mode allows you to simulate payments without actually generating a transaction in the process. Please note that to use this, you must create a PayPal SandBox account from this link

 

IMPORTANT: To ensure all invoices are marked paid immediately after the payment transaction, please enable Instant Payment Notification (IPN) under "Selling Preferences" within your PayPal account.

 

Once you input all the required settings and are satisfied with them, please click the "Save Changes" button at the bottom of the drop-down menu.

 

paypal-settings

 

If you want to deactivate the module entirely, you can click on the "Deactivate" button located on the right side of the "Save Changes" button.

 

Stripe

 

The second gateway integration we will go through is the Stripe payment gateway integration. 

 

Stripe is an online payment system allowing clients to transfer funds for digital/physical goods vendors/retailers offer on their websites. They provide a safe and secure environment and mediate the transaction between the customer and the seller.

 

Their task is to ensure that the transaction is performed accordingly and both sides are satisfied - the client for receiving their desired product and the vendor for receiving the payment.

 

To set up Stripe on your WHMCS, please proceed and open the "Payment Gateway" integration page. To do that, please use the steps explained earlier in this tutorial.

 

Once there, please click on the "-> Visit Apps and Integrations" button located on the top right side of the screen. 

 

Doing so will redirect you to the "Apps and Integrations " page. You will see the "Recommended Apps" in the middle of the screen. Please click on the "Stripe" content box to start the Stripe integration. 

 

stripe-app

 

This action will open a pop-up window, and you will see the "Activate" button on the right side of the window. Please click on it.

 

stripe-popup

 

After a brief loading screen, you will be redirected to the "Payment Gateways" page, and you will see the Stripe drop-down window expanded with all the available settings revealed.

 

Let's go over all the available options.

 

  • Show on Order Form - Please check this tickbox to show the Stripe payment option on your order form.
  • Display Name - Please use this text field to type in your PayPal Display name. This text field is optional.
  • Stripe Publishable API Key - Please use this text field to type in your Stripe Publishable API key. This key will identify your website in front of Stripe during communications with the Gateway. You can get this API key from your Stripe account.
  • Stripe Secret API Key - Please use this text field to type in your Stripe Secret API Key. Doing so will ensure the communications between your site and Stripe are validated.
  • Statement Descriptor Suffix - Please use this text field to type in your invoice statement descriptors. Doing so will reduce the chance of customers submitting chargebacks and disputes, as the statement descriptor will contain specific information your bank needs to validate the transaction.
  • Stripe WebHook Endpoint Secret - Please use these textfields to type in the Stripe WebHook endpoint secret. We recommend leaving this field empty, as in WHMCS version 8.0, they will be auto-generated.
  • Stripe WebHook Endpoint Secret (Test/Sandbox) - Please use these textfields to type in the Stripe WebHook endpoint secret. We recommend leaving this field empty, as in WHMCS version 8.0, they will be auto-generated.
  • Allow Payment Request Buttons - Please use this checkbox to enable/disable Payment Request buttons. This option will allow customers to use platform-specific payment options, such as ApplePay or GooglePay.

 

Once you input all the required settings and are satisfied with them, please click the "Save Changes" button at the bottom of the drop-down menu. 

 

stripe-settings

 

If you want to deactivate the module entirely, you can click on the "Deactivate" button located on the right side of the "Save Changes" button.

Conclusion

This covers our Payment Gateway integration tutorial for WHMCS. We hope this was useful and you were able to set up your payment gateways without any issues. If you enjoyed this tutorial, check the other articles in our WHMCS tutorial section!

...
Nikola Zgurev
Technical Support Captain

Nikola is an accomplished tech-savvy extraordinaire with over six years of experience in the web hosting field. He started as a customer care representative and quickly rose the ranks to become a support supervisor and, eventually - the head of the technical department in HostArmada. His deep understanding of the client's needs, combined with his technical knowledge, makes him the perfect man to create the ideal harmony between client satisfaction and professional problem-solving. You will often find him creating helpful tutorials, articles, and blog posts that help existing customers get around.

Learn more about WHMCS in the other tutorials that we have: