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](/docs/api/checkout-ui-extensions/apis/cartlinedetailsapi) object. Other targets may only have access to the [StandardApi](/docs/api/checkout-ui-extensions/apis/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](/docs/api/checkout-ui-extensions/apis/extensiontargets).
View useApiReturns the metafields configured with `shopify.extension.toml`.
View useAppMetafieldsReturns the values for the specified `attributes` applied to the checkout.
View useAttributeValuesReturns a function to mutate the `attributes` property of the checkout.
View useApplyAttributeChangeReturns the proposed `attributes` applied to the checkout.
View useAttributesReturns 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.
View useCustomerReturns 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.
View useEmailReturns 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.
View usePhoneProvides 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.
View usePurchasingCompanyReturns true if the buyer completed submitting their order. For example, when viewing the **Order status** page after submitting payment, the buyer will have completed their order.
View useBuyerJourneyCompletedInstalls a function for intercepting and preventing progress on checkout. To block checkout progress, you must set the [block_progress](/docs/api/checkout-ui-extensions/configuration#block-progress) capability in your extension's configuration. If you do, then you're expected to inform the buyer why navigation was blocked, either by passing validation errors to the checkout UI or rendering the errors in your extension.
View useBuyerJourneyInterceptReturns the `buyerJourney` details on buyer progression in checkout.
View useBuyerJourneyReturns whether or not a given capability of an extension is granted.
View useExtensionCapabilityReturns a list of an extension's granted capabilities.
View useExtensionCapabilitiesReturns a function to mutate the `lines` property of checkout.
View useApplyCartLinesChangeReturns the current line items for the checkout, and automatically re-renders your component if line items are added, removed, or updated.
View useCartLinesReturns the `checkoutSettings` applied to the checkout.
View useCheckoutSettingsReturns a `Money` value representing the minimum a buyer can expect to pay at the current step of checkout. This value excludes amounts yet to be negotiated. For example, the information step might not have delivery costs calculated.
View useTotalAmountReturns the country of the checkout, and automatically re-renders your component if the country changes.
View useLocalizationCountryReturns the currency of the checkout, and automatically re-renders your component if the currency changes.
View useCurrencyReturns the full expanded details of a delivery group and automatically re-renders your component when that delivery group changes.
View useDeliveryGroupReturns the current delivery groups for the checkout, and automatically re-renders your component when delivery address or delivery option selection changes.
View useDeliveryGroupsReturns the current discount allocations applied to the cart, and automatically re-renders your component if discount allocations changed.
View useDiscountAllocationsReturns a function to add or remove discount codes. > Caution: > See [security considerations](/docs/api/checkout-ui-extensions/configuration#network-access) if your extension retrieves discount codes through a network call.
View useApplyDiscountCodeChangeReturns the current discount codes applied to the cart, and automatically re-renders your component if discount codes are added or removed.
View useDiscountCodesReturns 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](/docs/api/checkout-ui-extensions/apis/cartlinedetailsapi) object. Other targets may only have access to the [StandardApi](/docs/api/checkout-ui-extensions/apis/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](/docs/api/checkout-ui-extensions/apis/extensiontargets). > Caution: This is deprecated, use `useApi` instead.
View useExtensionApiReturns the metadata about the extension. > Caution: This is deprecated, use `useExtension()` instead.
View useExtensionDataReturns information about the editor where the extension is being rendered.
View useExtensionEditorReturns the buyer's language, as supported by the extension.
View useExtensionLanguageReturns the metadata about the extension.
View useExtensionReturns the current gift cards applied to the cart, and automatically re-renders your component if gift cards are added or removed.
View useAppliedGiftCardsReturns a function to add or remove gift cards. > Caution: > See [security considerations](/docs/api/checkout-ui-extensions/configuration#network-access) if your extension retrieves gift card codes through a network call.
View useApplyGiftCardChangeReturns the current language of the checkout, and automatically re-renders your component if the language changes.
View useLanguageReturns a single filtered `Metafield` or `undefined`.
View useMetafieldReturns a function to mutate the `metafields` property of the checkout.
View useApplyMetafieldsChangeReturns the current array of `metafields` applied to the checkout. You can optionally filter the list.
View useMetafieldsReturns a function to mutate the `note` property of the checkout.
View useApplyNoteChangeReturns the proposed `note` applied to the checkout.
View useNoteReturns the order information that's available post-checkout.
View useOrderReturns all available payment options.
View useAvailablePaymentOptionsReturns payment options selected by the buyer.
View useSelectedPaymentOptionsProvides access to session tokens, which can be used to verify token claims on your app's server.
View useSessionTokenReturns the setting values defined by the merchant for the extension.
View useSettingsReturns a function to mutate the `shippingAddress` property of checkout.
View useApplyShippingAddressChangeReturns the proposed `shippingAddress` applied to the checkout.
View useShippingAddressReturns the `Shop` where the checkout is taking place.
View useShopReturns the key-value `Storage` interface for the extension target.
View useStorageSubscribes to the special wrapper type that all “changeable” values in the checkout use. This hook extracts the most recent value from that object, and subscribes to update the value when changes occur in the checkout. > Note: > You generally shouldn’t need to use this directly, as there are dedicated hooks > for accessing the current value of each individual resource in the checkout.
View useSubscriptionReturns the cart line the extension is attached to. This hook can only be used by extensions in the `purchase.cart-line-item.line-components.render`, `purchase.checkout.cart-line-item.render-after`, `purchase.thank-you.cart-line-item.render-after`, and `customer-account.order-status.cart-line-item.render-after` extension targets. Until version `2023-04`, this hook returned a `PresentmentCartLine` object.
View useTargetReturns the time zone of the checkout, and automatically re-renders your component if the time zone changes.
View useTimezoneReturns the `I18nTranslate` interface used to translate strings.
View useTranslate