I’ve searched everywhere for this question; and since its so hard to figure out, I’m guessing its not possible but I thought I might as well ask.
Is it possible, using Shopify’s API, to completely populate a custom website on my server and then when someone is ready to checkout send them back to shopify’s checkout page?
So example flow;
- my shopify site is xyz.myshopify.com
- My server has a site located on buypizza.com is a simple ecommerce site with a HTML theme. I pull product data from the API and populate the site home page
- A user clicks into a product – lets call it pizza box
- then I send a request to shopify’s api to pull all the data related to pizza box and populate the product page.
this is where I dont know how this would work
- They hit add to cart; I can store that data in a session but how does shopify know this?
- Then I hit checkout and it takes me back to xyz.shopify.com – what am I missing. Is this not possible?
2
Answers
yes you can use shopify to create order for your user
draft order api
The solution is definitly possible.
You might wanna give a look at the Shopify Storefront API (GraphQL).
About your question concerning the checkout process you have 2 options. One is to redirect the user to the default Shopify checkout (as you seem to want), and the other one is to handle the process "yourself". See this link.
If you’re familiar with gatsby, you can have a look at their official doc to see an example