Appearance
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.
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.
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
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.phpThis 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
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 to switch to production.
Related pages
- Going live — test then turn Sandbox Mode off
- Webhooks — how the notification is verified
- Configuration — all the gateway fields
- Requirements — server and account prerequisites