ShopPay not redirecting to my custom domain after payment

Topic summary

Issue: After completing Shop Pay, shoppers land on the default myshopify.com order confirmation instead of the merchant’s custom checkout subdomain (e.g., checkout.customdomain.com), breaking domain continuity and affecting attribution.

Context: Headless site using Shopify’s Storefront API (for custom storefronts). The checkoutCreate mutation (GraphQL call that creates a checkout) and subsequent flow were not consistently using the custom checkout subdomain.

Impact: Attribution/tracking concerns and inconsistent post-purchase experience.

Attempts: Some considered client-side redirects, but reliability was doubtful.

Resolution (from Shopify support):

  • Point a dedicated subdomain (e.g., checkout.customdomain.com) to Shopify.
  • Ensure all Storefront API requests, including the checkoutCreate mutation’s destination, use that same subdomain.
  • This keeps the entire checkout and thank-you page on the custom subdomain.

Action items:

  • Configure DNS and Shopify domain settings so the checkout subdomain resolves to Shopify.
  • Update API calls in the headless app to target the custom checkout domain.

Status: A clear workaround/solution is provided; no further unresolved questions were raised after the guidance.

Summarized with AI on February 10. AI used: gpt-5.

I’m seeing an issue where the Shop Pay module is not redirecting to my custom domain, after a transaction has been completed.

Here’s my flow:

1 ) Headless website (using Storefront API)
Located at:

customdomain.com

2 ) Custom domain for Shopify checkout
Located at:

checkout.customdomain.com/:id/orders/:orderId

3 ) Payment through ShopPay
Located at:

shop.app/pay/transactions/new/token/:token?locale=da&redirect_source=checkout_automatic_redirect

4 ) Order confirmation (this should redirect back to checkout.customdomain.com)
Redirected to:

store-name.myshopify.com/:id/orders/:orderId

Are you aware of this issue or is there any way to fix this through my settings in Shopify?

3 Likes

I’ve had the same issue and can effect attribution. Would be great if the redirect respected the custom domain url.

Hey there! Having the same issue and still waiting to hear from Shopify support on this problem. We are going to try client-side redirects but I don’t think it will work

Shopify support gave us the answer:

By directing a subdomain to Shopify, and updating Storefront API requests to be made against that subdomain, it ensures the entire web checkout flow remains on that subdomain right through to the checkout thank-you page.

So make sure the destination of your checkoutCreate mutation is your custom checkout domain (checkout.customdomain.com).