I’m working on a headless storefront that allows customers to checkout using the web url that gets returned from the Storefront API (2022-10), and I’m having trouble persisting customer data between the headless site and the web checkout experience.
After some trial and error, I found that the steps outlined in this article worked for persisting logged-in customer information in the checkout. However, I’m still having trouble removing that information from the checkout if the customer logs out during the session – even if customer data is no longer accessible on the headless site, it still pre-populates when the customer is sent to the checkout web url.
When I check the docs, it looks like the checkoutCustomerDisassociateV2 mutation could be used to wipe the customer info, but I’m not having any success with it. The mutation fires successfully, I don’t get any errors, but it doesn’t have any noticeable effect when I actually visit the checkout.
Has anyone had experience with this? I can’t find much discussion/documentation online, and I want to make sure my approach is correct. Happy to provide more detail where needed.