Accepting credit cards, warehouses, and shipping and fulfilling orders
We are a Shopify Plus client and we have a custom storefront (nextjs app). As a business that is a combination of a service and a store it is very important that users do not change their email address during their checkout process as this will result in Shopify creating a new account for them.
See the following scenario:
1. User goes to our web app (https://app.OUR_DOMAIN.co.uk) and retrieves their checkout by logging in into Storefront API
2. When user is ready to make an order, we log them in into Shopify using Multipass
3. User then ends up on Shopify Checkout page on our primary domain (e.g. https://OUR_DOMAIN.co.uk/33977925764/checkouts/CHECKOUT_ID)
Notice user is shown as logged in on Checkout page
4. User selects PayPal Express and logs in using their PayPal credentials
5. User is then redirected back to Shopify Checkout, but they are now shown as NOT logged in any longer (url is https://OUR_HANDLE.myshopify.com/33977925764/checkouts/CHECKOUT_ID?refresh_count=1) -> notice the *.myshopify.com domain
Expected: user to be still shown as logged in.
In Shopify Admin we have the option to redirect user to Primary Domain selected
@Marcus_ , so this is the solution that Shopify support proposed and (that worked for us).
When you call Storefront API to create or amend users' checkouts, the URL must have your primary custom domain as the base, e.g.
```
// instead of
https://<MY_HANDLE>.myshopify.com/api/2011-04/graphql.json
// change to
https://<MY_CUSTOM_DOMAIN>/api/2011-04/graphql.json (assuming your checkout url is `https://<MY_CUSTOM_DOMAIN>/checkout/...`
```
The fix will not resolve the issue retrospectively, so only new checkouts created with <MY_CUSTOM_DOMAIN> storefront URL will have user logged in automatically
Explore the 30-30-30 rule, a dynamic social media strategy for new businesses. Learn how t...
By Trevor Sep 20, 2023Discover how to leverage the often overlooked footer of your ecommerce site to gain custom...
By Skye Sep 15, 2023In this blog, we’ll be shining a light on Shopify Partners, Experts, and Affiliates. Who a...
By Imogen Sep 13, 2023