Appearance
Payment modes
PhonePe for WHMCS gives you two ways to present checkout when a customer clicks Pay Now: a full-page Redirect to PhonePe's hosted page, or an in-page Iframe popup that keeps the customer on your invoice. Both take the same PhonePe payment methods and both end the same way — PhonePe notifies your site by webhook, the gateway re-checks the status against the API, and the invoice is marked paid. What changes is where the customer is while they pay, and that affects how the flow feels and how it behaves on flaky networks.
You pick the mode in the Payment Mode field under Setup → Payment Gateways → PhonePe. The default is Redirect.
Setup → Payment Gateways → PhonePe → Payment Mode
Redirect — full-page hosted checkout
With Redirect, clicking Pay Now sends the customer away from WHMCS to PhonePe's own hosted checkout page. They complete the payment there, and PhonePe returns them to WHMCS, where the callback verifies the result and records the payment.
- What the customer sees: the browser leaves your site and loads PhonePe's checkout, then comes back to your invoice once they're done.
- Why you'd choose it: it's the simplest, most robust option. Because the whole page belongs to PhonePe, there's nothing to render inside your theme and nothing that a strict Content Security Policy or an unusual template can break. If in doubt, use Redirect.
This is the safe default
Redirect works on virtually any theme and browser. Start here, and only switch to Iframe if you specifically want customers to stay on your page.
Iframe — in-page popup
With Iframe, PhonePe's checkout opens as a popup overlay on the invoice page using PhonePe's JavaScript SDK. The customer pays without ever leaving your site — when they finish, the popup closes and the invoice updates in place.
- What the customer sees: a PhonePe checkout window layered over your invoice; your page stays behind it the whole time.
- Why you'd choose it: it feels more integrated and keeps customers in your branded flow, which can reduce drop-off from a jarring page change.
Iframe needs JavaScript and a clean page
The popup depends on PhonePe's JavaScript SDK loading in the customer's browser. Heavily customized themes, ad/script blockers, or a restrictive Content Security Policy can stop the popup from opening. Test the Iframe flow in your live theme before relying on it, and keep Redirect in mind as a fallback.
Which one should you choose?
| If you want… | Use |
|---|---|
| Maximum reliability across themes and browsers | Redirect |
| The simplest setup with the fewest moving parts | Redirect |
| Customers to stay on your site through checkout | Iframe |
| A more seamless, in-page experience | Iframe |
Whichever you pick, the verification is identical: the result is confirmed by the SHA256-signed webhook and a secondary API status check before the invoice is marked paid. See Webhooks for how that dual verification works.
Related pages
- Configuration — set the Payment Mode and other fields
- Webhooks — how results are verified
- Security — auth, SSL, and license gating
- Going live — test then switch off Sandbox Mode