Handling billing.check() Access Denied Errors in Shopify Remix Apps

I’m building an embedded app using Shopify’s Remix template. On the initial app load, my loader calls billing.check() to confirm whether the store has an active subscription to my app. This works smoothly for most stores.

"@shopify/shopify-api": "^11.3.0",
"@shopify/shopify-app-remix": "^3.2.0",
export const loader = async ({ request }: LoaderFunctionArgs) => {
  const auth = await authenticate.admin(request);
  const shop = auth.session.shop;

  try {
    const plans = await auth.billing.check();

However, I’ve run into an issue with stores that give users permission to access the app but don’t enable the “Approve app charges” permission. In these cases, calling billing.check() results in an access denied error from Shopify—even though I’m not requesting approval for a new charge, just verifying if an active subscription exists.

For those of you using the Remix template, how are you verifying active subscriptions in this scenario? I could simply catch the error, but then I would be in a scenario where I have no idea what plan that user is subscribed to. :man_shrugging:

Are you redirecting users to the subscription approval charge screen if they don’t have a subscription?

Thanks for the reply! I do end up using the billing.require method later in some scenarios, but the error I’m encountering specifically occurs at the moment I call billing.check(). I’m not yet at the stage of redirecting users to the subscription approval screen. This issue arises purely from the initial check.