Accept secure Square payments in WHMCS with hosted checkout, automatic currency conversion, webhook reconciliation, refunds, and Sandbox support.
The module creates a Square-hosted payment page for each eligible invoice and can make supported payment options available according to the merchant’s Square account, country, currency, browser, and customer device. Depending on Square eligibility, payment methods may include cards, Apple Pay, Google Pay, Cash App Pay, and Afterpay/Clearpay.
If your WHMCS invoice currency differs from the currency configured for your Square location, the gateway can automatically convert the amount before payment. Customers are shown the original invoice total, converted charge amount, applied exchange rate, and any configured FX adjustment. Conversion quotes are protected by a signed, time-limited token to help prevent amount manipulation.
Secure webhooks reconcile completed Square transactions with WHMCS, validate payment details, prevent duplicate processing, and automatically mark the correct invoice as paid. The module also supports full and partial refunds from WHMCS, reusable hosted payment links, deterministic idempotency, Sandbox testing, and production processing.
Redirect customers to a secure Square-hosted payment page to complete their invoice payment.
Benefits include:
Depending on merchant eligibility and Square availability, hosted checkout can support:
Administrators can individually enable or disable supported payment methods.
Availability depends on the Square seller account, country, currency, customer browser, device, and Square’s eligibility requirements.
Allow customers to pay invoices even when the WHMCS invoice currency differs from the Square location currency.
The module can:
Choose between two supported currency-rate providers:
Apply an optional percentage adjustment to converted payments.
0% for no gateway markupBefore recording a payment, the module validates important transaction information, including:
Only valid payments are added to the relevant WHMCS invoice.
After Square confirms a successful payment, the module:
Square webhooks provide reliable payment reconciliation.
The gateway includes:
The module generates deterministic idempotency keys for hosted payments, embedded transaction processing, and refunds.
This helps prevent:
When a matching pending payment link already exists for the same invoice, amount, and currency, the module can reuse it instead of creating unnecessary duplicate Square checkout links.
Process refunds through the standard WHMCS gateway refund function.
Supported capabilities include:
When the original payment was converted, the refund amount is calculated using the stored transaction exchange rate.
Test the gateway safely before accepting real payments.
When currency conversion is required, customers can see:
This improves transparency and helps reduce confusion during international payments.
Administrators can configure:
The required database tables are created automatically:
mod_squareup_transactionsmod_squareup_eventsThese tables store transaction mappings, payment links, conversion data, payment status, idempotency keys, and processed webhook events.
The gateway records errors through the WHMCS gateway log while showing customers a controlled payment error.
A temporary diagnostic option can display detailed Square or exchange-rate errors during configuration and testing. This option should be disabled in production.
Key BenefitsThe Square Payment Gateway for WHMCS is suitable for:
The inspected package includes configuration fields for:
Use the following webhook format:
<https://YOUR-DOMAIN/modules/gateways/callback/squareup.php>
Subscribe to:
payment.createdpayment.updatedThe configured URL must exactly match the HTTPS webhook URL used by the module because the complete URL is included in Square’s webhook signature verification.
Installation OverviewNo. Payment information is securely processed by Square, and the module does not enable local WHMCS credit-card storage.
Yes. If enabled, the module converts the invoice amount into the currency configured for the Square location.
The package supports Frankfurter and ExchangeRate-API.
Yes. Full and partial refunds can be submitted through the WHMCS gateway refund function.
Yes. The module can connect to the Square Sandbox before production credentials are used.
Square sends a signed webhook. The module verifies the signature, transaction, amount, currency, location, invoice, and duplicate status before recording the payment.
No. Availability depends on the seller country, Square account, transaction currency, browser, customer device, and Square eligibility.
Yes, when automatic conversion is enabled and the selected exchange-rate provider supports the required currency pair.
Create and manage accounts automatically.
Works with cPanel, Plesk and DirectAdmin.
Built-in guardrails for suspensions and upgrades.
Encourage customers to use preferred payment methods by automatically offering percentage-based or fixed discounts in WHMCS. Create targeted discount rules, configure multiple pricing tiers, control eligibility, schedule campaigns, and display responsive checkout badges—all without modifying your checkout templates.
Take complete control of payment gateway charges in WHMCS with Payment Gateway Fees Pro. This advanced WHMCS addon automatically applies fixed, percentage-based, or combined payment fees according to the gateway selected by the customer.