---
url: /phonepe-whmcs/troubleshooting.md
description: >-
  Fix the common PhonePe for WHMCS problems — payments failing, the webhook not
  delivering, and a license that won't activate — starting from the Gateway Log.
---

# Troubleshooting

Find your symptom and work the steps in order. **Start with the Gateway Log** — it almost always names the cause.

::: tip Check the Gateway Log first
**Utilities → Logs → Gateway Log** → look for the most recent PhonePe entries around the failed payment. It records what PhonePe returned and why the gateway stopped.
:::

## Payments are failing

1. **Check the Gateway Log** for the specific failure on that attempt.
2. **Verify credentials.** In **Setup → Payment Gateways → PhonePe**, confirm **Client ID** and **Client Secret** match your PhonePe Merchant (Business) dashboard exactly — no trailing spaces, correct account.
3. **Confirm the account is live.** Your PhonePe Business account must be **active and KYC-verified**; a pending or restricted account can't take live payments.
4. **Check Sandbox Mode.** **Sandbox Mode = Yes** tests against the sandbox, not real payments — set it to **No** for live.
5. **Confirm the webhook is registered** (below); without it, a successful payment may never be recorded as Paid.

## The webhook isn't working

The webhook is how PhonePe tells your site a payment succeeded. If invoices stay unpaid though customers paid:

1. **Reach it over HTTPS.** The Webhook URL registered in the PhonePe dashboard must be exactly `https://yourdomain.com/modules/gateways/phonepe/webhook.php`, served over a valid SSL certificate and not blocked by a firewall or WAF.
2. **Match the credentials.** The **Webhook Username** and **Webhook Password** in **Setup → Payment Gateways → PhonePe** must be identical to the dashboard's webhook settings — a mismatch is the most common cause of a rejected webhook.

The endpoint returns a fixed set of responses — match yours to the table:

| HTTP status | Response body | Meaning | Fix |
| --- | --- | --- | --- |
| **401** | *"Unauthorized Access"* | The SHA256 auth check (`hash_equals`) failed — the webhook username/password don't match on both sides | Re-enter matching values in the PhonePe dashboard and WHMCS, then **Save Changes** |
| **500** | *"API Error"* | Authenticated, but the secondary PhonePe status confirmation failed — often a stale license or bad Client ID/Secret | Check the Gateway Log entry, verify credentials, and confirm outbound HTTPS to PhonePe is allowed |
| **200** | — | The webhook was accepted and processed | No action |

::: info Secondary verification requirement
The gateway double-checks transactions before updating invoice status:

* **API confirmation:** Following SHA256 auth, the gateway queries PhonePe to confirm payment status.
* **Troubleshooting:** If outbound HTTPS is blocked or API credentials fail, invoices remain unpaid despite webhook delivery.
  :::

## The license won't activate

Payments are disabled while the license is inactive.

1. **Re-check the key.** In **Setup → Payment Gateways → PhonePe**, confirm the **License Key** matches your relyweb.co client area exactly, then **Save Changes**.
2. **Allow outbound HTTPS.** Your server must reach **relyweb.co** over HTTPS to validate the key. Firewalled outbound requests will fail activation.
3. **Confirm the license is current.** A Leased license must still be active; a lapsed one disables payments until renewed. See [Licensing](/phonepe-whmcs/licensing).

## Related pages

* [Errors](/phonepe-whmcs/errors) — webhook auth failures and license-inactive behaviour
* [Configuration](/phonepe-whmcs/configuration) — the fields referenced above
* [Licensing](/phonepe-whmcs/licensing) — how the license gates payments
* [FAQ](/phonepe-whmcs/faq) — quick answers to common questions
