What's your biggest current challenge? Have your say in Community Polls along the right column.
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.

Re: How long does a cart session live?

Solved

How long does a cart session live?

ChloeWu_EMW3
Visitor
2 0 0

Hi there ~

I am using Cart API for building shopping cart for the Hydrogen App. I'm wondering when does the cart session expire?  Thanks!

Accepted Solution (1)

Liam
Community Manager
3108 344 895

This is an accepted solution.

Hi ChloeWu_EMW3,

 

Unused and abandoned carts automatically expire within 10 days of creation - you can learn more about working with the cart for custom storefronts in our dev docs here

 

Hope this helps,

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

View solution in original post

Replies 3 (3)

Liam
Community Manager
3108 344 895

This is an accepted solution.

Hi ChloeWu_EMW3,

 

Unused and abandoned carts automatically expire within 10 days of creation - you can learn more about working with the cart for custom storefronts in our dev docs here

 

Hope this helps,

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

ChloeWu_EMW3
Visitor
2 0 0

Thank you for your response!

relaxue
Shopify Partner
4 0 2

What happens if on the client, you try to add/remove an item from this expired cart ID? Will the mutation just fail? Or will a new cart with a new ID be created but with the same items as the old one?

 

Or if you try to query for an expired cart, will it just return null?

 

Thanks!