Skip to content

Installation

Installing PhonePe for WHMCS takes a few minutes: you upload the module files, activate the gateway on WHMCS's native payment-gateways page, enter your credentials, point PhonePe's webhook back at your site, and run a sandbox test. Follow the steps in order and you'll be taking test payments by the end.

Get your credentials first

You'll need your PhonePe Client ID and Client Secret during setup. If you don't have them yet, work through the PhonePe setup guide first, then come back here.

Step 1 — Upload the module files

Upload the module's modules/ directory into the root of your WHMCS installation, letting it merge with the existing modules/ folder. Nothing is overwritten that shouldn't be — the files land alongside your other gateways.

If you're updating an existing install rather than installing fresh, see Updating instead.

Step 2 — Activate the gateway

In the WHMCS admin, open Setup → Payment Gateways → All Payment Gateways, find PhonePe in the list, and click Activate. WHMCS moves it to your Manage Existing Gateways tab and shows its configuration fields.

Activating PhonePe in the payment gateways listSetup → Payment Gateways → All Payment Gateways

Step 3 — Fill in the settings

On the PhonePe configuration screen, enter your Client ID, Client Secret, and License Key, and choose your Payment Mode (Redirect or Iframe). Leave Sandbox Mode set to Yes for now so you can test safely. Each field is explained in Configuration.

PhonePe gateway configuration fieldsSetup → Payment Gateways → PhonePe

Click Save Changes when you're done.

Step 4 — Configure the webhook in the PhonePe dashboard

PhonePe reports payment results to your site by webhook, so you need to register the URL in the PhonePe merchant dashboard. In the dashboard's webhook settings, set the Webhook URL to:

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

Replace yourdomain.com with your WHMCS domain. Choose a username and password for the webhook, then enter the same values in the gateway's Webhook Username and Webhook Password fields in WHMCS. The two sides must match — that's how the incoming webhook is authenticated.

HTTPS is required

The webhook URL must be reachable over a valid SSL certificate. If the endpoint isn't accessible over https://, PhonePe can't deliver payment results and invoices won't be marked paid automatically.

Step 5 — Test in sandbox

With Sandbox Mode on, place a test order and click Pay Now. You'll be taken to PhonePe's sandbox checkout (or the in-page popup, depending on your Payment Mode). Complete the test payment and confirm the invoice is marked Paid in WHMCS.

If anything goes wrong, check Utilities → Logs → Gateway Log first — it records each step of the payment and webhook exchange.

Step 6 — Go live

Once sandbox payments work end to end, set Sandbox Mode to No and Save Changes. Your gateway is now live. For a full pre-launch checklist, see Going live.

Documentation for the Relyweb app catalogue.