Do Checkouts created via the Storefront API ever expire?

Solved

Do Checkouts created via the Storefront API ever expire?

chris217
Tourist
4 0 0

I'm building a frontend for a checkout experience, and am planning on storing the Storefront Checkout GraphQL ID in my DB after the Checkout is created. Will this ID be valid forever, or is there some expiry period where the Checkout gets cleaned up in Shopify? Similarly, if an order is placed for that Checkout, will I still be able to fetch the Checkout via the Storefront API?

 

Thanks!

Accepted Solution (1)

hassain
Shopify Staff (Retired)
624 104 188

This is an accepted solution.

Hey @chris217 ,

 

Using the Storefront API, you will only have access to the last incomplete checkout from a customer. (https://shopify.dev/docs/storefront-api/reference/object/customer#lastincompletecheckout-2020-01)

 

If an order is made from a checkout, it is considered as "completed" from Shopify's perspective and you will not be able to fetch that Checkout anymore. If an order is not made from it, it is considered "incomplete" or "abandoned". In this case with the Storefront API you will be able to keep track of a Customer's last incomplete checkout for about 3 months, before the record of it will be purged from Shopify. 

 

 

To learn more visit the Shopify Help Center or the Community Blog.

View solution in original post

Replies 3 (3)

hassain
Shopify Staff (Retired)
624 104 188

This is an accepted solution.

Hey @chris217 ,

 

Using the Storefront API, you will only have access to the last incomplete checkout from a customer. (https://shopify.dev/docs/storefront-api/reference/object/customer#lastincompletecheckout-2020-01)

 

If an order is made from a checkout, it is considered as "completed" from Shopify's perspective and you will not be able to fetch that Checkout anymore. If an order is not made from it, it is considered "incomplete" or "abandoned". In this case with the Storefront API you will be able to keep track of a Customer's last incomplete checkout for about 3 months, before the record of it will be purged from Shopify. 

 

 

To learn more visit the Shopify Help Center or the Community Blog.

chris217
Tourist
4 0 0

Thanks @hassain! This was just the info I was looking for.

learnerSquad
Shopify Partner
6 0 0

So is it safe to say that checkoutUrl is valid for 30 days?