Docs

Log into read the version of docs relevant to your site.

Hosted checkout not loading on Safari mobile browser

Problem Statement

Hosted checkout does not load on Safari on iPhone. After filling in details and proceeding to checkout, nothing happens—the Chargebee-hosted checkout pop-up does not appear. The console shows: TypeError: null is not an object (evaluating 'this.window.location') cb-window-manager.ts:98.

  • Checkout does not load on iOS devices or Safari browser.
  • Chargebee checkout is supposed to pop up but does not load.

Solution

Safari blocks pop-ups by default, while other browsers typically do not. On mobile, the hosted checkout opens in a new tab instead of an iframe/pop-up by design, because mobile browsers often block pop-ups and affect the checkout experience.

Steps to Set It Up

Choose one of these options:

Option 1 – Use iframe (Chargebee JS)
If you use Chargebee JS, use the iframeOnly function to open checkout within the same tab.

Option 2 – Disable Block Pop-ups on iPhone

  1. Go to Settings > Safari > Block Pop-Ups
  2. Turn off Block Pop-Ups

Option 3 – Use plan-specific URL
Instead of the Drop-in script, use a plan-specific URL so customers are redirected to the checkout page in a new screen. See Hosted Checkout for configuration details.

Was this article helpful?