How to retrieve Cart ID

ShahnasEk
Shopify Partner
7 0 0

Hello,

 

I'm trying to migrate from Checkout API to Cart API. I have currently used the cartCreate API to create the cart and fetch the cart id for a logged in user. If the user has logged out, how do I get the Cart ID to retrieve the cart? I was thinking of storing the cart id and use it to retrieve the cart of that user. But this could create issue in case another user logs in with the same device. So, how do I fetch the cart id associated with a customer?

Replies 0 (0)