---
url: /phonepe-whmcs/guides/phonepe-setup.md
description: >-
  Set up your PhonePe Business account for WHMCS — sign up and complete KYC,
  generate your Client ID and Client Secret, and configure the webhook URL with
  matching username and password.
---

# PhonePe setup

Before WHMCS can take a single PhonePe payment, you need a **PhonePe Business** account, a pair of
API credentials, and a webhook pointing back at your site. This guide walks you through all three,
in order. Set it up once in the PhonePe dashboard, mirror a few values into WHMCS, and you're ready
to test.

::: info What you'll end up with
A **Client ID** and **Client Secret** to paste into WHMCS, and a webhook in the PhonePe dashboard
whose **username/password match** the ones in your gateway config.
:::

## 1. Sign up for a PhonePe Business account and complete KYC

Create a **PhonePe Business** account and complete **KYC** (identity and business verification).
This is PhonePe's requirement before your account can accept live payments — you can explore the
dashboard while it's pending, but you won't be able to go live until KYC is verified.

::: tip Do this early
KYC verification can take time. Start it first so it's finished by the time you're done testing in
sandbox.
:::

## 2. Generate your Client ID and Client Secret

In the merchant (Business) dashboard, generate your API credentials — a **Client ID** and a
**Client Secret**. These are what the module uses to authenticate to PhonePe.

Copy both into **Setup → Payment Gateways → PhonePe** in WHMCS:

* **Client ID** → the Client ID from the dashboard
* **Client Secret** → the Client Secret from the dashboard
* **Client Version** → leave at the default **1** unless PhonePe tells you otherwise

![PhonePe Client ID and Client Secret fields in WHMCS](/phonepe-whmcs/img/phonepe-whmcs-phonepe-setup-credentials.png)
*Setup → Payment Gateways → PhonePe → Client ID / Client Secret*

Then **Save Changes**.

## 3. Configure the webhook

PhonePe needs a URL to notify when a payment completes, protected by a username and password you
choose.

### Set the webhook URL

In the dashboard's webhook settings, enter your module webhook URL (replace the domain with yours):

```
https://yourdomain.com/modules/gateways/phonepe/webhook.php
```

This endpoint must be reachable over **HTTPS**.

### Choose a username and password, then match them in WHMCS

Set a **username** and **password** for the webhook in the dashboard, then enter the **exact same**
values in WHMCS:

* **Webhook Username** → the username you set in the dashboard
* **Webhook Password** → the password you set in the dashboard

::: warning Values must match
The webhook is SHA256-authenticated. If the username or password differs between PhonePe and WHMCS,
notifications are rejected and invoices won't be marked paid. Copy them carefully and **Save
Changes**.
:::

## 4. Test in sandbox first

Leave **Sandbox Mode** set to **Yes** and run a test payment before you take real money. Once it
works end to end, follow [Going live](/phonepe-whmcs/guides/going-live) to switch to production.

## Related pages

* [Going live](/phonepe-whmcs/guides/going-live) — test then turn Sandbox Mode off
* [Webhooks](/phonepe-whmcs/features/webhooks) — how the notification is verified
* [Configuration](/phonepe-whmcs/configuration) — all the gateway fields
* [Requirements](/phonepe-whmcs/requirements) — server and account prerequisites
