[BUG] Storefront API - Express checkout will not delete cart

It appears that there is a bug for carts which complete via the “Express Checkout” “Shop Pay” & “G Pay” options, Shopify GQL API will still return the cart in that scenario, but it shouldn’t.

As per the documentation:

  • Shopify automatically deletes the cart when the customer completes their checkout.

This functionality is used for store fronts to confirm if a cart has completed. As far as I am aware, there is no other way at the time of writing.

I have not tested all the other Express options as they are not enabled on this store but I suspect given 2 of 2 are not working correctly, it is worth checking the others.

To confirm, the standard (non-express) checkout option does return null after checkout completes.

This is causing issues where repeat customers are processing incorrect orders, so I would appreciate some support.

I have reported this in a couple places already:

But given the activity in the discussions on this repo is over 1 year old, I don’t know if the maintainers there genuinely work at Shopify still or have other responsibilities now.

Can anyone help?

Thanks

From Shopify support:

After publishing version 2023-01 of Shopify’s APIs, we’ve gone back and reviewed the remaining affected example you shared where you were receiving a non null response (“cart”: {“id”:“xxxxxxxxxxx”). We’re seeing that after this latest update, the current supported version of the Storefront API receives null responses, and that the same request on depreciated versions, receives error responses.

So basically, express checkouts have never worked until the 2023-01 version of the Storefront API!

And later:

why the behaviour of version 2021-10 for the Storefront API would change if no fixes were published for it. With every update to Shopify’s APIs, depreciated versions will become unsupported and no longer respond as expected. Even though we don’t necessarily change how that particular version of the API behaves, updates we make to current versions will, for lack of a better term, “disconnect” endpoints in older versions.

While I understand the idea behind versioning like this, it’s pretty crappy that 2021-10 could just stop working all together… only 15months after it was released. Surely there should be warnings all over the docs, but I guess that’s a separate issue.