Update buyer identity
Cart buyer identity is used for associating customer information with a cart. You should update cart buyer identity when customer information is available:
- Update
countryCode
when a customer changes site currency or locale so the cart will return pricing in the correct currency. - Update
customerAccessToken
when a customer logs into a customer account so the cart will return selected delivery options.
This guide shows you how to use the cart handler to update buyer identity.
Requirements
Anchor link to section titled "Requirements"- You've completed the quickstart guide.
- You've set up a cart handler.
Handle the buyer identity update
Anchor link to section titled "Handle the buyer identity update"Handle the buyer identity update in an action
. Use the cart
, created from createCartHandler
, to handle cart mutation requests to the Storefront API.
- Learn how to apply cart notes.