Skip to main content
Migrate to Polaris

Version 2025-07 is the last API version to support React-based UI components. Later versions use web components, native UI elements with built-in accessibility, better performance, and consistent styling with Shopify's design system. Check out the migration guide to upgrade your extension.

Buyer Identity API

Requires access to protected customer data. The customer and purchasingCompany properties require level 1 access. The email and phone properties require level 2 access.

The Buyer Identity API provides information about the buyer who placed the order, including their customer account, email, phone, and B2B company details. Use it to display buyer information or personalize the Order status page experience.

  • Display buyer details: Show the buyer's email or phone number alongside their order information.
  • Identify B2B orders: Detect B2B orders and display company-specific information such as the company name or location.
  • Guest vs. signed-in detection: Determine if the buyer has a customer account or is checking out as a guest.

The Buyer Identity API object provides buyer identity information from the order. Access the following properties on the API object to read buyer data.

Anchor to buyerIdentity
buyerIdentity

Information about the buyer who placed the order, including their customer account, email, phone, and B2B company details.


  • Check for undefined customer: The customer property is undefined when the buyer isn't signed in. Always verify the customer exists before accessing their details.
  • Handle B2B customers separately: Use usePurchasingCompany to detect B2B orders and display company-specific information like the company name and location.

  • The customer property represents the customer account at the time the order was placed. If the buyer's account details (such as email or name) have changed since then, the data returned may not reflect those updates.

Was this page helpful?