# useEmail Returns the email address of the buyer that is interacting with the cart. The value is `undefined` if the app does not have access to customer data. ## ### UseEmailGeneratedType Returns the email address of the buyer that is interacting with the cart. The value is `undefined` if the app does not have access to customer data. #### Returns: string | undefined export function useEmail< ID extends RenderExtensionPoint = RenderExtensionPoint, >(): string | undefined { const buyerIdentity = useApi().buyerIdentity; if (!buyerIdentity) { throw new ScopeNotGrantedError( 'Using buyer identity requires having personal customer data permissions granted to your app.', ); } return useSubscription(buyerIdentity.email); } ## Related - [StandardApi](https://shopify.dev/docs/api/checkout-ui-extensions/apis/standardapi) - [CheckoutApi](https://shopify.dev/docs/api/checkout-ui-extensions/apis/checkoutapi) - [OrderStatusApi](https://shopify.dev/docs/api/checkout-ui-extensions/apis/orderstatusapi) - [CartLineDetailsApi](https://shopify.dev/docs/api/checkout-ui-extensions/apis/cartlinedetailsapi) - [PickupPointsApi](https://shopify.dev/docs/api/checkout-ui-extensions/apis/pickuppointsapi) - [PickupLocationsApi](https://shopify.dev/docs/api/checkout-ui-extensions/apis/pickuplocationsapi) - [ShippingMethodDetailsApi](https://shopify.dev/docs/api/checkout-ui-extensions/apis/shippingmethoddetailsapi) - [ExtensionPoints](https://shopify.dev/docs/api/checkout-ui-extensions/apis/extensionpoints)