Inconsistent redirect behavior to subscription confirmation page using Polaris Button, App Bridge, and Billing API

Hi Shopify Developer Community,

We are experiencing inconsistent behavior while implementing recurring app subscription billing using the Shopify Billing API in an embedded app. Specifically, the redirect to the subscription confirmation/approval page does not behave reliably depending on the navigation method used.

Below are the two approaches currently implemented.


Scenario 1: Polaris Button using url (client-side navigation)

<Button  size="large"  url={plan.action}
  variant="primary"  disabled={activeSubscription.length > 0}
>
  Subscribe</Button>

Observed behavior:

  • Clicking Subscribe sometimes results in an application-level error (white screen / error page).

  • After a manual browser refresh, the subscription approval page loads correctly.

  • This suggests the redirect URL itself is valid, but the navigation mechanism may be failing during initial load.


Scenario 2: Manual navigation using window.open with shopify:// deep link

<Button  size="large"  onClick={() =>open(
      `shopify://admin/apps/${appname}/app/subscriptions?plan=essential`,
      "_blank"    )
  }
  variant="primary"  disabled={activeSubscription.length > 0}
>
  Subscribe</Button>

Observed behavior:

  • This opens a new browser context, but does not consistently resolve to the expected Shopify Admin subscription page.

  • In some cases, the target page renders as blank or partially loaded.


Problem Analysis / Summary

  • Both approaches work intermittently, but neither is reliable.

  • The inconsistent behavior suggests a potential issue with:

    • Embedded app navigation context

    • Improper handling of Shopify App Bridge redirection

    • Browser restrictions when opening shopify:// deep links

  • Due to this instability, we’ve had to frequently modify the navigation logic, which is not a sustainable solution.


Questions for the Community

  1. What is the official and recommended approach to redirect merchants to the subscription approval page in an embedded Shopify app?

  2. Should all subscription redirects be handled via Shopify App Bridge (Redirect action) rather than Polaris url or window.open?

  3. Are there known issues or additional configuration requirements related to:

    • Embedded app context

    • Cross-origin navigation

    • Billing API subscription confirmation flow?

Any insights, best practices, or code examples would be greatly appreciated.

Thanks in advance for your help.