NOWPayments payment gateway WHMCS module Description Changelog Installation and configuration guide This chapter describes how to download, install, update, and configure the PUQ NOWPayments payment gateway module for WHMCS. WHMCS Installation and Update NOWPayments Payment Gateway module WHMCS Order now | Download | Community System requirements Requirement Minimum WHMCS 8.x+, 9.x+. PHP 7.4, 8.1, 8.2, 8.3, 8.4 ionCube Loader v15+ Note: The module uses ionCube encoding. Make sure ionCube Loader is installed and active on your server. Installation Note: The module now uses ionCube 15, which provides universal out-of-the-box support for all encodings. All versions can be found at this link: https://download.puqcloud.com/WHMCS/gateways/PUQ_WHMCS_PG-nowpayments/ Older module versions for WHMCS 8 are available in the archive directory: https://download.puqcloud.com/WHMCS/gateways/PUQ_WHMCS_PG-nowpayments/archive/ Download the latest version from the PUQ download page: wget https://download.puqcloud.com/WHMCS/gateways/PUQ_WHMCS_PG-nowpayments/PUQ_WHMCS_PG-nowpayments-latest.zip Unzip the archive: unzip PUQ_WHMCS_PG-nowpayments-latest.zip Upload the module files to your WHMCS installation: Copy the extracted gateway files from the puq_nowpayments/ archive folder into your WHMCS modules/gateways/ directory: # Copy main gateway file, asset folder, and IPN webhook callback cp -f puq_nowpayments/puq_nowpayments.php /path/to/whmcs/modules/gateways/ cp -rf puq_nowpayments/puq_nowpayments /path/to/whmcs/modules/gateways/ cp -rf puq_nowpayments/callback /path/to/whmcs/modules/gateways/ Ensure proper ownership and file permissions for your web server user (e.g. www-data): chown -R www-data:www-data /path/to/whmcs/modules/gateways/puq_nowpayments* chown -R www-data:www-data /path/to/whmcs/modules/gateways/callback/ The module files are now in place. Proceed to the gateway configuration chapter. Update The update procedure is the same as installation — replace the existing files with the new version: Download the latest version as described in the Installation section. Unzip the archive. For gateway modules, simply overwrite the existing files. No deactivation is needed: cp -f puq_nowpayments/puq_nowpayments.php /path/to/whmcs/modules/gateways/ cp -rf puq_nowpayments/puq_nowpayments /path/to/whmcs/modules/gateways/ cp -rf puq_nowpayments/callback /path/to/whmcs/modules/gateways/ Verify the version number in the module interface matches the new release. Gateway Configuration NOWPayments Payment Gateway module WHMCS Order now | Download | Community Activate Payment Gateway in WHMCS Log in to your WHMCS Admin Area. Navigate to System Settings → Payment Gateways (or Setup → Payments → Payment Gateways in older WHMCS versions). Switch to the All Payment Gateways tab. Locate PUQ NOWPayments in the list and click to activate. Configure Payment Gateway After activating, WHMCS redirects to the Manage Existing Gateways tab (or navigate there directly via System Settings → Payment Gateways → Manage Existing Gateways). Locate the PUQ NOWPayments section. gateway-configuration.png Configure the following parameters: Parameter Type Description Show on Order Form Checkbox Check this box to enable NOWPayments as an available payment option on customer checkouts and invoices. Display Name Text The public title displayed to customers (default: NOWPayments). License Key Text Your PUQ module license key. The validation status is displayed inline. Mode of Operation Dropdown Choose between Production – live payments or Sandbox – test environment. Always test in sandbox mode before going live. Payment Flow Dropdown Choose between Embedded Currency Selector (customer selects coin on WHMCS invoice) and Direct Hosted Checkout (customer redirects to NOWPayments checkout). Minimum Invoice Amount Text (Number) Optional minimum invoice total in your WHMCS base currency. If set, invoices below this value display an advisory notice. Block Invoices Below Minimum Checkbox When enabled, completely blocks payment processing for invoices below the minimum amount and displays a red notice asking the client to select another payment method. API Key (Production) Password Production API Key from your NOWPayments Production Store Settings. IPN Secret Key (Production) Password Production IPN Secret Key from NOWPayments Notifications. API Key (Sandbox) Password Sandbox API Key for development/testing from NOWPayments Sandbox Keys. IPN Secret Key (Sandbox) Password Sandbox IPN Secret Key from NOWPayments Sandbox Notifications. IPN Callback URL Read-only Automatically generated webhook endpoint URL. Copy this into your NOWPayments dashboard settings. Module Version Read-only Displays the currently installed module version (e.g. 4.0.0). Sort Currencies Dropdown Sorting order for coins in the dropdown: Ascending (A-Z), Descending (Z-A), or Do Not Sort (Merchant Default). Show Currency Code Dropdown Choose Yes to display ticker symbols next to names (e.g. Bitcoin (BTC)). Is Fee Paid by User Dropdown Choose Yes if the customer pays the gateway commission fee, or No if absorbed by merchant. Convert To For Processing Dropdown Optional WHMCS setting to convert invoice amounts into a selected currency prior to processing. Click Save Changes at the bottom of the page. Webhook / IPN Setup in NOWPayments To receive automated payment confirmations: Copy the IPN Callback URL shown in your WHMCS gateway settings: https://yourdomain.com/modules/gateways/callback/puq_nowpayments.php Open your NOWPayments account settings: For Production: https://account.nowpayments.io/store-settings#notifications For Sandbox: https://account-sandbox.nowpayments.io/store-settings#notifications Paste the callback URL and ensure the generated IPN Secret matches the secret entered in WHMCS. Click Save Changes. Important: The webhook callback URL must be publicly accessible over HTTPS so that NOWPayments servers can post real-time IPN notifications to your WHMCS. Payment flow This chapter describes how cryptocurrency payments are initiated, calculated, processed, and confirmed between WHMCS, NOWPayments, and the customer. Payment Flow NOWPayments Payment Gateway module WHMCS Order now | Download | Community When a customer opens their unpaid invoice in WHMCS and selects NOWPayments, they are presented with an intuitive payment interface designed for fast, transparent, and secure cryptocurrency checkout. How the Payment Process Works The client selects NOWPayments as the payment method during checkout or on an unpaid invoice. The dynamic currency selector queries the NOWPayments API and displays available cryptocurrencies with real-time rate estimates. The client selects their desired coin and clicks Pay Now (or clicks Pay Now (NOWPayments) in hosted checkout mode). The client is redirected to the secure NOWPayments checkout page displaying the exact crypto payment address and QR code. The client submits the transaction from their crypto wallet. The blockchain network confirms the transaction, and NOWPayments sends an Instant Payment Notification (IPN) webhook. WHMCS validates the HMAC-SHA512 cryptographic signature and records the transaction. The invoice is automatically marked as Paid, and all details are recorded in the WHMCS transaction logs. [Customer opens invoice] │ ▼ [Currency Selector loads available coins from NOWPayments API] │ ▼ [Real-time rate calculation via /v1/estimate] │ ▼ [Customer clicks "Pay Now" -> Redirected to NOWPayments Checkout] │ ▼ [Customer sends transaction from their Crypto Wallet] │ ▼ [Blockchain confirms payment -> NOWPayments posts IPN to WHMCS] │ ▼ [HMAC Verification -> addInvoicePayment -> Invoice marked Paid] Payment Interface Options 1. Embedded Currency Selector The default checkout interface embeds live coin calculation directly on the WHMCS invoice view. Customers can see the exact estimated amount in cryptocurrency before proceeding: embedded-currency-selector.png 2. Searchable Select2 Cryptocurrency Dropdown The module embeds a responsive Select2 dropdown with coin icons and instant keyboard filtering. Customers can easily find any of the 200+ supported coins by typing its name or ticker: select2-searchable-coins.png 3. Direct Hosted Checkout Flow For merchants who prefer not to display coin selection on the WHMCS invoice, the module can be configured in Direct Hosted Checkout mode: hosted-checkout-button.png Clicking the button immediately redirects the customer to NOWPayments where all available coins are presented. Threshold Management (Micro-invoices) Cryptocurrency networks require miner fees, which impose minimum deposit thresholds (typically $7-$15 for BTC/ETH, and $1-$2 for LTC/TRX). To prevent client frustration, the module provides two threshold management modes: Advisory Notice Mode When an invoice is below the configured Minimum Invoice Amount and strict blocking is disabled, an informational advisory is shown to guide the customer: payment-warning-below-minimum.png Strict Blocking Mode When Block Invoices Below Minimum is enabled in gateway settings, invoices below the threshold display a prominent red warning notice and lock payment buttons, prompting the client to choose an alternative payment method: payment-block-below-minimum.png Callback / Webhook Setup On your NOWPayments merchant dashboard, configure the IPN callback URL: https://yourdomain.com/modules/gateways/callback/puq_nowpayments.php The callback script verifies the HMAC-SHA512 signature against the configured IPN Secret Key. Once verified and marked finished, the module: Ensures the transaction has not already been applied. Converts the paid amount to the client's currency if necessary. Calls WHMCS internal addInvoicePayment to mark the invoice Paid. Logs complete audit details in WHMCS Billing → Transactions, Utilities → Logs → Gateway Log, and Module Log. Troubleshooting This chapter provides troubleshooting instructions and solutions for common issues encountered during setup, invoice payments, or callback processing. Troubleshooting NOWPayments Payment Gateway module WHMCS Order now | Download | Community 1. Invoices Under $7-8 Fail to Load Payment Methods Problem Description When viewing an invoice in WHMCS whose total is less than approximately $7.00 - $8.00 USD, the currency estimator fails or displays an error indicating that the amount is below the minimum limit. Why This Occurs Cryptocurrency Network Limits: Cryptocurrencies require network mining fees and exchange liquidity buffers. For top assets like Bitcoin (BTC) and Ethereum (ETH), NOWPayments requires a minimum payment threshold of typically $7.00 to $15.00 USD. If a customer or the selector defaults to BTC on an invoice of $3.00, the NOWPayments API returns an error (AMOUNT_MIN_LIMIT: Amount is less than minimum). If your NOWPayments merchant account only has BTC or ETH enabled in your Coins Settings, the NOWPayments hosted page will have no available currencies that support micro-invoices under $7.00. Solution & Best Practices Enable Low-Minimum Cryptocurrencies: In your NOWPayments Dashboard > Coins Settings, ensure you enable cryptocurrencies that feature very low network fees and micro-minimums (typically $1.00 - $2.00 USD): Litecoin (LTC) TRON (TRX) Tether on TRON (USDTTRC20) Dogecoin (DOGE) Solana (SOL) Binance Coin (BNB / BSC) Module Guidance: In v4.0.0+, if a customer selects a currency whose minimum is above the invoice amount, the module displays the exact minimum threshold returned by the API and advises the customer to select an alternative low-fee coin. Use Direct Hosted Flow: You can switch the module setting Payment Flow to Direct Hosted Checkout. This passes an open invoice to NOWPayments without pre-fixing the currency, allowing NOWPayments to display only the coins eligible for that specific amount. Set Minimum Invoice Amount: In the module settings, configure Minimum Invoice Amount (e.g. 5.00 or 8.00). If an invoice is below this threshold, a notice is displayed, guiding the customer, or strict blocking can be enabled. 2. IPN Signature Does Not Match Symptoms Payments confirm on the blockchain, but the WHMCS invoice remains in Unpaid status. The Gateway Log or Module Log displays an HMAC Signature Mismatch error: module-log-hmac-mismatch.png Resolution Verify whether your gateway is configured in Production or Sandbox mode. Confirm that the IPN Secret Key in WHMCS strictly matches the secret configured in your NOWPayments account for that environment: Production Secret: https://account.nowpayments.io/store-settings#notifications Sandbox Secret: https://account-sandbox.nowpayments.io/store-settings#notifications Ensure no trailing or leading whitespace is present in the copied key. The module automatically tests all configured IPN secrets (active mode, production secret, and sandbox secret) to guarantee valid signature resolution. 3. Webhook Callback Not Reaching WHMCS Symptoms No callback entries appear in Billing → Gateway Log after a customer completes a payment. Resolution Ensure your server firewall (UFW, iptables, Cloudflare, ModSecurity) does not block incoming POST requests to /modules/gateways/callback/puq_nowpayments.php. Ensure your SSL/TLS certificate is valid and not expired. NOWPayments requires valid HTTPS certificates to send webhook notifications. In your NOWPayments dashboard under Notifications, verify that the webhook URL is saved correctly and test the connection. 4. Inspecting Logs & Audit Trail WHMCS Gateway Log Whenever NOWPayments delivers a callback, an entry is added to Billing → Gateway Log (or Utilities → Logs → Gateway Log): gateway-transaction-log.png WHMCS Module Log For detailed API tracing with sanitized sensitive keys: In the WHMCS Admin Area, navigate to Utilities → Logs → Module Log. If module logging is not already enabled, click Enable Debug Logging. Search for entries with Gateway puq_nowpayments to inspect raw queries, live estimates, and webhook payloads: module-log-payment-processed.png