Have your say in Community Polls: What was/is your greatest motivation to start your own business?
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Support for creating Cart objects using Storefront API

Support for creating Cart objects using Storefront API

KTNinja
Shopify Partner
19 1 2

Hello, I'm integrating an App from Shopify's App Store called "OrderBump" to my Shopify store that reads from the Cart object in the checkout page for potential upsells. The Storefront API is currently integrated headlessly and I'm using Checkout API to create the checkout.

I found that there's 2 types of checkout urls, one from the Cart's checkoutUrl (https://shopify.dev/api/storefront/reference/checkouts/cart) and from Checkout's webUrl (https://shopify.dev/api/storefront/reference/checkouts/checkout)

I'm wondering if it's possible to create/manage Shopify's Cart object using Storefront API? Or if it will be a feature in future versions of the API and if there's any recommended workaround to modify Shopify's Cart object headlessly?

Ideally, upon going to the checkout page from Checkout's webUrl, the Cart object will be filled with lineItems added to Checkout and any modifications to either objects will update the checkout page, that'll be great!

Or if we can generate a Cart object's checkoutUrl from the Checkout object that contains this Cart object at the checkout page, or if the Checkout's webUrl already contains a cart object that can be modified.

Replies 0 (0)