# Buyer Identity The API for interacting with the buyer identity. ## OrderStatusApi The API object provided to this and other `customer-account.order-status` extension targets. ### Docs_OrderStatus_BuyerIdentityApi ### buyerIdentity Information about the buyer that is interacting with the order. {% include /apps/checkout/privacy-icon.md %} Requires access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data). ### OrderStatusBuyerIdentity ### customer The buyer's customer account. The value is undefined if the buyer isn’t a known customer for this shop or if they haven't logged in yet. {% include /apps/checkout/privacy-icon.md %} Requires access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data). ### email 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. {% include /apps/checkout/privacy-icon.md %} Requires level 2 access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data). ### phone The phone number of the buyer that is interacting with the cart. The value is `undefined` if the app does not have access to customer data. {% include /apps/checkout/privacy-icon.md %} Requires level 2 access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data). ### purchasingCompany Provides details of the company and the company location that the business customer is purchasing on behalf of. This includes information that can be used to identify the company and the company location that the business customer belongs to. {% include /apps/checkout/privacy-icon.md %} Requires access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data). ### OrderStatusCustomer Information about a customer who has previously purchased from this shop. {% include /apps/checkout/privacy-icon.md %} Requires access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data). ### acceptsMarketing Defines if the customer accepts marketing activities. {% include /apps/checkout/privacy-icon.md %} Requires level 1 access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data). ### email The email of the customer. {% include /apps/checkout/privacy-icon.md %} Requires level 2 access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data). ### firstName The first name of the customer. {% include /apps/checkout/privacy-icon.md %} Requires level 2 access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data). ### fullName The full name of the customer. {% include /apps/checkout/privacy-icon.md %} Requires level 2 access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data). ### id Customer ID. {% include /apps/checkout/privacy-icon.md %} Requires level 1 access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data). ### image The image associated with the customer. {% include /apps/checkout/privacy-icon.md %} Requires level 1 access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data). ### lastName The last name of the customer. {% include /apps/checkout/privacy-icon.md %} Requires level 2 access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data). ### phone The phone number of the customer. {% include /apps/checkout/privacy-icon.md %} Requires level 2 access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data). ### storeCreditAccounts The Store Credit Accounts owned by the customer and usable during the checkout process. {% include /apps/checkout/privacy-icon.md %} Requires level 1 access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data). ### ImageDetails ### altText The alternative text for the image. ### url The image URL. ### StoreCreditAccount Information about a Store Credit Account. ### balance The current balance of the Store Credit Account. ### id A globally-unique identifier. ### Money ### amount The price amount. ### currencyCode The ISO 4217 format for the currency. ### CurrencyCode 'AED' | 'AFN' | 'ALL' | 'AMD' | 'ANG' | 'AOA' | 'ARS' | 'AUD' | 'AWG' | 'AZN' | 'BAM' | 'BBD' | 'BDT' | 'BGN' | 'BHD' | 'BIF' | 'BMD' | 'BND' | 'BOB' | 'BOV' | 'BRL' | 'BSD' | 'BTN' | 'BWP' | 'BYN' | 'BZD' | 'CAD' | 'CDF' | 'CHE' | 'CHF' | 'CHW' | 'CLF' | 'CLP' | 'CNY' | 'COP' | 'COU' | 'CRC' | 'CUC' | 'CUP' | 'CVE' | 'CZK' | 'DJF' | 'DKK' | 'DOP' | 'DZD' | 'EGP' | 'ERN' | 'ETB' | 'EUR' | 'FJD' | 'FKP' | 'GBP' | 'GEL' | 'GHS' | 'GIP' | 'GMD' | 'GNF' | 'GTQ' | 'GYD' | 'HKD' | 'HNL' | 'HRK' | 'HTG' | 'HUF' | 'IDR' | 'ILS' | 'INR' | 'IQD' | 'IRR' | 'ISK' | 'JMD' | 'JOD' | 'JPY' | 'KES' | 'KGS' | 'KHR' | 'KMF' | 'KPW' | 'KRW' | 'KWD' | 'KYD' | 'KZT' | 'LAK' | 'LBP' | 'LKR' | 'LRD' | 'LSL' | 'LYD' | 'MAD' | 'MDL' | 'MGA' | 'MKD' | 'MMK' | 'MNT' | 'MOP' | 'MRU' | 'MUR' | 'MVR' | 'MWK' | 'MXN' | 'MXV' | 'MYR' | 'MZN' | 'NAD' | 'NGN' | 'NIO' | 'NOK' | 'NPR' | 'NZD' | 'OMR' | 'PAB' | 'PEN' | 'PGK' | 'PHP' | 'PKR' | 'PLN' | 'PYG' | 'QAR' | 'RON' | 'RSD' | 'RUB' | 'RWF' | 'SAR' | 'SBD' | 'SCR' | 'SDG' | 'SEK' | 'SGD' | 'SHP' | 'SLL' | 'SOS' | 'SRD' | 'SSP' | 'STN' | 'SVC' | 'SYP' | 'SZL' | 'THB' | 'TJS' | 'TMT' | 'TND' | 'TOP' | 'TRY' | 'TTD' | 'TWD' | 'TZS' | 'UAH' | 'UGX' | 'USD' | 'USN' | 'UYI' | 'UYU' | 'UYW' | 'UZS' | 'VES' | 'VND' | 'VUV' | 'WST' | 'XAF' | 'XAG' | 'XAU' | 'XBA' | 'XBB' | 'XBC' | 'XBD' | 'XCD' | 'XDR' | 'XOF' | 'XPD' | 'XPF' | 'XPT' | 'XSU' | 'XTS' | 'XUA' | 'XXX' | 'YER' | 'ZAR' | 'ZMW' | 'ZWL' ### OrderStatusPurchasingCompany Information about a company that the business customer is purchasing on behalf of. ### company Includes information of the company that the business customer is purchasing on behalf of. {% include /apps/checkout/privacy-icon.md %} Requires access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data). ### location Includes information of the company location that the business customer is purchasing on behalf of. {% include /apps/checkout/privacy-icon.md %} Requires access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data). ### OrderStatusCompany ### externalId The external ID of the company that can be set by the merchant. {% include /apps/checkout/privacy-icon.md %} Requires level 1 access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data). ### id The company ID. {% include /apps/checkout/privacy-icon.md %} Requires level 1 access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data). ### name The name of the company. {% include /apps/checkout/privacy-icon.md %} Requires level 1 access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data). ### OrderStatusCompanyLocation ### externalId The external ID of the company location that can be set by the merchant. {% include /apps/checkout/privacy-icon.md %} Requires level 1 access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data). ### id The company location ID. {% include /apps/checkout/privacy-icon.md %} Requires level 1 access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data). ### name The name of the company location. {% include /apps/checkout/privacy-icon.md %} Requires level 1 access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data). ## Related - [Order status page](/docs/apps/customer-accounts/order-status-page#pre-authenticated-order-status-page) ## useCustomer Returns the current `Customer`. The value is `undefined` if buyer hasn't logged in yet. ### UseCustomerGeneratedType Returns the current `Customer`. The value is `undefined` if the buyer isn't a known customer for this shop or if they haven't logged in yet. #### Returns: Customer | undefined export function useCustomer< Target extends RenderOrderStatusExtensionTarget = RenderOrderStatusExtensionTarget, >(): Customer | undefined { const buyerIdentity = useInternalBuyerIdentity(); return useSubscription(buyerIdentity.customer); } ### Customer Information about the authenticated customer. {% include /apps/checkout/privacy-icon.md %} Requires access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data). ### id Customer ID. ## Related - [Order status page](/docs/apps/customer-accounts/order-status-page#pre-authenticated-order-status-page) ## 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< Target extends RenderOrderStatusExtensionTarget = RenderOrderStatusExtensionTarget, >(): string | undefined { const buyerIdentity = useInternalBuyerIdentity(); return useSubscription(buyerIdentity.email); } ## Related - [Order status page](/docs/apps/customer-accounts/order-status-page#pre-authenticated-order-status-page) ## usePhone Returns the phone number of the buyer that is interacting with the cart. The value is `undefined` if the app does not have access to customer data. ### UsePhoneGeneratedType Returns the phone number 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 usePhone< Target extends RenderOrderStatusExtensionTarget = RenderOrderStatusExtensionTarget, >(): string | undefined { const buyerIdentity = useInternalBuyerIdentity(); return useSubscription(buyerIdentity.phone); } ## Related - [Order status page](/docs/apps/customer-accounts/order-status-page#pre-authenticated-order-status-page) ## usePurchasingCompany Provides information about the company and its location that the business customer is purchasing on behalf of during a B2B checkout. It includes details that can be utilized to identify both the company and its corresponding location to which the business customer belongs. The value is `undefined` if a business customer isn't logged in. This function throws an error if the app doesn't have access to customer data. ### UsePurchasingCompanyGeneratedType Provides information about the company and its location that the business customer is purchasing on behalf of during a B2B checkout. It includes details that can be utilized to identify both the company and its corresponding location to which the business customer belongs. The value is `undefined` if a business customer isn't logged in. This function throws an error if the app doesn't have access to customer data. #### Returns: PurchasingCompany | undefined export function usePurchasingCompany< Target extends RenderOrderStatusExtensionTarget = RenderOrderStatusExtensionTarget, >(): PurchasingCompany | undefined { const buyerIdentity = useInternalBuyerIdentity(); return useSubscription(buyerIdentity.purchasingCompany); } ### PurchasingCompany ### company Include information of the company of the logged in business customer. ### Company ### id Company ID. ## Related - [Order status page](/docs/apps/customer-accounts/order-status-page#pre-authenticated-order-status-page)