---
url: /payglocal-whmcs/configuration.md
description: >-
  Configure the PayGlocal for WHMCS gateway — enter your License Key, Merchant
  ID, RSA key paths and KIDs, and choose sandbox or live, then save and take a
  test payment.
---

# Configuration

PayGlocal is configured on WHMCS's native gateway page at **Setup → Payment Gateways →
PayGlocal** — there is no separate addon screen. This page walks through each setting in the order
you'll fill them, so you can go from a freshly activated gateway to a working sandbox payment in
one sitting. If you haven't generated your keys yet, do the
[PayGlocal key setup](/payglocal-whmcs/guides/payglocal-keys) first.

![The PayGlocal gateway configuration form](/payglocal-whmcs/img/payglocal-whmcs-configuration-form.png)
*Setup → Payment Gateways → PayGlocal*

## Enter your License Key

Paste your PayGlocal license key (from your relyweb.co account) into the **License Key** field.
This is what enables payment processing — while the license is active, PayGlocal accepts payments;
if it's inactive, payments are disabled until it's active again. See
[Licensing](/payglocal-whmcs/licensing) for how leased and lifetime keys behave.

## Enter your Merchant ID

Put your PayGlocal **Merchant ID (MID)** — issued during onboarding — into the **Merchant ID
(MID)** field. Every request PayGlocal receives is tied to this MID, so it must match your live
(or UAT) merchant account exactly.

## Point to your RSA keys and their KIDs

PayGlocal encrypts and signs each payment using your two keys, so the gateway needs both the
**file path** and the **Key ID (KID)** for each:

* **Merchant Private Key File Path** — the absolute path to your merchant private key `.pem`
  (for example `/home/user/keys/merchant_private.pem`), stored outside your web root.
* **Merchant Private Key ID (KID)** — the KID shown for that key in PayGlocal's GCC dashboard
  under **Key Management**.
* **PayGlocal Public Key File Path** — the absolute path to PayGlocal's public key `.pem`.
* **PayGlocal Public Key ID (KID)** — the KID for PayGlocal's common certificate.

::: warning Match keys to the environment
Use your **UAT** keys and KIDs while you're in sandbox, and your **production** keys and KIDs when
you go live. A mismatch between the key, its KID, and the environment is the most common cause of
a signature-verification failure. See the [key setup guide](/payglocal-whmcs/guides/payglocal-keys).
:::

## Choose sandbox or live

**Test / Sandbox Mode** decides which PayGlocal environment you talk to. Leave it **Yes** to use
PayGlocal's UAT (sandbox) while you're testing; switch it to **No** to go live. It defaults to
**No**, so make sure you set it to **Yes** before your first test run.

## Save and test

Click **Save Changes**. With **Test / Sandbox Mode = Yes**, create a test invoice and pay it
through PayGlocal end to end — you should be redirected to the hosted checkout, pay, return, and
see the invoice marked **Paid**. The [payment-flow page](/payglocal-whmcs/features/payment-flow)
explains what happens behind the scenes, and the
[going-live guide](/payglocal-whmcs/guides/going-live) covers switching to production.

::: tip Check the Gateway Log
Every attempt is recorded under **Utilities → Logs → Gateway Log**. If a test payment doesn't
complete, that's the first place to look.
:::

## Related pages

* [PayGlocal key setup](/payglocal-whmcs/guides/payglocal-keys) — generate the keys and KIDs
* [Settings reference](/payglocal-whmcs/settings) — every field, at a glance
* [How payments work](/payglocal-whmcs/features/payment-flow) — the flow behind the scenes
* [Going live](/payglocal-whmcs/guides/going-live) — switch from sandbox to production
* [Licensing](/payglocal-whmcs/licensing) — how your license enables payments
