WHMCS
Official dpay.pl payment gateway module for WHMCS. Enables online payment acceptance for invoices and services in the WHMCS system. Supports BLIK Level 0 (inline), credit/debit cards, PayPal, Paysafecard, installments, and online refunds.
Requirements
- WHMCS 7.x or 8.x
- PHP 7.4 or newer
- An active account in the dpay.pl Dashboard with a configured Payment Point
Supported Payment Methods
- BLIK (including BLIK Level 0 - inline)
- Bank transfers (pay-by-link)
- Credit/debit cards (inline)
- Google Pay and Apple Pay
- PayPal
- Paysafecard
- Installments (BLIK BNPL)
Installation
- Download the module files from dpay.pl or GitHub.
- Copy the files to the WHMCS directory, preserving the directory structure:
modules/gateways/dpay_payments.php- main module filemodules/gateways/callback/dpay_payments.php- IPN and payment handlermodules/gateways/dpay_payments/lib/dpay-sdk/- dpay.pl SDK library
- Log in to the WHMCS admin panel.
- Go to Setup > Payments > Payment Gateways.
- On the All Payment Gateways tab, find dpay.pl payments and click Activate.
Configuration
Step 1 - Prepare credentials in the dpay.pl Dashboard
- Log in to the dpay.pl Dashboard.
- Go to the Payment Points section.
- Create a new Payment Point or select an existing one.
- Note down:
- Service name (
service_name) - the unique name of your Payment Point - Secret hash (
secret_hash) - the key used to sign requests
- Service name (
- In the Payment Point settings, set the IPN URL to:
https://your-whmcs.com/modules/gateways/callback/dpay_payments.php
Important
The secret hash should be treated like a password. Never share it publicly or include it in frontend code.
Step 2 - Configure the module
- Go to Setup > Payments > Payment Gateways in the WHMCS admin panel.
- Click the Manage Existing Gateways tab and select dpay.pl payments.
- Fill in the configuration form:
| Field | Description |
|---|---|
| Payment Point name | Service name from the dpay.pl Dashboard |
| HASH key | Secret hash from the dpay.pl Dashboard |
| PayPal | Enable/disable PayPal payments |
| Credit cards | Enable/disable card payments |
| Paysafecard | Enable/disable Paysafecard payments |
| Installments | Enable/disable installment payments |
| No banks | Disable bank transfer, BLIK, and pay-by-link payments |
| BLIK Zero | Enable BLIK Level 0 payments (inline, no redirect) |
| Apple Pay | Enable Apple Pay payments |
| Google Pay | Enable Google Pay payments |
| Inline card | Enable inline card payments |
- Click Save Changes.
Step 3 - Verification
- Go to a client account or create a test invoice.
- Select dpay.pl payments as the payment method.
- Verify that you are correctly redirected to the payment page (or that the BLIK input field is displayed, if enabled).
- After completing the payment, verify that the invoice in WHMCS has changed to Paid status.
Refunds
The module supports online refunds directly from the WHMCS admin panel:
- Go to the invoice in Billing > Invoices.
- Click on the transaction and select the Refund option.
- Enter the refund amount and confirm.
The refund will be automatically sent to dpay.pl. Both full and partial refunds are supported.
Status Mapping
| dpay.pl Status | WHMCS Status |
|---|---|
| New transaction | Unpaid |
completed (IPN) | Paid |
| Payment error | Unpaid (with error log) |
Troubleshooting
Invoices do not change status to Paid
- Verify that the IPN URL (
/modules/gateways/callback/dpay_payments.php) is correctly configured in the dpay.pl Dashboard. - Make sure the callback file is publicly accessible and not blocked by a firewall.
- Check the WHMCS logs: Utilities > Logs > Gateway Log.
Error "Module Not Activated"
- Make sure the module is activated in Setup > Payments > Payment Gateways.
Currency error
- The module supports PLN currency only. Make sure the invoice currency is set to PLN.
Error in logs - "ERROR"
- Check the Gateway Log in WHMCS for error details.
- Make sure the HASH key is correct and matches the value in the dpay.pl Dashboard.