Stripe Checkout WHMCS Module
This documentation covers installation, configuration, webhooks, pricing options, and operations for the Stripe Checkout WHMCS Module. Use the sidebar to jump between topics.
Order Link
Support
System Requirements
WHMCS
- WHMCS 8.0 and later (8.10, 8.11, 8.13, and WHMCS 9 supported)
PHP
- PHP 7.4 or later (7.4, 8.1, 8.2, 8.3 supported)
- Earlier versions are not supported due to security and Stripe API compatibility
ionCube Loader (minimum versions)
| PHP Version | Minimum ionCube Loader |
|---|---|
| 7.4 | 14+ |
| 8.1 | 14+ |
| 8.2 | 14+ |
| 8.3 | 14+ |
Installation
- Download the ZIP file containing the gateway and callback files.
-
Extract the ZIP directly into
/modules/gateways/This places
stripecheckout.phpinto/modules/gateways/,stripecheckoutcallback.phpinto/modules/gateways/callback/, and thestripecheckout/folder (containing license verification, module metadata, and logo) into/modules/gateways/stripecheckout/
Configuration
Step 1: Enable gateway in WHMCS
- Log in to WHMCS Admin → Configuration → System Settings → Payment Gateways.
- Click Visit Apps & Integrations and locate StripeCheckout.
- Click Activate next to StripeCheckout.
Step 2: Fill configuration fields
- License Key — Enter the license key provided upon purchase of this module. The license status (Active, Expired, Suspended, or Invalid) is displayed alongside a Recheck button.
- Publishable Key — Your Stripe Publishable Key (begins with
pk_liveorpk_test). - Restricted Key — Your Stripe Restricted Key used for server-side API calls (creating checkout sessions, processing refunds).
- Webhook Secret — Your Stripe Webhook Secret for verifying webhook signatures.
- Custom Pay Button Text — Change the checkout button label (e.g., “Pay Securely”, “Checkout with Stripe”). Defaults to Pay Now.
- Allowed Payment Methods (optional) — Comma-separated list of payment methods to only allow (e.g.,
card, paypal, ideal). When set, only these methods are shown and the Excluded field is ignored. Leave empty for dynamic mode. - Excluded Payment Methods (optional) — Comma-separated list of payment methods to exclude (e.g.,
cashapp, crypto, klarna). Only used when Allowed Payment Methods is empty.
Webhook Configuration
Step 1: Create a webhook endpoint in Stripe
- Go to Developers → Webhooks → Add endpoint in Stripe Dashboard.
-
Endpoint URL:
https://yourwhmcsdomain.com/modules/gateways/callback/stripecheckoutcallback.phpReplace the domain with your WHMCS installation domain.
- Select and subscribe to these events:
checkout.session.completedpayment_intent.processingpayment_intent.succeededpayment_intent.payment_failed
Step 2: Add the Webhook Secret to WHMCS
Copy the Webhook Secret from Stripe and paste it into the module configuration.
Stripe Adaptive Pricing (Optional)
To enable Stripe Adaptive Pricing for your Stripe Checkout, follow these steps:
Step 1: Enable Adaptive Pricing in Stripe Dashboard
- Log into your Stripe Dashboard and navigate to your payment settings.
- In the payment settings, you will find the option to enable Adaptive Pricing for both test and live modes.
Step 2: Check Country Support
Before enabling Adaptive Pricing, make sure that your country supports this feature. Check the full list of supported countries by visiting the official documentation:
Step 3: Test Adaptive Pricing
Create a test Checkout Session to confirm that pricing is shown in the customer's local currency and that the feature is working as expected.
Payment Methods
This module uses Stripe’s Automatic Payment Methods. Stripe dynamically shows the most relevant payment methods based on the customer’s location, currency, and transaction amount. You can also control which methods appear using the configuration fields.
Three operating modes
| Mode | How to enable | Behavior |
|---|---|---|
| Dynamic (default) | Leave both Allowed and Excluded fields empty | Stripe automatically selects the best payment methods for each customer based on location, currency, and amount. |
| Allowed list | Enter methods in Allowed Payment Methods (e.g., card, paypal, ideal) | Only the listed methods are shown. The Excluded field is ignored. |
| Excluded list | Leave Allowed empty, enter methods in Excluded Payment Methods (e.g., cashapp, crypto, klarna) | Dynamic mode with specific methods blocked. Note: Apple Pay, Google Pay, and Link cannot be excluded this way — use wallet-specific settings in the Stripe Dashboard instead. |
Enable methods in Stripe Dashboard
In Stripe Dashboard → Settings → Payments → Payment Methods, toggle on Alipay, Cash App, PayPal, and other supported methods for your account.
Very Important: Only enable payment methods in WHMCS that are enabled/supported in your Stripe Dashboard; otherwise the module will not function.
Usage
For Customers
- Choose Stripe Checkout during invoice payment.
- Redirected to Stripe's hosted page, then back to WHMCS after payment.
For Admins
- Track transactions in WHMCS under the Transactions tab.
- All payment details (Transaction ID, Amount Paid) are logged.
Refunds
- Go to Billing → Invoices and open the target invoice.
- Click Refund and enter amount (partial refunds supported).
- All refunds are logged via
logModuleCall(). Errors appear in the Module Log.
Error Handling & Logs
- Customers receive generic messages on errors to avoid leaking internals.
- Detailed errors (including Stripe API errors) are logged via
logModuleCall(). - View at Configuration → System Logs → Module Log.
Security
- Restricted Key and Webhook Secret are stored securely by WHMCS and not exposed to users.
- Webhook callbacks verify the Stripe signature using
\Stripe\Webhook::constructEvent()to reject tampered or forged requests. - Strict input validation of invoice ID, amount, and transaction IDs.
- Always use HTTPS on your WHMCS installation.
FAQ
Ensure that:
- The Webhook is correctly configured in Stripe Dashboard
- The Webhook Secret is accurately entered in the WHMCS module configuration
- Update your Stripe webhook to include these events:
- checkout.session.completed
- payment_intent.processing
- payment_intent.succeeded
- payment_intent.payment_failed
Check the Module Log in WHMCS for any errors or missing event handling.
Check the following items in your Stripe Dashboard and WHMCS installation:
- The webhook endpoint URL is correct and publicly reachable over HTTPS.
- Your server firewall, WAF, or Cloudflare rules are not blocking Stripe requests.
- Stripe shows a successful 2xx response for webhook deliveries instead of 4xx or 5xx errors.
- The webhook events include
checkout.session.completed,payment_intent.processing, andpayment_intent.succeeded. - The Webhook Secret in WHMCS matches the current endpoint secret in Stripe.
If Stripe reports failed deliveries, inspect the response body and the WHMCS Module Log to identify the exact rejection or error.
Use the correct ionCube Loader version for your PHP version (see the table in System Requirements section).
Company
Mustafa Tech LLC — Registration Number: 7702442
Premium Web Hosting Company
Email: [email protected]