checkoutCreate redirect issue with custom store domain

Shopify Partner
12 0 1



We're using the Storefront API mutation createCheckout, the returned webUrl property in particular.



1) The customer is already logged-in to the shop.

2) The shop uses a custom domain, for example


createCheckout returns the default shopify domain instead of the custom domain (no surprise):

When copy&pasting this URL into the browser, the shop redirects to the following URL although the customer is already logged in:

But when replacing with before pasting the URL, it redirects directly to the checkout without a log-in prompt.


An "easy fix" is replacing the domains programmatically right after calling the checkoutCreate call.

But the issue seems to be more complicated:

For example, when choosing PayPal Express during checkout, the PayPal pop up opens. When completing the PayPal steps, the popup closes and the main browser again redirects to instead of the custom domain. This means the customer is again asked to log-in, although he already is logged-in.


The first issue with copy&pasting the two different domains can be reproduced with any browser while logged-in to a shopify store as customer.


The second issue with PayPal is a bit more complicated:

The latest Chrome browser handles the redirect after the popup closes without presenting the log-in form.

A chromium based browser such as CefSharp hits the log-in page and the url parameters are exactly as shown above although the domain had been replaced with the custom domain before initiating the checkout. For some reason PayPal seems to use the default Shopify-domain internally.


Why the browsers behave differently in this case is a miracle to me...


Is this the expected behaviour? Can PayPal be configured in a way that it uses the custom domain?


Shopify Staff
Shopify Staff
491 97 88

This is an accepted solution.

Hey @29Palms 


When you call the API from the client you can pass in the custom domain so that the URL returns the custom domain right off the bat. Can you confirm after making this change you are still experiencing the same domain issues? 


Vix | Developer Support @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Click Accept as Solution 

1 Like
Shopify Partner
12 0 1

Hi Vix,


awesome thank you! It now seems so obvious, silly me!

1 Like