PayzCore Docs

WHMCS

WHMCS payment module for USDT/USDC blockchain monitoring. Automate invoice payments with stablecoin detection and webhook callbacks via PayzCore.

WHMCS Integration

The PayzCore WHMCS module adds USDT/USDC blockchain monitoring as a payment method for invoices in your WHMCS installation. It is installed as a WHMCS payment module; PayzCore itself only watches the blockchain and notifies WHMCS.

How It Works

  1. Client views an unpaid invoice and clicks "Pay with USDT/USDC".
  2. WHMCS module calls the PayzCore API.
  3. Payment page shows the wallet address, QR code, and exact amount.
  4. Client sends stablecoins from their wallet.
  5. PayzCore sends a webhook to callback.php.
  6. Module verifies the HMAC signature and applies the payment to the invoice.
  7. Invoice is marked as "Paid".

Installation

  1. Download the module from the WHMCS Marketplace or from the GitHub repository (Code > Download ZIP)
  2. Copy the files into your WHMCS installation:
your-whmcs/modules/gateways/
├── payzcore.php                  ← Main module file
├── payzcore/
│   ├── PayzCoreApi.php           ← API client
│   └── hooks.php                 ← Optional admin hooks
└── callback/
    ├── payzcore.php              ← Webhook receiver
    ├── payzcore_poll.php         ← Status polling for the invoice page
    └── payzcore_confirm.php      ← Tx hash submission (pool + txid mode)
  1. (Optional) For blockchain explorer links on admin invoices, copy modules/gateways/payzcore/hooks.php to includes/hooks/payzcore.php
  2. Set correct file permissions (644 for files, 755 for directories)

Configuration

  1. In WHMCS admin: Setup > Payments > Payment Gateways
  2. Open the All Payment Gateways tab, find PayzCore (USDT/USDC) and click Activate
  3. Configure the settings:
SettingValueNotes
API Keypk_live_...From your PayzCore project
Webhook Secretwhsec_...From your PayzCore project
Display Name"Pay with USDT"Shown to clients
  1. Click Save Changes. The module calls GET /v1/config (and caches the result) to detect the networks and tokens of your connected wallet. Clients choose from these on the invoice page; no manual selection is needed.

  2. Set your webhook URL in the PayzCore dashboard to:

https://yourdomain.com/modules/gateways/callback/payzcore.php

Invoice Status Mapping

PayzCore EventWHMCS ActionNotes
payment.completedInvoice marked as PaidPayment applied in full
payment.overpaidInvoice marked as PaidOverpayment amount logged in transaction notes
payment.partialPartial payment appliedInvoice remains unpaid for remaining balance
payment.expiredNo actionInvoice stays unpaid, client can pay again (v1.0.2+ creates a new payment with order id WHMCS-{invoiceId}-r…)

Overpayment Handling

When a client overpays, the invoice is marked as Paid and the overpayment amount is logged in the WHMCS transaction notes. Refunds or credits must be handled manually by the admin.

Partial Payment Handling

If a client sends less than the invoice amount, the received amount is applied as a partial payment. The invoice remains open for the remaining balance. The client can create a new payment for the remainder.

Client Experience

  1. Client views an unpaid invoice in the WHMCS client area
  2. Selects "Pay with USDT" (or your configured display name)
  3. Sees the wallet address, QR code, exact amount, and expiration timer
  4. Sends the exact stablecoin amount from their wallet
  5. Once confirmed, the invoice status updates automatically

Troubleshooting

Module not showing in admin

  • Ensure all files are in the correct directories (see Installation)
  • Check PHP error logs for syntax errors
  • Verify file permissions (readable by web server)

Callback not working

  • Verify the callback URL is accessible from the internet: https://yourdomain.com/modules/gateways/callback/payzcore.php
  • Check that your server allows POST requests from external IPs
  • Look for errors in the WHMCS Activity Log: Utilities > Logs > Activity Log

Invoice not updating after payment

  • Confirm the Webhook Secret matches between PayzCore and WHMCS settings
  • Check the WHMCS Gateway Log: Utilities > Logs > Gateway Log
  • Verify the PayzCore webhook delivery status in your PayzCore dashboard

See Also

On this page