WHMCS Square Gateway

WHMCS Square Gateway

Developed By Best PHP Scripts

Compatible with WHMCS v7.8

Now Introducing the Square Gateway Module for WHMCS

This WHMCS module will allow you to integrate Square with WHMCS. By enabling the module, you will be able to select Square Gateway in WHMCS, and will need to enter your developer API credentials, which can be requested for free from https://squareup.com/us/en/developers

Upon purchase, you will receive the square gateway files. Simply put everything as required into the modules file, although square.tpl will go into your WHMCS template folder. You will edit license_key.php, and replace your license key with the YOUR LICENSE KEY HERE. This will successfully validate your license key. IF you do not enter your license key, the form will not show, as your license would not show valid.

Upon validation, and inputting your API credentials, you will be able to select your Square Store Location, and will be able to officially take payments through the gateway. There is a SANDBOX mode with SANDBOX Credentials, so you will be able to TEST the module before accepting official payments through square.

It is also important to note, that a legal WHMCS license is required. If you are found with an INVALID WHMCS license, we will suspend your license for the use of the gateway.

An Installation Service is offered for purchase for assistance with installing the module!

New Licensing Structure allows for Monthly and Owned Licenses, along with changes in support & updates duration and pricing!

Next, we plan to implement recurring billing! Let us know any questions, comments, concerns, or suggestions you may have!



5 stars
4 stars
3 stars
2 stars
1 star

Kamlesh @kamlesh2747

October 18, 2019 at 05:33:45 AM

No comment provided.

  • 17 hours ago

Steven Dey @steven6394

October 2, 2019 at 03:01:48 AM

No comment provided.

  • 2 weeks ago

Bhagwan Sahane @Logicmaker

September 15, 2019 at 11:44:07 AM

I think this module is no more updated with recent API updates and also not compatible with SCA requirements.
Might be @mfoland is not aware of this updates from payment gateway.

Let us know if anyone wants help regarding the same.

- Logicmaker

Nicholas Sansom @nicholas6920

September 18, 2019 at 03:36:50 AM

Hi Bhagwan,

Thanks for your reply. I am pleased to inform you that we are actually in the process of revamping and enhancing our version of Square Gateway, and in fact we intend to soon offer two versions of this module. V1 - Single payments and V2 - Single and Recurring payments.

Please stay tuned for our next release.

Kindest Regards,

Owner@Best PHP Scripts  
  • 1 month ago

Ian Turner @ian7070

June 16, 2019 at 05:02:23 AM

I have been looking for a Square payment gateway for a long time and finally, BestPHP Scripts has built one. I started off with the trial and was so happy with it, I purchased the full license right away. I was having some issues with my WHMCS (not related to this module), and Michael from BestPHP Scripts went above and beyond to help me so I could get things working properly and get my square payment gateway setup. Top-notch product & support. I highly recommend this module to anyone who accepts square payments. Well worth the money.

Michael Foland @michael5932

August 5, 2019 at 07:34:14 PM

Hello Ian,

Thank you SO MUCH for your review! We really appreciate it, and we are planning some new updates as well! Let us know if you have any issues or suggestions :)


Owner@Best PHP Scripts  
  • 4 months ago
  • Version Number 1.0.5

Charles Yarbrough @WebHostPro

February 22, 2019 at 07:13:03 AM

I just added this and was able to take a payments right away. Works perfectly and looks great in my checkout. I had no idea how cool Square was. Glad I did it.

Michael Foland @michael5932

February 22, 2019 at 07:15:52 AM


Thank you so much for your review! If you have any suggestions, etc, you are more than welcome to send us an email! Enjoy :)

Owner@Best PHP Scripts  
  • 7 months ago
  • Version Number 1.0.1

Bryan Alderson @bryan4633

February 14, 2019 at 07:15:46 PM

The payment gateway I've been waiting for. I'd nearly given up on Square integration when I couldn't even get a pre-sales response from the other Square gateway vendor.

The team from Best PHP Scripts went above and beyond to ensure my Square integration was up and running with the minimum of fuss.

Great responsive support I couldn't have asked for more.

Cannot recommend the team at Best PHP Scripts enough!

Michael Foland @michael5932

February 15, 2019 at 01:44:55 AM


Thank you so much for your review! We're glad to help!

Owner@Best PHP Scripts  
  • 8 months ago
  • Version Number 1.0.0

Version Compatibility

