App reviews, troubleshooting, and recommendations
In my shopify app I utilised the following code, standard shopify code, in the loader function to handle the billing process:
const response = await admin.graphql( `#graphql mutation AppSubscriptionCreate($name: String!, $lineItems: [AppSubscriptionLineItemInput!]!, $test: Boolean, $returnUrl: URL!, $trialDays: Int ) { appSubscriptionCreate(name: $name, returnUrl: $returnUrl, lineItems: $lineItems, test: $test, trialDays: $trialDays) { userErrors { field message } appSubscription { id } confirmationUrl } }`, { variables: { "name": "desiredName", "returnUrl": desiredURL, "test": true, "lineItems": [ { "plan": { "appRecurringPricingDetails": { "price": { "amount": 20.0, "currencyCode": "EUR" }, "interval": "EVERY_30_DAYS" } } } ], "trialDays": 14 }, }, ); const billing_data = await response.json(); const confirmationUrl = billing_data.data.appSubscriptionCreate.confirmationUrl; redirect(confirmationUrl, { target: "_parent" });
But during transition to the payment page (confirmationUrl) for some seconds I see a code "200" on my page:
Meanwhile in the browser's console some errors show up. But , after some seconds it redirects to the correct payment page. Any idea what is the problem and how can I resolve it?
I am unsure about Shopify's redirect function, but maybe you can try "window.open(confirmationUrl, '_parent')" instead and see if that has the same issue.
Gojiberry - Best post-purchase survey and feedback app for Shopify | Install on App Store for free
Shopify Community is helpful, BUT... why not start asking your customers for feedback instead?
Thank you for your suggestion. But, unfortunately it ends up at the same issue.
June brought summer energy to our community. Members jumped in with solutions, clicked ...
By JasonH Jun 5, 2025Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025