Hi everyone,
We’re running into some critical issues while developing and deploying our Shopify embedded app, and we’re hoping someone might be able to point us in the right direction.
billing.check() Fails in Production
In our loader function, we’re using the following logic:
const { billing, session } = await authenticate.admin(request);
const { appSubscriptions } = await billing.check();
-
This works fine locally.
-
However, in production, it fails with a 404 error:
Billing API error for shop <shop>.myshopify.com: Received an error response (404 Not Found) from Shopify:
{
"networkStatusCode": 404,
"message": "GraphQL Client: Not Found",
"response": {}
}
If it helps, here’s the request ID from the error:
a35548ee-3e09-4b15-849e-5b159c4019b8-1758176731
This breaks our subscription flow, as we can’t validate whether a merchant is subscribed or not.
Our App Setup
We’re initializing the Shopify app like this:
const shopify = shopifyApp({
apiKey: process.env.SHOPIFY_API_KEY,
...
});
export const authenticate = shopify.authenticate;
All environment variables seem to be correctly set in both local and production environments.
Also we was forced to update the shopify CLI and now whenever we try to deploy the app or hit the production environment, we consistently get 500 Internal Server Errors. This blocks us from completing the release process.
Has anyone seen similar issues with billing.check() errors that appear only in production? Could this be related to API permissions, billing config, or something else environment-specific?
app.toml’s scopes
scopes = “read_customers,read_orders,read_products,write_customers,write_orders”
Any help would be much appreciated!