Re: Checkout on the same domain as the Headless Store

Checkout on the same domain as the Headless Store

hanebuechen2000
Shopify Partner
8 0 3

I am developing a headless Shopify Shop using Nextjs and React for the Frontend. I have built pretty much the whole store but I have so far been unable to build a custom headless checkout page because there is a plethora of conflicting, incomplete and incorrect information on that topic. I have now read people saying that you can use either the Storefront API, the Admin API with a custom sales channel, the Admin API alone, the Checkout API with a custom sales channel, the Checkout API alone or even the JS Buy SDK (which makes the least sense to me). Some people also say it is not possible at all and that you absolutely HAVE to redirect to a shopify domain, but I looked at all the Headless Shopify stores Shopify itself promotes and uses as references for headless stores on this page:

https://www.shopify.com/plus/solutions/headless-commerce

and these are the stores:

https://www.allbirds.eu/

https://grassrootscoop.com/

https://www.babylist.com/

https://www.wearfigs.com/

so I assume they are 100% positively Headless or Shopify is straight up lying. They ALL use a custom checkout either on the exact same domain as the rest of the store or on subdomain and NONE of them redirects the user to a different domain on checkout. Can now anyone give me a definite and most importantly CORRECT answer on how I can create a checkout page which will be located on the same domain the rest of my headless store or on a subdomain? If I would need to redirect the user from the domain of my Headless store to a Shopify owned domain to check out this will be absolutely positively make me change to a another technology for good.

Replies 8 (8)

dryfire
Tourist
7 0 5

Would like to know the same thing.

thesilk
Tourist
5 0 4

Would also like to know this

dryfire
Tourist
7 0 5

It can be done by setting up a subdomain and pointing your Shopify account to it. 

 

Something like: checkout.yoursite.com

haloDavid
Shopify Partner
3 0 0

Not just these,I found that this website(https://nisplaysports.com/) uses vue/nuxt, so it is definitely not Hydrogen, but it can also use custom checkout, which is too strange. Can someone tell me how this is done

haloDavid
Shopify Partner
3 0 0

I fixed this!you can use Nginx or Other proxy service

dryfire
Tourist
7 0 5

Can you provide more details?

haloDavid
Shopify Partner
3 0 0

It's not a front end problem but network problem, so I can't provide details, but you can learn network proxy, like Nginx, 

miteshbhagwant
Shopify Partner
9 0 1

we can use rest admin API to create order without redirect to Shopify checkout page.