Skip to content

Payment modes

PhonePe for WHMCS supports two checkout experiences when a customer clicks Pay Now:

  • Redirect: Sends the customer to PhonePe's hosted checkout page.
  • Iframe: Opens an in-page popup overlay on top of the WHMCS invoice.

Both modes support identical payment methods and use the same verification flow: PhonePe sends a webhook notification, and the gateway performs a secondary API status check before marking the invoice Paid.

You pick the mode in the Payment Mode field under Setup → Payment Gateways → PhonePe. The default is Redirect.

Payment Mode field in the PhonePe gateway settingsSetup → 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.

  • Customer experience: Browser navigates to PhonePe's secure hosted page and redirects back upon completion.
  • Key advantage: Maximum reliability. Operates independently of custom WHMCS themes, strict Content Security Policies (CSP), or client-side script blockers.

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.

  • Customer experience: A PhonePe modal window overlays the invoice without navigating away.
  • Key advantage: Seamless branded flow that keeps customers inside your client portal.

Iframe environment requirements

The popup requires PhonePe's JavaScript SDK:

  • Potential blockers: Ad blockers, script blockers, or strict Content Security Policies (CSP) may prevent popup rendering.
  • Recommendation: Test the iframe flow across your active WHMCS themes before going live, with Redirect available as a reliable fallback.

Which one should you choose?

If you want…Use
Maximum reliability across themes and browsersRedirect
The simplest setup with the fewest moving partsRedirect
Customers to stay on your site through checkoutIframe
A more seamless, in-page experienceIframe

Both modes use identical verification: transactions are validated by a SHA256-signed webhook and an automated secondary API check before the invoice is marked Paid. See Webhooks.

Documentation for the Relyweb app catalogue.