Skip to main content

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

  1. Download the module files from dpay.pl or GitHub.
  2. Copy the files to the WHMCS directory, preserving the directory structure:
    • modules/gateways/dpay_payments.php - main module file
    • modules/gateways/callback/dpay_payments.php - IPN and payment handler
    • modules/gateways/dpay_payments/lib/dpay-sdk/ - dpay.pl SDK library
  3. Log in to the WHMCS admin panel.
  4. Go to Setup > Payments > Payment Gateways.
  5. On the All Payment Gateways tab, find dpay.pl payments and click Activate.

Configuration

Step 1 - Prepare credentials in the dpay.pl Dashboard

  1. Log in to the dpay.pl Dashboard.
  2. Go to the Payment Points section.
  3. Create a new Payment Point or select an existing one.
  4. Note down:
    • Service name (service_name) - the unique name of your Payment Point
    • Secret hash (secret_hash) - the key used to sign requests
  5. 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

  1. Go to Setup > Payments > Payment Gateways in the WHMCS admin panel.
  2. Click the Manage Existing Gateways tab and select dpay.pl payments.
  3. Fill in the configuration form:
FieldDescription
Payment Point nameService name from the dpay.pl Dashboard
HASH keySecret hash from the dpay.pl Dashboard
PayPalEnable/disable PayPal payments
Credit cardsEnable/disable card payments
PaysafecardEnable/disable Paysafecard payments
InstallmentsEnable/disable installment payments
No banksDisable bank transfer, BLIK, and pay-by-link payments
BLIK ZeroEnable BLIK Level 0 payments (inline, no redirect)
Apple PayEnable Apple Pay payments
Google PayEnable Google Pay payments
Inline cardEnable inline card payments
  1. Click Save Changes.

Step 3 - Verification

  1. Go to a client account or create a test invoice.
  2. Select dpay.pl payments as the payment method.
  3. Verify that you are correctly redirected to the payment page (or that the BLIK input field is displayed, if enabled).
  4. 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:

  1. Go to the invoice in Billing > Invoices.
  2. Click on the transaction and select the Refund option.
  3. 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 StatusWHMCS Status
New transactionUnpaid
completed (IPN)Paid
Payment errorUnpaid (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.

More Information