I really thought that I was gonna be able to pass the Shopify App review process for my first app PulseVote on the first try. Turns out I was wrong (timesIveBeenWrong++
). My app was rejected because it was stuck in a billing loop, meaning that the request billing screen kept appearing and would not allow the reviewer to pass the screen. My app requires billing straight away when the user first installs it.
After a ton of googling I finally started to get some useful results. When my application first loads it checks to see if there is an active subscription. If there is not an active subscription it will present the Request Billing
screen (screenshot above). Here's my app._index.tsx
file
export async function loader({ request }: LoaderFunctionArgs) {
const { billing, session } = await authenticate.admin(request);
const billingCheck = await billing.require({
// @ts-ignore
plans: [EARLY_MONTHLY_PLAN],
isTest: false,
onFailure: async () =>
billing.request({
// @ts-ignore
plan: EARLY_MONTHLY_PLAN,
isTest: false,
}),
});
The issue is that I was setting isTest: false
. I was setting this dynamically by checking the store slug to see if it was in a list of development stores I use. To me this makes sense, since I am deploying a production application. I thought that the Shopify app reviewers would have some way to bypass this when they are installing the app on their test stores.
Turns out I was wrong. The fix was simply setting isTest: true
while the app was being reviewed. After the app was finally approved, I flipped this back to isTest: false
. The simplest way to accomplish this is with a environment variable or configuration variable that can easily be changed.
Shopify's documentation doesn't give any context or information about what to do for this. There are two pages on Billing but none show how to handle this case. I hope this helps anyone who might be hitting this problem in the future.
👋 If you this post helped you please subscribe to continue supporting my work and learn more about Shopify Development.
Shopify Billing & App Review Process
How to pass the Shopify App review process with the Shopify Billing API