I would like to use a custom (out-of-Shopify) page for a user to build their highly customised product and then add it to a Shopify cart and redirect the user to it to do the actual payment, confirmation etc.
It looks like I can create a cart (a checkout?) in both APIs:
- admin API (POST /admin/checkouts.json): https://help.shopify.com/api/reference/checkout
- storefront API (“mutation{checkoutCreate..”): https://help.shopify.com/api/storefront-api/guides/checkout-guide#creating-the-checkout
And there is a “web_url”/“webUrl” property in both cases which I would use to redirect the user to the checkout page.
So, why should I choose one API over the other?
On the admin API page about managing checkout there is even a note “You can’t use the Checkout API to create a new checkout user experience for an individual store. For that you need to use an SDK that’s powered by the Storefront API instead”. So, why can’t I use that API?
UPDATE Oh, I got a checkout creation working and it turns out wat I actually want is to create a cart not a checkout. Is that even possible? I did not see a reference to carts in the API docs, only checkouts.