How to check if checkout object is valid @ js-buy-sdk

How to check if checkout object is valid @ js-buy-sdk

9re
Shopify Partner
2 0 2

When user chooses 'opt-out Shop Pay' or 'buy as a guest', checkout object seems to change to stale / invalid state.

 

This is a real webUrl of checkout object:

https://vinyl7records.myshopify.com/5524619352/checkouts/15a391b72db3900d75456b885a6aecdf?key=4ed0a3...

-> which redirects to:

https://vinyl7records.myshopify.com/checkouts/co/15a391b72db3900d75456b885a6aecdf

-> which redirects to:

https://vinyl7records.myshopify.com/

 

This redirect itself would be proper behaviour as this checkout object is already 'stale'.

 

I want to clear checkout object if the object is stale/invalid and create a new checkout object.

But how do I know the object is stale/invalid?

Replies 0 (0)