Compatible with WHMCS v7.8

Full Version Compatibility

  • All versions of WHMCS v7.8
  • All versions of WHMCS v7.7
  • All versions of WHMCS v7.6
  • All versions of WHMCS v7.5
  • All versions of WHMCS v7.4
  • Selected versions of WHMCS v7.3
  • All versions of WHMCS v7.2
  • All versions of WHMCS v7.1
  • All versions of WHMCS v7.0

System Requirements

  • PHP 5 +
  • Valid WHMCS License
  • Square Account - https://squareup.com/us/en

* Requirements listed are in addition to the WHMCS default system requirements.

Support for this product

The best place to start if you need help with a specific product is to contact the developer. All WHMCS Marketplace developers have both a website and support URL listed.

Developed By Best PHP Scripts


v1.0.7 Released September 13th, 2019

Latest Version

Version 1.0.7 Changes

  • Fix Licensing Server to new location
  • Fix Currency to show correct Currency, and send new Currency to the gateway.


  • Support for Recurring Payments (Will create a save card while waiting on API)
  • Overhaul the API
  • Move Licensing to a Module
  • Allow WHMCS to use Attempt Capture (Depending on API)


Previous Versions

v1.0.6 Released September 6th, 2019

View/hide detailed changelog

Version 1.0.6 Changes

  • Remove the requirements for smarty php tags to be required by creating a single .tpl file which links into the php files to control the operations of square.
  • Move License to a folder to control licensing
  • Move License Key input into WHMCS Admin
  • Remove the need for the $installDir tag, which is now automatically detected.
  • Allow Custom Branding to be added (requires Branding Addon)
  • Add Notification for new version if client has Support & Updates Package
  • Add to Instructions Sandobx requires the use of Legacy Key in Developer Mode.


  • Support for Recurring Payments (Will create a save card while waiting on API)
  • Overhaul the API


v1.0.5 Released May 23rd, 2019

View/hide detailed changelog

Version 1.0.5 Changes

  • Addition of onclick event to disable submit button once pressed to prevent double charges
  • Update instructions to note that currency code and country code can be changed as needed if conversion somehow fails in WHMCS.


v1.0.4 Released May 6th, 2019

View/hide detailed changelog

Version 1.0.4 Changes

  • Cleanup index.php and process-card.php
  • Continued to test using unique id for idempotency issues discussed in Version 1.0.3 -- RESOLVED
  • Repair process-card.php - Customers were receiving 500 errors after submitting CC details. Fixed PHP versioning issues/ directory file naming bugs.


v1.0.3 Released May 2nd, 2019

View/hide detailed changelog

Version 1.0.3 Changes

  • Idempotency Key changed from string to unique id.

The idem key was not correctly changing the key each time, and was allowing transactions to fail. With this change, when you refresh the invoice the key will change, thus allowing the charge to go through correctly. The idem key does prevent duplicate charges! Those that download a 30 day trial, or have an Owned License and have a VALID Updates Subscription will be able to receive this update!

For those with a current license, make sure you do not replace license-key.php as it will override your license and you will need to re-add the license key. You also do not need to update square.tpl to your template directory.


v1.0.2 Released March 12th, 2019

View/hide detailed changelog

Hotfixes to fix the following:

  • License Validation Structure
  • Directory Structure for WHMCS installs not in a root folder. You will be able to edit square.tpl to specify your folder name
  • Hot Fix to allow below PHP 7. This will also work with lower versions of the IonCube Loader as well.


v1.0.1 Released February 20th, 2019

View/hide detailed changelog


  • process-card.php was giving a corrupt error with IonCube. After reviewing the code, comment styles have been fixed, and this version fixes the corrupt file issue. If you have any issues, please contact us, and we'll be glad to assist!


v1.0.0 Released February 2nd, 2019

View/hide detailed changelog

Initial Release


See also

Stripe Gateway for WHMCS

This module provides support for the Stripe payment gateway for use with WHMCS.

Paypal No Fees Gateway

Transfer the paypal fees to your customer

Accept Bitcoin and 50+ Cryptocurrencies - CoinGate for WHMCS

Easily accept Bitcoin, Litecoin, Ether and many other altcoins on your WHMCS website

WHMCS Bitcoin Payments

Accept Bitcoin payments on your website

Payu Biz WHMCS Module

Integrate easy and secure payments platform Payu Biz way in a few steps.