--- title: Extension description: The API for interacting with the metadata of an extension. api_version: 2025-07 api_name: customer-account-ui-extensions source_url: html: https://shopify.dev/docs/api/customer-account-ui-extensions/2025-07/apis/extension md: https://shopify.dev/docs/api/customer-account-ui-extensions/2025-07/apis/extension.md --- # ExtensionAPI The API for interacting with the metadata of an extension. ## StandardApi The base API object provided to this and other `customer-account` extension targets. * extension Extension required Meta information about the extension. ### Extension Meta information about an extension target. * apiVersion The API version that was set in the extension config file. ```ts ApiVersion ``` * capabilities The allowed capabilities of the extension, defined in your \[shopify.ui.extension.toml]\(/docs/api/checkout-ui-extensions/configuration) file. \* \[\`api\_access\`]\(/docs/api/checkout-ui-extensions/configuration#api-access): the extension can access the Storefront API. \* \[\`network\_access\`]\(/docs/api/checkout-ui-extensions/configuration#network-access): the extension can make external network calls. \* \[\`block\_progress\`]\(/docs/api/checkout-ui-extensions/configuration#block-progress): the extension can block a buyer's progress and the merchant has allowed this blocking behavior. ```ts StatefulRemoteSubscribable ``` * editor Information about the editor where the extension is being rendered. The value is undefined if the extension is not rendering in an editor. ```ts Editor ``` * rendered Whether your extension is currently rendered to the screen. Shopify might render your extension before it's visible in the UI, typically to pre-render extensions that will appear on a later step of the checkout. Your extension might also continue to run after the buyer has navigated away from where it was rendered. The extension continues running so that your extension is immediately available to render if the buyer navigates back. ```ts StatefulRemoteSubscribable ``` * scriptUrl The URL to the script that started the extension target. ```ts string ``` * target The identifier that specifies where in Shopify’s UI your code is being injected. This will be one of the targets you have included in your extension’s configuration file. ```ts Target ``` * version The published version of the running extension target. For unpublished extensions, the value is \`undefined\`. ```ts string ``` ```ts export interface Extension { /** * The API version that was set in the extension config file. * * @example '2023-04', '2023-07' */ apiVersion: ApiVersion; /** * The allowed capabilities of the extension, defined * in your [shopify.ui.extension.toml](/docs/api/checkout-ui-extensions/configuration) file. * * * [`api_access`](/docs/api/checkout-ui-extensions/configuration#api-access): the extension can access the Storefront API. * * * [`network_access`](/docs/api/checkout-ui-extensions/configuration#network-access): the extension can make external network calls. * * * [`block_progress`](/docs/api/checkout-ui-extensions/configuration#block-progress): the extension can block a buyer's progress and the merchant has allowed this blocking behavior. */ capabilities: StatefulRemoteSubscribable; /** * Information about the editor where the extension is being rendered. * * The value is undefined if the extension is not rendering in an editor. */ editor?: Editor; /** * Whether your extension is currently rendered to the screen. * * Shopify might render your extension before it's visible in the UI, * typically to pre-render extensions that will appear on a later step of the * checkout. * * Your extension might also continue to run after the buyer has navigated away * from where it was rendered. The extension continues running so that * your extension is immediately available to render if the buyer navigates back. */ rendered: StatefulRemoteSubscribable; /** * The URL to the script that started the extension target. */ scriptUrl: string; /** * The identifier that specifies where in Shopify’s UI your code is being * injected. This will be one of the targets you have included in your * extension’s configuration file. * * @example 'customer-account.order-status.block.render' * @see /docs/api/checkout-ui-extensions/unstable/extension-targets-overview * @see /docs/apps/app-extensions/configuration#targets */ target: Target; /** * The published version of the running extension target. * * For unpublished extensions, the value is `undefined`. * * @example 3.0.10 */ version?: string; } ``` ### ApiVersion Union of supported API versions ```ts '2023-04' | '2023-07' | '2023-10' | '2024-01' | '2024-04' | '2024-07' | '2024-10' | '2025-01' | '2025-04' | 'unstable' ``` ### Capability The capabilities an extension has access to. \* \[\`api\_access\`]\(/docs/api/checkout-ui-extensions/configuration#api-access): the extension can access the Storefront API. \* \[\`network\_access\`]\(/docs/api/checkout-ui-extensions/configuration#network-access): the extension can make external network calls. \* \[\`block\_progress\`]\(/docs/api/checkout-ui-extensions/configuration#block-progress): the extension can block a buyer's progress and the merchant has allowed this blocking behavior. \* \[\`collect\_buyer\_consent.sms\_marketing\`]\(/docs/api/checkout-ui-extensions/configuration#collect-buyer-consent): the extension can collect buyer consent for SMS marketing. \* \[\`collect\_buyer\_consent.customer\_privacy\`]\(/docs/api/checkout-ui-extensions/configuration#collect-buyer-consent): the extension can register buyer consent decisions that will be honored on Shopify-managed services. \* \[\`iframe.sources\`]\(/docs/api/checkout-ui-extensions/configuration#iframe): the extension can embed an external URL in an iframe. ```ts 'api_access' | 'network_access' | 'block_progress' | 'collect_buyer_consent.sms_marketing' | 'collect_buyer_consent.customer_privacy' | 'iframe.sources' ``` ### Editor * type Indicates whether the extension is rendering in the checkout editor. ```ts "checkout" ``` ```ts export interface Editor { /** * Indicates whether the extension is rendering in the checkout editor. */ type: 'checkout'; } ``` ## use​Extension() Returns the metadata of the extension. ### Returns * Extension ### Extension * apiVersion ApiVersion The API version that was set in the extension config file. * capabilities StatefulRemoteSubscribable\ The allowed capabilities of the extension, defined in your [shopify.ui.extension.toml](https://shopify.dev/docs/api/checkout-ui-extensions/configuration) file. * [`api_access`](https://shopify.dev/docs/api/checkout-ui-extensions/configuration#api-access): the extension can access the Storefront API. * [`network_access`](https://shopify.dev/docs/api/checkout-ui-extensions/configuration#network-access): the extension can make external network calls. * [`block_progress`](https://shopify.dev/docs/api/checkout-ui-extensions/configuration#block-progress): the extension can block a buyer's progress and the merchant has allowed this blocking behavior. * rendered StatefulRemoteSubscribable\ Whether your extension is currently rendered to the screen. Shopify might render your extension before it's visible in the UI, typically to pre-render extensions that will appear on a later step of the checkout. Your extension might also continue to run after the buyer has navigated away from where it was rendered. The extension continues running so that your extension is immediately available to render if the buyer navigates back. * scriptUrl string The URL to the script that started the extension target. * target Target The identifier that specifies where in Shopify’s UI your code is being injected. This will be one of the targets you have included in your extension’s configuration file. * editor Editor Information about the editor where the extension is being rendered. The value is undefined if the extension is not rendering in an editor. * version string The published version of the running extension target. For unpublished extensions, the value is `undefined`. ### Extension Meta information about an extension target. * apiVersion The API version that was set in the extension config file. ```ts ApiVersion ``` * capabilities The allowed capabilities of the extension, defined in your \[shopify.ui.extension.toml]\(/docs/api/checkout-ui-extensions/configuration) file. \* \[\`api\_access\`]\(/docs/api/checkout-ui-extensions/configuration#api-access): the extension can access the Storefront API. \* \[\`network\_access\`]\(/docs/api/checkout-ui-extensions/configuration#network-access): the extension can make external network calls. \* \[\`block\_progress\`]\(/docs/api/checkout-ui-extensions/configuration#block-progress): the extension can block a buyer's progress and the merchant has allowed this blocking behavior. ```ts StatefulRemoteSubscribable ``` * editor Information about the editor where the extension is being rendered. The value is undefined if the extension is not rendering in an editor. ```ts Editor ``` * rendered Whether your extension is currently rendered to the screen. Shopify might render your extension before it's visible in the UI, typically to pre-render extensions that will appear on a later step of the checkout. Your extension might also continue to run after the buyer has navigated away from where it was rendered. The extension continues running so that your extension is immediately available to render if the buyer navigates back. ```ts StatefulRemoteSubscribable ``` * scriptUrl The URL to the script that started the extension target. ```ts string ``` * target The identifier that specifies where in Shopify’s UI your code is being injected. This will be one of the targets you have included in your extension’s configuration file. ```ts Target ``` * version The published version of the running extension target. For unpublished extensions, the value is \`undefined\`. ```ts string ``` ```ts export interface Extension { /** * The API version that was set in the extension config file. * * @example '2023-04', '2023-07' */ apiVersion: ApiVersion; /** * The allowed capabilities of the extension, defined * in your [shopify.ui.extension.toml](/docs/api/checkout-ui-extensions/configuration) file. * * * [`api_access`](/docs/api/checkout-ui-extensions/configuration#api-access): the extension can access the Storefront API. * * * [`network_access`](/docs/api/checkout-ui-extensions/configuration#network-access): the extension can make external network calls. * * * [`block_progress`](/docs/api/checkout-ui-extensions/configuration#block-progress): the extension can block a buyer's progress and the merchant has allowed this blocking behavior. */ capabilities: StatefulRemoteSubscribable; /** * Information about the editor where the extension is being rendered. * * The value is undefined if the extension is not rendering in an editor. */ editor?: Editor; /** * Whether your extension is currently rendered to the screen. * * Shopify might render your extension before it's visible in the UI, * typically to pre-render extensions that will appear on a later step of the * checkout. * * Your extension might also continue to run after the buyer has navigated away * from where it was rendered. The extension continues running so that * your extension is immediately available to render if the buyer navigates back. */ rendered: StatefulRemoteSubscribable; /** * The URL to the script that started the extension target. */ scriptUrl: string; /** * The identifier that specifies where in Shopify’s UI your code is being * injected. This will be one of the targets you have included in your * extension’s configuration file. * * @example 'customer-account.order-status.block.render' * @see /docs/api/checkout-ui-extensions/unstable/extension-targets-overview * @see /docs/apps/app-extensions/configuration#targets */ target: Target; /** * The published version of the running extension target. * * For unpublished extensions, the value is `undefined`. * * @example 3.0.10 */ version?: string; } ``` ### ApiVersion Union of supported API versions ```ts '2023-04' | '2023-07' | '2023-10' | '2024-01' | '2024-04' | '2024-07' | '2024-10' | '2025-01' | '2025-04' | 'unstable' ``` ### Capability The capabilities an extension has access to. \* \[\`api\_access\`]\(/docs/api/checkout-ui-extensions/configuration#api-access): the extension can access the Storefront API. \* \[\`network\_access\`]\(/docs/api/checkout-ui-extensions/configuration#network-access): the extension can make external network calls. \* \[\`block\_progress\`]\(/docs/api/checkout-ui-extensions/configuration#block-progress): the extension can block a buyer's progress and the merchant has allowed this blocking behavior. \* \[\`collect\_buyer\_consent.sms\_marketing\`]\(/docs/api/checkout-ui-extensions/configuration#collect-buyer-consent): the extension can collect buyer consent for SMS marketing. \* \[\`collect\_buyer\_consent.customer\_privacy\`]\(/docs/api/checkout-ui-extensions/configuration#collect-buyer-consent): the extension can register buyer consent decisions that will be honored on Shopify-managed services. \* \[\`iframe.sources\`]\(/docs/api/checkout-ui-extensions/configuration#iframe): the extension can embed an external URL in an iframe. ```ts 'api_access' | 'network_access' | 'block_progress' | 'collect_buyer_consent.sms_marketing' | 'collect_buyer_consent.customer_privacy' | 'iframe.sources' ``` ### Editor * type Indicates whether the extension is rendering in the checkout editor. ```ts "checkout" ``` ```ts export interface Editor { /** * Indicates whether the extension is rendering in the checkout editor. */ type: 'checkout'; } ``` ## use​Extension​Editor() Returns information about the editor where the extension is being rendered. ### Returns * Editor | undefined ### Editor * type Indicates whether the extension is rendering in the checkout editor. ```ts "checkout" ``` ```ts export interface Editor { /** * Indicates whether the extension is rendering in the checkout editor. */ type: 'checkout'; } ```