App reviews, troubleshooting, and recommendations
Hi everyone,
I'm trying to set up a 7-day free trial for my Shopify app subscription using the Billing API, but the trial is not being applied. The subscription works, but the free trial is not included. This issue occurs only in production—locally, everything works fine.
Here’s the code I’m using:
const return_url = `${ENV_HOST}/confirmation/plan-confirmation/${shop_name}/${planType}`; const confirmation_url = await axiosService.subscribeToPlan({ name: `plan`, price: selectedPlan.rate, return_url, trial_days: 7, }); async subscribeToPlan({ name, price, return_url, trial_days, test }) { const queryString = { query: subscribeToPlanMutation, variables: { name, test, trialDays: trial_days, returnUrl: return_url, lineItems: [ { plan: { appRecurringPricingDetails: { price: { amount: price, currencyCode: "USD", }, interval: "EVERY_30_DAYS", }, }, }, ], }, }; const resp = await this.post("/graphql.json", JSON.stringify(queryString)); const { confirmationUrl, userErrors } = resp.data.data.appSubscriptionCreate; if (confirmationUrl) { return confirmationUrl; } else if (userErrors) { for (const item of userErrors) { console.error("Error:", item.message); throw new Error(item.message); } } }
Has anyone faced this issue before? Any ideas on what I might be missing?
Thanks in advance! 🚀
Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025