---
url: /payglocal-whmcs/guides/going-live.md
description: >-
  Test PayGlocal payments in sandbox first, then switch off Test Mode and swap
  in your production keys with a clear go-live checklist.
---

# Going live

Before you take real money, prove the whole flow works end to end in PayGlocal's sandbox (UAT).
Once a test payment completes cleanly, going live is just a matter of turning off Test Mode and
swapping in your production keys. This guide walks you through both stages.

## Stage 1 — Test in the sandbox

Start with **Test / Sandbox Mode = Yes**, which routes payments to PayGlocal's UAT environment.

::: warning Use UAT keys in sandbox
Sandbox and production use **different** keys. While testing, configure your **UAT** RSA key and
PayGlocal's **UAT** common certificate, with their matching KIDs. See
[PayGlocal key setup](/payglocal-whmcs/guides/payglocal-keys).
:::

Then run a real test payment:

### 1. Confirm the sandbox settings

Open **Setup → Payment Gateways → PayGlocal** and check that **Test / Sandbox Mode** is set to
**Yes**, your MID is correct, and the UAT key paths and KIDs are filled in. **Save Changes**.

### 2. Take a test payment

Create a test invoice, click **Pay Now**, and pay through the PayGlocal hosted checkout using
PayGlocal's UAT test credentials. You should be redirected to the checkout, complete the payment,
and return to WHMCS with the invoice marked **Paid**.

### 3. Check the Gateway Log

Open **Utilities → Logs → Gateway Log** and confirm the payment recorded cleanly — the signed
callback verified and the status cross-check passed. If anything failed, fix it now (see
[Troubleshooting](/payglocal-whmcs/troubleshooting)) before going live.

![A successful sandbox payment in the Gateway Log](/payglocal-whmcs/img/payglocal-going-live-gateway-log.png)
*Utilities → Logs → Gateway Log*

## Stage 2 — Switch to production

When a sandbox payment completes and verifies cleanly, move to live.

### 1. Swap in your production keys

Replace the UAT keys with your **production** merchant private key and PayGlocal's **production**
common certificate, both stored outside the web root with `chmod 640`. Update the four key fields
with the production paths and KIDs. See [PayGlocal key setup](/payglocal-whmcs/guides/payglocal-keys).

### 2. Turn off Test Mode

Set **Test / Sandbox Mode** to **No**. Confirm your production **Merchant ID (MID)** is entered
and your **License Key** is active. **Save Changes**.

### 3. Make one real payment

Take a small live payment (refund it afterward if you like) to confirm production works end to
end, then check the Gateway Log one more time.

## Go-live checklist

::: tip Before you accept real payments

* \[ ] Sandbox test payment completed and verified in the Gateway Log
* \[ ] **Test / Sandbox Mode = No**
* \[ ] **Production** merchant private key + PayGlocal common certificate in place
* \[ ] Both `.pem` files outside the web root, `chmod 640`
* \[ ] All four key paths and KIDs match the **production** keys
* \[ ] Correct production **Merchant ID (MID)**
* \[ ] **License Key** entered and active (payments are disabled while inactive)
* \[ ] Valid **SSL** certificate on your WHMCS domain
* \[ ] One real payment tested successfully
  :::

## Related pages

* [PayGlocal key setup](/payglocal-whmcs/guides/payglocal-keys) — UAT vs production keys
* [Configuration](/payglocal-whmcs/configuration) — every gateway field explained
* [How payments work](/payglocal-whmcs/features/payment-flow) — the flow you're testing
* [Licensing](/payglocal-whmcs/licensing) — why an active license is required
* [Troubleshooting](/payglocal-whmcs/troubleshooting) — when a test payment fails
