---
url: /payglocal-whmcs/installation.md
description: >-
  Step-by-step install for the PayGlocal for WHMCS payment gateway — upload the
  module, place your RSA keys, activate under Setup → Payment Gateways, fill the
  settings, and take a sandbox test payment.
---

# Installation

Installing PayGlocal for WHMCS is a short, ordered job: upload the module files, put your RSA
keys somewhere safe, activate the gateway on WHMCS's native payment-gateways page, fill in the
settings, and confirm it works with a sandbox test payment before you go live. Follow the steps
in order — the keys need to be in place before you activate and configure.

::: tip Before you start
Have your [PayGlocal keys](/payglocal-whmcs/guides/payglocal-keys) generated and downloaded, and
your **Merchant ID (MID)** and **License Key** to hand. Check the
[Requirements](/payglocal-whmcs/requirements) first.
:::

## Step 1 — Upload the module

Upload the module's `modules/` directory into your WHMCS root, letting it **merge** with the
existing structure. This adds the PayGlocal gateway files alongside your other gateways without
touching anything else.

![Uploading the PayGlocal module into the WHMCS modules directory](/payglocal-whmcs/img/payglocal-whmcs-installation-upload.png)
*Your WHMCS root — merge the module's `modules/` directory in*

## Step 2 — Place your RSA keys outside the web root

Upload your two `.pem` key files — your **merchant private key** and **PayGlocal's public key** —
to a directory that sits **outside your web root** (so they can never be served over the web).
Set their permissions with `chmod 640` so only the web-server user can read them.

::: warning Keep private keys out of the web root
Never place a private key anywhere under `public_html`/`httpdocs`. A directory like
`/home/user/keys/` is a good home. You will point the gateway at each file by its absolute path.
:::

## Step 3 — Activate the gateway

In the WHMCS admin, go to **Setup → Payment Gateways → All Payment Gateways**, find **PayGlocal**
in the list, and click **Activate**. The gateway installs the small JWT/crypto libraries it needs
automatically the first time you activate it.

![Activating PayGlocal from the All Payment Gateways list](/payglocal-whmcs/img/payglocal-whmcs-installation-activate.png)
*Setup → Payment Gateways → All Payment Gateways → PayGlocal → Activate*

## Step 4 — Fill in the settings

Activating opens the PayGlocal configuration form under **Setup → Payment Gateways → PayGlocal**.
Enter your **License Key**, **Merchant ID (MID)**, the **path and KID** for each of your two keys,
and leave **Test / Sandbox Mode** set to **Yes** for now. The
[Configuration](/payglocal-whmcs/configuration) and [Settings reference](/payglocal-whmcs/settings)
pages explain every field.

## Step 5 — Save

Click **Save Changes**. WHMCS stores your settings and PayGlocal is now a live payment option on
your invoices.

## Step 6 — Take a sandbox test payment

With **Test / Sandbox Mode = Yes**, create a test invoice and pay it through PayGlocal end to
end. Confirm the customer is redirected to PayGlocal's hosted checkout, pays, returns to WHMCS,
and the invoice is marked **Paid**. The [going-live guide](/payglocal-whmcs/guides/going-live)
walks through the switch to production once your sandbox test succeeds.

::: tip Something not right?
Open **Utilities → Logs → Gateway Log** — it records each payment attempt and is the fastest way
to see why a test didn't complete. See [Troubleshooting](/payglocal-whmcs/troubleshooting).
:::

## Related pages

* [Requirements](/payglocal-whmcs/requirements) — confirm your server and account
* [PayGlocal key setup](/payglocal-whmcs/guides/payglocal-keys) — generate your RSA keys
* [Configuration](/payglocal-whmcs/configuration) — fill in the gateway settings
* [Settings reference](/payglocal-whmcs/settings) — every field explained
* [Going live](/payglocal-whmcs/guides/going-live) — switch from sandbox to production
