WHMCS
Download and install CryptiumPay for WHMCS, configure the payment button and webhooks, and verify a complete payment.
Version 1.0.4 · Download the WHMCS module (ZIP) · SHA-256 checksum
CryptiumPay for WHMCS adds a payment gateway to your self-hosted billing system. The customer chooses CryptiumPay on a WHMCS invoice, clicks the payment button, and pays at the hosted checkout. A verified signed webhook records the payment in WHMCS.
Tested locally with WHMCS 9.1.1, PHP 8.3 and MySQL 8.4. The ZIP uses the production CryptiumPay endpoints and contains no local emulator. This release supports individual invoice payments, including renewal invoices; it does not provide refunds or automatic recurring debits.
Install and activate
- Back up your WHMCS files and database, then download the ZIP above.
- Extract it and copy the included
modules/andincludes/directories into your WHMCS installation, preserving their paths. When upgrading, retain the existing module database tables. - In Apps & Integrations → Payments, activate CryptiumPay. Open Payment Gateways → CryptiumPay and enter Merchant ID, Merchant API Key and the separate Webhook Signing Secret from your CryptiumPay merchant settings.
- Enable Show on Order Form to offer this payment method to customers. Save the settings and verify the webhook before accepting payments.
On first use, the module creates or upgrades its own tracking tables. The WHMCS database account needs table creation and upgrade permissions. Keep these tables in your backups.
Configure the webhook URL
Set WHMCS System URL in System Settings → General Settings → General to your public HTTPS billing address.
Leave Webhook URL blank to use the default callback. For https://billing.example.com/whmcs, this is https://billing.example.com/whmcs/modules/gateways/callback/cryptiumpay.php. Enter a full public HTTPS override if the callback uses another hostname. Select Save Changes.
CryptiumPay must be able to reach this callback. The module sends the effective URL with every new invoice request. Never share the Merchant API Key or Webhook Signing Secret with customers.
Configure the payment button
The gateway settings include a compact appearance block with Payment button style, one Custom text field and a preview of the selected button:
- CryptiumPay branded — the default purple button with the logo.
- WHMCS theme — uses the active WHMCS theme's native button styling.
- Outline — an outlined button with the logo.
- Minimal — a text button without the logo.
custom_text is shown as entered in every customer language. Leave it blank to use the standard translated label. Save using the normal WHMCS form. Customers see one saved button; the preview stays in the admin area. No explanation is shown below the button.
For further styling, use your child theme's custom stylesheet and the .cryptiumpay-checkout and .cryptiumpay-pay classes. The WHMCS theme style gives your theme control of the button. The hosted checkout has separate appearance settings in CryptiumPay.
Return after payment
Automatic return after payment is disabled by default. Disabled, new payment attempts send success_url: null. Enabled, they send the HTTPS WHMCS invoice URL: after a successful payment, the hosted checkout shows the result and returns to that invoice after five seconds.
Existing attempts retain the return URL saved when they were created. Changing the setting affects new attempts. Returning in the browser does not confirm payment: only a verified webhook can record it in WHMCS.
Verify without paying
- In System Settings → Addon Modules, activate CryptiumPay Tools and grant the appropriate billing administrators access. The gateway can work independently of this optional addon.
- Open Addons → CryptiumPay Tools and select Check API connection. This sends a signed catalog request and creates no invoice. If you use an API IP allowlist, include the WHMCS server's outbound IP.
- Copy the Webhook test URL shown in Tools. In the merchant's Webhooks → Test tab in CryptiumPay, send a fresh test delivery to it. Keep the regular callback URL in the gateway settings.
- Select Refresh webhook test status in Tools and compare the verified event ID with the delivery in CryptiumPay. The test URL expires after 15 minutes and is bound to the current callback address and signing secret. Reload Tools for a fresh URL after either changes. A test webhook records no payment.
Check the complete payment flow
- Create a WHMCS invoice and select CryptiumPay as its payment method.
- Open the customer invoice and click its payment button.
- At CryptiumPay checkout, choose an available token and network and complete the payment.
- Check that the signed webhook is delivered and the WHMCS invoice becomes paid with one transaction.
- If automatic return is enabled, check that checkout returns to the same invoice.
WHMCS keeps the invoice currency. For example, an invoice of 1,000 UAH remains in UAH even if the customer pays its quoted equivalent in USDT. The module records the full invoice payment and the merchant fee separately. Partial payments leave the invoice open. Confirmed PAID and OVERPAID events are applied once; overpayments and other exceptions appear in Tools for review. See payment statuses.
Local testing
A localhost or private-IP callback cannot receive production webhooks. For an end-to-end test against the production API, expose the callback through a public HTTPS address and set it as the gateway's Webhook URL. A local emulator can test the flow separately, but it is not included in this download.
Troubleshooting
- Checkout does not open: inspect Billing → Gateway Log, match the WHMCS invoice ID and check the effective public HTTPS webhook URL and API credentials.
- An invoice stays unpaid: check the CryptiumPay payment status, webhook delivery history and Tools review queue. After fixing a delivery error, resend the webhook. Repeated deliveries must leave one payment entry.
- The customer does not return: enable automatic return, check the HTTPS WHMCS System URL and use a new payment attempt.
- The webhook test is no longer valid: reload Tools and send a fresh test to its current Webhook test URL. An old delivery cannot verify a newly configured callback.
Contact [email protected] with the invoice ID and delivery status. Keep keys, signing secrets and customer data out of support messages.