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.

useExtensionApi()

Returns the full API object that was passed in to your extension when it was created. Depending on the extension target, this object can contain different properties.

For example, the purchase.checkout.cart-line-item.render-after extension target will return the CartLineDetailsApi object. Other targets might only have access to a basic set of API properties about the checkout.

For a full list of the API available to each extension target, see the ExtensionTargets type.

Caution

This is deprecated, use useApi instead.

Anchor to useExtensionApi
useExtensionApi()

Returns the full API object that was passed in to your extension when it was created. Depending on the extension target, this object can contain different properties.

For example, the purchase.checkout.cart-line-item.render-after extension target will return the CartLineDetailsApi object. Other targets may only have access to the StandardApi object, which contains a basic set of properties about the checkout.

For a full list of the API available to each extension target, see the ExtensionTargets type.

Caution

This is deprecated, use useApi instead.

< extends = >


Was this page helpful?