Issue with cartBuyerIdentityUpdate not persisting in Shopify Headless Checkout

Hey everyone,

during our Shopify Headless implementation, we encountered an issue with user authentication and cart buy identity persistence. Here’s the user flow:

A user logs in on our site. After a successful login, we update the cart’s buyer identity using cartBuyerIdentityUpdate. The GraphQL response returns a 200 status with no errors, and the updated buyer identity appears correctly in the cart session response.

However, when the user proceeds to checkout via the generated checkout URL:

The user information is not prefilled or associated with the checkout.

Instead, the user is redirected to the login page specified in our Shopify configuration.

Has anyone encountered a similar issue? Any insights on how to ensure the buyer identity persists in checkout?

Thanks in advance!

PS: I’m also testing all the calls directly in the Shopify GraphiQL app with the same result, the user identity is NOT associated with the checkout.

Hi, are you using the customer account API for authenticating the user? Are you using Hydrogen or your own headless setup?

We use our own headless setup with the Headless (Storefront API). With the graphql following endpoints customerAccessTokenCreate and cartBuyerIdentityUpdate.

This problem has also been mentioned several times in the following Github thread: https://github.com/Shopify/storefront-api-feedback/discussions/105#discussioncomment-12799379, which describes the problem