Authenticated Account
The API for interacting with an account in which the customer is fully authenticated.
Anchor to standardapiStandardApi
The base API object provided to this and other customer-account extension targets.
- Anchor to authenticatedAccountauthenticatedAccountAuthenticatedAccountrequired
Information about the authenticated account.
AuthenticatedAccount
- customer
Provides the customer information of the authenticated customer.
SubscribableSignalLike<Customer | undefined> - purchasingCompany
Provides the company info of the authenticated business customer. If the customer is not authenticated or is not a business customer, this value is `undefined`.
SubscribableSignalLike<PurchasingCompany | undefined>
export interface AuthenticatedAccount {
/**
* Provides the company info of the authenticated business customer.
* If the customer is not authenticated or is not a business customer, this value is `undefined`.
*/
purchasingCompany: SubscribableSignalLike<PurchasingCompany | undefined>;
/**
* Provides the customer information of the authenticated customer.
*/
customer: SubscribableSignalLike<Customer | undefined>;
}SubscribableSignalLike
Represents a read-only value managed on the main thread that an extension can subscribe to. Example: Checkout uses this to manage the state of an object and communicate state changes to extensions running in a sandboxed web worker. This interface is compatible with [Preact's ReadonlySignal](https://github.com/preactjs/signals/blob/a023a132a81bd4ba4a0bebb8cbbeffbd8c8bbafc/packages/core/src/index.ts#L700-L709). Some fields are deprecated but still supported for backwards compatibility. In version 2025-10, [`StatefulRemoteSubscribable`](https://github.com/Shopify/remote-dom/blob/03929aa8418a89d41d294005f219837582718df8/packages/async-subscription/src/types.ts#L17) was replaced with `ReadonlySignalLike`. Checkout will remove the old fields some time in the future.
- current
T - destroy
() => Promise<void> - subscribe
(fn: (value: T) => void) => () => void - value
T
export interface SubscribableSignalLike<T> extends ReadonlySignalLike<T> {
/**
* @deprecated Use `.value` instead.
*/
readonly current: T;
/**
* @deprecated No longer needed. Use Preact Signal management instead.
*/
destroy(): Promise<void>;
}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.
string
export interface Customer {
/**
* Customer ID.
*
* @example 'gid://shopify/Customer/123'
*/
id: string;
}PurchasingCompany
- company
Include information of the company of the logged in business customer.
Company - location
Include information of the company location of the logged in business customer.
CompanyLocation
export interface PurchasingCompany {
/**
* Include information of the company of the logged in business customer.
*/
company: Company;
/**
* Include information of the company location of the logged in business customer.
*/
location?: CompanyLocation;
}Company
- id
Company ID.
string
export interface Company {
/**
* Company ID.
*/
id: string;
}CompanyLocation
- id
Company location ID.
string
export interface CompanyLocation {
/**
* Company location ID.
*/
id: string;
}Examples
Example
Extension.jsx
import '@shopify/ui-extensions/preact'; import {render} from 'preact'; export default async () => { render(<Extension />, document.body); }; function Extension() { const orderStatusCustomerId = shopify.authenticatedAccount.customer.value .id; const authenticatedCustomerId = shopify.authenticatedAccount.customer.value .id; if ( authenticatedCustomerId && orderStatusCustomerId?.endsWith( authenticatedCustomerId, ) ) { return ( <s-banner> <s-link href="extension:manageLoyaltyPoints/"> {shopify.i18n.translate( 'manageLoyaltyPoints', )} </s-link> </s-banner> ); } return null; }locales/en.default.json
{ "manageLoyaltyPoints": "Manage Loyalty Points" }Getting the company and location of the customer
Description
You can access the company and location of the authenticated business customer to implement location specific logic.
Extension.jsx
/* See the locales/en.default.json tab for the translation keys and values for this example */ import '@shopify/ui-extensions/preact'; import {render} from 'preact'; export default async () => { render(<Extension />, document.body); }; function Extension() { const purchasingCompany = shopify.authenticatedAccount ?.purchasingCompany?.value; const companyLocationId = purchasingCompany?.location.id; if ( companyLocationId && isLocationClosed(companyLocationId) ) { return ( <s-banner status="warning"> {shopify.i18n.translate( 'closedLocationMessage', )} </s-banner> ); } return null; } function isLocationClosed(locationId) { return true; }locales/en.default.json
{ "closedLocationMessage": "This location is temporarily closed for inventory cleanup." }