---
url: /relypay-whmcs/guides/phonepe.md
description: >-
  Set up PhonePe in RelyPay for WHMCS — enter your client credentials, choose a
  payment mode, set webhook authentication, enable sandbox mode, and test the
  connection.
---

# Connect PhonePe

PhonePe covers UPI, Cards, Net Banking and Wallets. Connect it on the
**Addons → RelyPay → Providers** page using the credentials from your PhonePe Business
account.

![The PhonePe configuration card in RelyPay](/relypay-whmcs/img/relypay-phonepe-config.png)
*Addons → RelyPay → Providers → PhonePe*

## Credentials you will need

On the PhonePe card, fill in these fields exactly:

| Field | Where to find it |
| --- | --- |
| **Client ID** | From PhonePe Business Dashboard |
| **Client Secret** | From PhonePe Business Dashboard |
| **Client Version** | API version (default: 1) |

Leave **Client Version** at `1` unless PhonePe has asked you to use a different API version.

## Options

* **Payment Mode** — choose **Redirect** or **Iframe**. *How the checkout is displayed.*
  Redirect sends the customer to PhonePe; Iframe embeds the checkout on your site.
* **Sandbox Mode** — toggle. *Enable for testing.* Turn this on to trial the integration
  against PhonePe's sandbox, and off for live payments.

## Webhook authentication

PhonePe authenticates its webhook with a username and password that you set. Enter matching
values in both places — the PhonePe dashboard and RelyPay:

| Field | Purpose |
| --- | --- |
| **Webhook Username** | For webhook authentication |
| **Webhook Password** | For webhook authentication |

## Register the webhook

1. On the PhonePe card in RelyPay, copy the **webhook URL** shown.
2. In the PhonePe Business Dashboard, add that URL as your webhook endpoint and set the
   **username** and **password** to match the values you entered in RelyPay.
3. Subscribe to these events:

| Event | Required? |
| --- | --- |
| `checkout.order.completed` | Required |
| `checkout.order.failed` | Optional |

::: warning SSL required
The webhook URL must be HTTPS. PhonePe will not deliver events to an insecure endpoint,
and RelyPay verifies each callback.
:::

## Test it

1. Click **Test Connection** on the PhonePe card to confirm your credentials reach PhonePe.
2. Enable PhonePe and save.
3. Place a test payment through a RelyPay [sub-gateway](/relypay-whmcs/features/sub-gateways)
   that PhonePe can serve, and confirm the result appears in the
   [transaction log](/relypay-whmcs/features/transactions) with **PhonePe** as the provider.

## Related

* [Configuration overview](/relypay-whmcs/configuration)
* [Routing](/relypay-whmcs/features/routing)
