purchase.thank-you.cart-line-item.render-after
A static extension target that renders on every line item, inside the details under the line item properties element.
> Caution:
> This extension target will not be rendered if the line item is a custom line item belonging to a draft order invoice.
purchase.thank-you.cart-line-item.render-after
import {
reactExtension,
Text,
useTarget,
} from '@shopify/ui-extensions-react/checkout';
export default reactExtension(
'purchase.thank-you.cart-line-item.render-after',
() => <Extension />,
);
function Extension() {
const {
merchandise: {title},
} = useTarget();
return <Text>Line item title: {title}</Text>;
}
import {extension} from '@shopify/ui-extensions/checkout';
export default extension(
'purchase.thank-you.cart-line-item.render-after',
(root, {target}) => {
const text = root.createText(
`Line item title: ${target.current.title}`,
);
root.appendChild(text);
target.subscribe((updatedTarget) => {
text.updateText(
`Line item title: ${updatedTarget.title}`,
);
});
},
);
OrderConfirmationApi
The API object provided to this and other `purchase.thank-you` extension targets.
OrderConfirmationApi
orderConfirmation
Order information that's available post-checkout.
OrderConfirmation
number
A randomly generated alpha-numeric identifier for the order. For orders created in 2024 and onwards, the number will always be present. For orders created before that date, the number might not be present.
order
CartLineItemApi
The API object provided to this and other `cart-line-item` extension targets.
CartLineItemApi
target
The cart line the extension is attached to. Until version `2023-04`, this property was a `StatefulRemoteSubscribable<PresentmentCartLine>`.
CartLine
attributes
The line item additional custom attributes.
cost
The details about the cost components attributed to the cart line.
discountAllocations
Discounts applied to the cart line.
id
These line item IDs are not stable at the moment, they might change after any operations on the line items. You should always look up for an updated ID before any call to `applyCartLinesChange` because you'll need the ID to create a `CartLineChange` object.
lineComponents
Sub lines of the merchandise line. If no sub lines are present, this will be an empty array.
merchandise
The merchandise being purchased.
quantity
The quantity of the merchandise being purchased.
Attribute
key
The key for the attribute.
value
The value for the attribute.
CartLineCost
totalAmount
The total amount after reductions the buyer can expect to pay that is directly attributable to a single cart line.
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'
CartDiscountAllocation
CartCodeDiscountAllocation | CartAutomaticDiscountAllocation | CartCustomDiscountAllocation
CartCodeDiscountAllocation
code
The code for the discount
discountedAmount
The money amount that has been discounted from the order
type
The type of the code discount
CartAutomaticDiscountAllocation
discountedAmount
The money amount that has been discounted from the order
title
The title of the automatic discount
type
The type of the automatic discount
CartCustomDiscountAllocation
discountedAmount
The money amount that has been discounted from the order
title
The title of the custom discount
type
The type of the custom discount
CartBundleLineComponent
attributes
Additional custom attributes for the bundle line component.
cost
The cost attributed to this bundle line component.
id
A unique identifier for the bundle line component.
This ID is not stable. If an operation updates the line items in any way, all IDs could change.
merchandise
The merchandise of this bundle line component.
quantity
The quantity of merchandise being purchased.
type
Merchandise
id
A globally-unique identifier.
image
Image associated with the product variant. This field falls back to the product image if no image is available.
product
The product object that the product variant belongs to.
requiresShipping
Whether or not the product requires shipping.
selectedOptions
List of product options applied to the variant.
sellingPlan
The selling plan associated with the merchandise.
sku
The product variant's sku.
subtitle
The product variant's subtitle.
title
The product variant’s title.
type
ImageDetails
altText
The alternative text for the image.
url
The image URL.
Product
id
A globally-unique identifier.
productType
A categorization that a product can be tagged with, commonly used for filtering and searching.
vendor
The product’s vendor name.
SelectedOption
name
The name of the merchandise option.
value
The value of the merchandise option.
SellingPlan
id
A globally-unique identifier.
StandardApi
The base API object provided to this and other `purchase.checkout` and `purchase.thank-you` extension targets.
StandardApi
analytics
The methods for interacting with [Web Pixels](/docs/apps/marketing), such as emitting an event.
appliedGiftCards
Gift Cards that have been applied to the checkout.
applyTrackingConsentChange
Allows setting and updating customer privacy consent settings and tracking consent metafields.
> Note: Requires the [`customer_privacy` capability](/docs/api/checkout-ui-extensions/2024-10/configuration#collect-buyer-consent) to be set to `true`.
{% include /apps/checkout/privacy-icon.md %} Requires access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data).
appMetafields
The metafields requested in the [`shopify.extension.toml`](/docs/api/checkout-ui-extensions/configuration) file. These metafields are updated when there's a change in the merchandise items being purchased by the customer.
{% include /apps/checkout/privacy-icon.md %} Requires access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data).
> Tip: > Metafields on an [app reserved namespace](/docs/apps/build/custom-data/reserved-prefixes) cannot be accessed by Checkout UI extensions.
attributes
The custom attributes left by the customer to the merchant, either in their cart or during checkout.
availablePaymentOptions
All available payment options.
billingAddress
The proposed customer billing address. The address updates when the field is committed (on change) rather than every keystroke.
{% include /apps/checkout/privacy-icon.md %} Requires access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data).
buyerIdentity
Information about the buyer that is interacting with the checkout.
{% include /apps/checkout/privacy-icon.md %} Requires access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data).
buyerJourney
Provides details on the buyer's progression through the checkout.
Refer to [buyer journey](/docs/api/checkout-ui-extensions/apis/buyer-journey#examples) examples for more information.
checkoutSettings
Settings applied to the buyer's checkout.
checkoutToken
A stable ID that represents the current checkout.
Matches the `token` field in the [WebPixel checkout payload](/docs/api/pixels/customer-events#checkout) and the `checkout_token` field in the [REST Admin API `Order` resource](/docs/api/admin-rest/unstable/resources/order#resource-object).
cost
Details on the costs the buyer will pay for this checkout.
customerPrivacy
Customer privacy consent settings and a flag denoting if consent has previously been collected.
deliveryGroups
A list of delivery groups containing information about the delivery of the items the customer intends to purchase.
discountAllocations
Discounts that have been applied to the entire cart.
discountCodes
A list of discount codes currently applied to the checkout.
extension
The meta information about the extension.
extensionPoint
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.
i18n
Utilities for translating content and formatting values according to the current [`localization`](/docs/api/checkout-ui-extensions/apis/localization) of the checkout.
Refer to [`localization` examples](/docs/api/checkout-ui-extensions/apis/localization#examples) for more information.
instructions
The cart instructions used to create the checkout and possibly limit extension capabilities.
These instructions should be checked prior to performing any actions that may be affected by them.
For example, if you intend to add a discount code via the `applyDiscountCodeChange` method, check `discounts.canUpdateDiscountCodes` to ensure it's supported in this checkout.
> Caution: As of version `2024-07`, UI extension code must check for instructions before calling select APIs in case those APIs are not available. See the [update guide](/docs/api/checkout-ui-extensions/instructions-update) for more information.
lines
A list of lines containing information about the items the customer intends to purchase.
localization
The details about the location, language, and currency of the customer. For utilities to easily format and translate content based on these details, you can use the [`i18n`](/docs/api/checkout-ui-extensions/apis/localization#standardapi-propertydetail-i18n) object instead.
metafields
The metafields that apply to the current checkout.
Metafields are stored locally on the client and are applied to the order object after the checkout completes.
These metafields are shared by all extensions running on checkout, and persist for as long as the customer is working on this checkout.
Once the order is created, you can query these metafields using the [GraphQL Admin API](/docs/admin-api/graphql/reference/orders/order#metafield-2021-01)
> Tip: > Cart metafields are only available on carts created via the Storefront API version `2023-04` or later.
note
A note left by the customer to the merchant, either in their cart or during checkout.
query
The method used to query the Storefront GraphQL API with a prefetched token.
Refer to [Storefront API access examples](/docs/api/checkout-ui-extensions/apis/storefront-api) for more information.
selectedPaymentOptions
Payment options selected by the buyer.
sessionToken
The session token providing a set of claims as a signed JSON Web Token (JWT).
The token has a TTL of 5 minutes.
If the previous token expires, this value will reflect a new session token with a new signature and expiry.
Refer to [session token examples](/docs/api/checkout-ui-extensions/apis/session-token) for more information.
settings
The settings matching the settings definition written in the [`shopify.extension.toml`](/docs/api/checkout-ui-extensions/configuration) file.
Refer to [settings examples](/docs/api/checkout-ui-extensions/apis/settings#examples) for more information.
> Note: When an extension is being installed in the editor, the settings will be empty until a merchant sets a value. In that case, this object will be updated in real time as a merchant fills in the settings.
shippingAddress
The proposed customer shipping address. During the information step, the address updates when the field is committed (on change) rather than every keystroke. An address value is only present if delivery is required. Otherwise, the subscribable value is undefined.
{% include /apps/checkout/privacy-icon.md %} Requires access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data).
shop
The shop where the checkout is taking place.
storage
The key-value storage for the extension.
It uses `localStorage` and should persist across the customer's current checkout session.
> Caution: Data persistence isn't guaranteed and storage is reset when the customer starts a new checkout.
Data is shared across all activated extension targets of this extension. In versions 2023-07 and earlier, each activated extension target had its own storage.
ui
Methods to interact with the extension’s UI.
version
The renderer version being used for the extension.
Analytics
publish
Publish method to emit analytics events to [Web Pixels](/docs/apps/marketing).
visitor
A method for capturing details about a visitor on the online store.
VisitorResult
Represents a visitor result.
VisitorSuccess | VisitorError
VisitorSuccess
Represents a successful visitor result.
type
Indicates that the visitor information was validated and submitted.
VisitorError
Represents an unsuccessful visitor result.
message
A message that explains the error. This message is useful for debugging. It's **not** localized, and therefore should not be presented directly to the buyer.
type
Indicates that the visitor information is invalid and wasn't submitted. Examples are using the wrong data type or missing a required property.
AppliedGiftCard
amountUsed
The amount of the applied gift card that will be used when the checkout is completed.
balance
The current balance of the applied gift card prior to checkout completion.
lastCharacters
The last four characters of the applied gift card's code.
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'
ApplyTrackingConsentChangeType
Returns: Promise<TrackingConsentChangeResult>
Params:
visitorConsent: VisitorConsentChange
export type ApplyTrackingConsentChangeType = (
visitorConsent: VisitorConsentChange,
) => Promise<TrackingConsentChangeResult>;
VisitorConsentChange
analytics
Visitor consents to recording data to understand how customers interact with the site.
marketing
Visitor consents to ads and marketing communications based on customer interests.
metafields
Tracking consent metafield data to be saved.
If the value is `null`, the metafield will be deleted.
preferences
Visitor consent to remembering customer preferences, such as country or language, to personalize visits to the website.
saleOfData
Opts the visitor out of data sharing / sales.
type
TrackingConsentMetafieldChange
key
The name of the metafield. It must be between 3 and 30 characters in length (inclusive).
value
The information to be stored as metadata. If the value is `null`, the metafield will be deleted.
VisitorConsent
analytics
Visitor consents to recording data to understand how customers interact with the site.
marketing
Visitor consents to ads and marketing communications based on customer interests.
preferences
Visitor consent to remembering customer preferences, such as country or language, to personalize visits to the website.
saleOfData
Opts the visitor out of data sharing / sales.
TrackingConsentChangeResult
TrackingConsentChangeResultSuccess | TrackingConsentChangeResultError
TrackingConsentChangeResultSuccess
The returned result of a successful tracking consent preference update.
type
The type of the `TrackingConsentChangeResultSuccess` API.
TrackingConsentChangeResultError
The returned result of an unsuccessful tracking consent preference update with a message detailing the type of error that occurred.
message
A message that explains the error. This message is useful for debugging. It is **not** localized, and therefore should not be presented directly to the buyer.
type
The type of the `TrackingConsentChangeResultError` API.
AppMetafieldEntry
A metafield associated with the shop or a resource on the checkout.
metafield
The metadata information.
target
The target that is associated to the metadata.
{% include /apps/checkout/privacy-icon.md %} Requires access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data) when the type is `customer`, `company` or `companyLocation`.
AppMetafield
Represents a custom metadata attached to a resource.
key
The key name of a metafield.
namespace
The namespace for a metafield.
type
The metafield's type name.
value
The value of a metafield.
valueType
The metafield’s information type.
AppMetafieldEntryTarget
The metafield owner.
id
The numeric owner ID that is associated with the metafield.
type
The type of the metafield owner.
{% include /apps/checkout/privacy-icon.md %} Requires access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data) when the type is `customer`, `company` or `companyLocation`.
Attribute
key
The key for the attribute.
value
The value for the attribute.
PaymentOption
A payment option presented to the buyer.
handle
The unique handle for the payment option.
This is not a globally unique identifier. It may be an identifier specific to the given checkout session or the current shop.
type
The type of the payment option.
Shops can be configured to support many different payment options. Some options are only available to buyers in specific regions.
| Type | Description |
|---|---|
| `creditCard` | A vaulted or manually entered credit card. |
| `deferred` | A [deferred payment](https://help.shopify.com/en/manual/orders/deferred-payments), such as invoicing the buyer and collecting payment at a later time. |
| `local` | A [local payment option](https://help.shopify.com/en/manual/payments/shopify-payments/local-payment-methods) specific to the current region or market |
| `manualPayment` | A manual payment option such as an in-person retail transaction. |
| `offsite` | A payment processed outside of Shopify's checkout, excluding integrated wallets. |
| `other` | Another type of payment not defined here. |
| `paymentOnDelivery` | A payment that will be collected on delivery. |
| `redeemable` | A redeemable payment option such as a gift card or store credit. |
| `wallet` | An integrated wallet such as PayPal, Google Pay, Apple Pay, etc. |
| `customOnsite` | A custom payment option that is processed through a checkout extension with a payments app. |
MailingAddress
address1
The first line of the buyer's address, including street name and number.
{% include /apps/checkout/privacy-icon.md %} Requires level 2 access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data).
address2
The second line of the buyer's address, like apartment number, suite, etc.
{% include /apps/checkout/privacy-icon.md %} Requires level 2 access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data).
city
The buyer's city.
{% include /apps/checkout/privacy-icon.md %} Requires level 2 access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data).
company
The buyer's company name.
{% include /apps/checkout/privacy-icon.md %} Requires level 1 access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data).
countryCode
The ISO 3166 Alpha-2 format for the buyer's country. Refer to https://www.iso.org/iso-3166-country-codes.html.
{% include /apps/checkout/privacy-icon.md %} Requires level 2 access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data).
firstName
The buyer's first name.
{% include /apps/checkout/privacy-icon.md %} Requires level 2 access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data).
lastName
The buyer's last name.
{% include /apps/checkout/privacy-icon.md %} Requires level 2 access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data).
name
The buyer's full name.
{% include /apps/checkout/privacy-icon.md %} Requires level 2 access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data).
phone
The buyer's phone number.
{% include /apps/checkout/privacy-icon.md %} Requires level 2 access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data).
provinceCode
The buyer's province code, such as state, province, prefecture, or region.
{% include /apps/checkout/privacy-icon.md %} Requires level 2 access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data).
zip
The buyer's postal or ZIP code.
{% include /apps/checkout/privacy-icon.md %} Requires level 2 access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data).
CountryCode
'AC' | 'AD' | 'AE' | 'AF' | 'AG' | 'AI' | 'AL' | 'AM' | 'AN' | 'AO' | 'AR' | 'AT' | 'AU' | 'AW' | 'AX' | 'AZ' | 'BA' | 'BB' | 'BD' | 'BE' | 'BF' | 'BG' | 'BH' | 'BI' | 'BJ' | 'BL' | 'BM' | 'BN' | 'BO' | 'BQ' | 'BR' | 'BS' | 'BT' | 'BV' | 'BW' | 'BY' | 'BZ' | 'CA' | 'CC' | 'CD' | 'CF' | 'CG' | 'CH' | 'CI' | 'CK' | 'CL' | 'CM' | 'CN' | 'CO' | 'CR' | 'CU' | 'CV' | 'CW' | 'CX' | 'CY' | 'CZ' | 'DE' | 'DJ' | 'DK' | 'DM' | 'DO' | 'DZ' | 'EC' | 'EE' | 'EG' | 'EH' | 'ER' | 'ES' | 'ET' | 'FI' | 'FJ' | 'FK' | 'FO' | 'FR' | 'GA' | 'GB' | 'GD' | 'GE' | 'GF' | 'GG' | 'GH' | 'GI' | 'GL' | 'GM' | 'GN' | 'GP' | 'GQ' | 'GR' | 'GS' | 'GT' | 'GW' | 'GY' | 'HK' | 'HM' | 'HN' | 'HR' | 'HT' | 'HU' | 'ID' | 'IE' | 'IL' | 'IM' | 'IN' | 'IO' | 'IQ' | 'IR' | 'IS' | 'IT' | 'JE' | 'JM' | 'JO' | 'JP' | 'KE' | 'KG' | 'KH' | 'KI' | 'KM' | 'KN' | 'KP' | 'KR' | 'KW' | 'KY' | 'KZ' | 'LA' | 'LB' | 'LC' | 'LI' | 'LK' | 'LR' | 'LS' | 'LT' | 'LU' | 'LV' | 'LY' | 'MA' | 'MC' | 'MD' | 'ME' | 'MF' | 'MG' | 'MK' | 'ML' | 'MM' | 'MN' | 'MO' | 'MQ' | 'MR' | 'MS' | 'MT' | 'MU' | 'MV' | 'MW' | 'MX' | 'MY' | 'MZ' | 'NA' | 'NC' | 'NE' | 'NF' | 'NG' | 'NI' | 'NL' | 'NO' | 'NP' | 'NR' | 'NU' | 'NZ' | 'OM' | 'PA' | 'PE' | 'PF' | 'PG' | 'PH' | 'PK' | 'PL' | 'PM' | 'PN' | 'PS' | 'PT' | 'PY' | 'QA' | 'RE' | 'RO' | 'RS' | 'RU' | 'RW' | 'SA' | 'SB' | 'SC' | 'SD' | 'SE' | 'SG' | 'SH' | 'SI' | 'SJ' | 'SK' | 'SL' | 'SM' | 'SN' | 'SO' | 'SR' | 'SS' | 'ST' | 'SV' | 'SX' | 'SY' | 'SZ' | 'TA' | 'TC' | 'TD' | 'TF' | 'TG' | 'TH' | 'TJ' | 'TK' | 'TL' | 'TM' | 'TN' | 'TO' | 'TR' | 'TT' | 'TV' | 'TW' | 'TZ' | 'UA' | 'UG' | 'UM' | 'US' | 'UY' | 'UZ' | 'VA' | 'VC' | 'VE' | 'VG' | 'VN' | 'VU' | 'WF' | 'WS' | 'XK' | 'YE' | 'YT' | 'ZA' | 'ZM' | 'ZW' | 'ZZ'
BuyerIdentity
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).
Customer
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).
acceptsEmailMarketing
Defines if the customer accepts email marketing activities.
{% include /apps/checkout/privacy-icon.md %} Requires level 1 access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data).
acceptsSmsMarketing
Defines if the customer accepts SMS 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.
PurchasingCompany
The 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).
Company
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).
CompanyLocation
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).
BuyerJourney
Provides details on the buyer's progression through the checkout.
activeStep
What step of checkout the buyer is currently on.
completed
This subscribable value will be 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.
intercept
Installs a function for intercepting and preventing progress on checkout.
This returns a promise that resolves to a teardown function. Calling the teardown function will remove the interceptor.
To block checkout progress, you must set the [block_progress](/docs/api/checkout-ui-extensions/configuration#block-progress) capability in your extension's configuration.
steps
All possible steps a buyer can take to complete the checkout. These steps may vary depending on the type of checkout or the shop's configuration.
BuyerJourneyStepReference
What step of checkout the buyer is currently on.
handle
The handle that uniquely identifies the buyer journey step.
BuyerJourneyStepHandle
| handle | Description |
|---|---|
| `cart` | The cart page. |
| `checkout` | A one-page checkout, including Shop Pay. |
| `information` | The contact information step of a three-page checkout. |
| `shipping` | The shipping step of a three-page checkout. |
| `payment` | The payment step of a three-page checkout. |
| `review` | The step after payment where the buyer confirms the purchase. Not all shops are configured to have a review step. |
| `thank-you` | The page displayed after the purchase, thanking the buyer. |
| `unknown` | An unknown step in the buyer journey. |
'cart' | 'checkout' | 'information' | 'shipping' | 'payment' | 'review' | 'thank-you' | 'unknown'
Interceptor
A function for intercepting and preventing navigation on checkout. You can block navigation by returning an object with `{behavior: 'block', reason: InvalidResultReason.InvalidExtensionState, errors?: ValidationErrors[]}`. If you do, then you're expected to also update some part of your UI to reflect the reason why navigation was blocked, either by targeting checkout UI fields, passing errors to the page level or rendering the errors in your extension.
Returns: InterceptorRequest | Promise<InterceptorRequest>
Params:
interceptorProps: InterceptorProps
export type Interceptor = (
interceptorProps: InterceptorProps,
) => InterceptorRequest | Promise<InterceptorRequest>;
InterceptorProps
canBlockProgress
Whether the interceptor has the capability to block a buyer's progress through checkout. This ability might be granted by a merchant in differing checkout contexts.
InterceptorRequest
InterceptorRequestAllow | InterceptorRequestBlock
InterceptorRequestAllow
behavior
Indicates that the interceptor will allow the buyer's journey to continue.
perform
This callback is called when all interceptors finish. We recommend setting errors or reasons for blocking at this stage, so that all the errors in the UI show up at once.
InterceptorResult
InterceptorResultAllow | InterceptorResultBlock
InterceptorResultAllow
behavior
Indicates that the buyer was allowed to progress through checkout.
InterceptorResultBlock
behavior
Indicates that some part of the checkout UI intercepted and prevented the buyer’s progress. The buyer typically needs to take some action to resolve this issue and to move on to the next step.
InterceptorRequestBlock
behavior
Indicates that the interceptor will block the buyer's journey from continuing.
errors
Used to pass errors to the checkout UI, outside your extension's UI boundaries.
perform
This callback is called when all interceptors finish. We recommend setting errors or reasons for blocking at this stage, so that all the errors in the UI show up at once.
reason
The reason for blocking the interceptor request. This value isn't presented to the buyer, so it doesn't need to be localized. The value is used only for Shopify’s own internal debugging and metrics.
ValidationError
message
Error message to be displayed to the buyer.
target
The checkout UI field that the error is associated with.
Example: `$.cart.deliveryGroups[0].deliveryAddress.countryCode`
See the [supported targets](/docs/api/functions/reference/cart-checkout-validation/graphql#supported-targets) for more information.
BuyerJourneyStep
disabled
The disabled state of the buyer journey step. This value will be true if the buyer has not reached the step yet.
For example, if the buyer has not reached the `shipping` step yet, `shipping` would be disabled.
handle
The handle that uniquely identifies the buyer journey step.
label
The localized label of the buyer journey step.
to
The url of the buyer journey step. This property leverages the `shopify:` protocol E.g. `shopify:cart` or `shopify:checkout/information`.
CheckoutSettings
Settings describing the behavior of the buyer's checkout.
orderSubmission
The type of order that will be created once the buyer completes checkout.
paymentTermsTemplate
Represents the merchant configured payment terms.
shippingAddress
Settings describing the behavior of the shipping address.
PaymentTermsTemplate
Represents the payment terms template object.
dueDate
The due date for net payment terms as a ISO 8601 formatted string `YYYY-MM-DDTHH:mm:ss.sssZ`.
dueInDays
The number of days between the issued date and due date if using net payment terms.
id
A globally-unique ID.
name
The name of the payment terms translated to the buyer's current language. Refer to [localization.language](/docs/api/checkout-ui-extensions/apis/localization#standardapi-propertydetail-localization).
ShippingAddressSettings
Settings describing the behavior of the shipping address.
isEditable
Describes whether the buyer can ship to any address during checkout.
CheckoutToken
string
CartCost
subtotalAmount
A `Money` value representing the subtotal value of the items in the cart at the current step of checkout.
totalAmount
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.
totalShippingAmount
A `Money` value representing the total shipping a buyer can expect to pay at the current step of checkout. This value includes shipping discounts. Returns undefined if shipping has not been negotiated yet, such as on the information step.
totalTaxAmount
A `Money` value representing the total tax a buyer can expect to pay at the current step of checkout or the total tax included in product and shipping prices. Returns undefined if taxes are unavailable.
CustomerPrivacy
allowedProcessing
An object containing flags for each consent property denoting whether they can be processed based on visitor consent, merchant configuration, and user location.
metafields
Stored tracking consent metafield data.
region
Details about the visitor's current location for use in evaluating if more granular consent controls should render.
saleOfDataRegion
Whether the visitor is in a region requiring data sale opt-outs.
shouldShowBanner
Whether a consent banner should be displayed by default when the page loads. Use this as the initial open/expanded state of the consent banner.
This is determined by the visitor's current privacy consent, the shop's [region visibility configuration](https://help.shopify.com/en/manual/privacy-and-security/privacy/customer-privacy-settings/privacy-settings#add-a-cookie-banner) settings, and the region in which the visitor is located.
visitorConsent
An object containing the customer's current privacy consent settings. *
AllowedProcessing
analytics
Can collect customer analytics about how the shop was used and interactions made on the shop.
marketing
Can collect customer preference for marketing, attribution and targeted advertising from the merchant.
preferences
Can collect customer preferences such as language, currency, size, and more.
saleOfData
Can collect customer preference for sharing data with third parties, usually for behavioral advertising.
TrackingConsentMetafield
key
The name of the metafield. It must be between 3 and 30 characters in length (inclusive).
value
The information to be stored as metadata.
CustomerPrivacyRegion
countryCode
The [ISO 3166 Alpha-2 format](https://www.iso.org/iso-3166-country-codes.html) for the buyer's country.
{% include /apps/checkout/privacy-icon.md %} Requires level 1 access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data).
provinceCode
The buyer's province code, such as state, province, prefecture, or region.
Province codes can be found by clicking on the `Subdivisions assigned codes` column for countries listed [here](https://en.wikipedia.org/wiki/ISO_3166-2).
{% include /apps/checkout/privacy-icon.md %} Requires level 1 access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data).
DeliveryGroup
Represents the delivery information and options available for one or more cart lines.
deliveryOptions
The delivery options available for the delivery group.
groupType
The type of the delivery group.
id
The unique identifier of the delivery group. On the Thank You page this value is undefined.
isDeliveryRequired
Whether delivery is required for the delivery group.
selectedDeliveryOption
The selected delivery option for the delivery group.
targetedCartLines
The cart line references associated to the delivery group.
DeliveryOption
ShippingOption | PickupPointOption | PickupLocationOption
ShippingOption
Represents a delivery option that is a shipping option.
carrier
Information about the carrier.
code
The code of the delivery option.
cost
The cost of the delivery.
costAfterDiscounts
The cost of the delivery including discounts.
deliveryEstimate
Information about the estimated delivery time.
description
The description of the delivery option.
handle
The unique identifier of the delivery option.
title
The title of the delivery option.
type
The type of this delivery option.
ShippingOptionCarrier
name
The name of the carrier.
DeliveryEstimate
timeInTransit
The estimated time in transit for the delivery in seconds.
NumberRange
lower
The lower bound of the number range.
upper
The upper bound of the number range.
PickupPointOption
carrier
Information about the carrier that ships to the pickup point.
code
The code of the delivery option.
cost
The cost to ship to this pickup point.
costAfterDiscounts
The cost to ship to this pickup point including discounts.
description
The description of the delivery option.
handle
The unique identifier of the delivery option.
location
The location details of the pickup point.
metafields
The metafields associated with this delivery option.
title
The title of the delivery option.
type
The type of this delivery option.
PickupPointCarrier
code
The code identifying the carrier.
name
The name of the carrier.
PickupPointLocation
address
The address of the pickup point.
handle
The unique identifier of the pickup point.
name
The name of the pickup point.
Metafield
Metadata associated with the checkout.
key
The name of the metafield. It must be between 3 and 30 characters in length (inclusive).
namespace
A container for a set of metafields. You need to define a custom namespace for your metafields to distinguish them from the metafields used by other apps. This must be between 2 and 20 characters in length (inclusive).
value
The information to be stored as metadata.
valueType
The metafield’s information type.
PickupLocationOption
code
The code of the delivery option.
description
The description of the delivery option.
handle
The unique identifier of the delivery option.
location
The location details of the pickup location.
metafields
The metafields associated with this delivery option.
title
The title of the delivery option.
type
The type of this delivery option.
PickupLocation
address
The address of the pickup location.
name
The name of the pickup location.
DeliveryGroupType
The possible types of a delivery group.
'oneTimePurchase' | 'subscription'
DeliveryOptionReference
Represents a reference to a delivery option.
handle
The unique identifier of the referenced delivery option.
CartLineReference
Represents a reference to a cart line.
id
The unique identifier of the referenced cart line.
CartDiscountAllocation
CartCodeDiscountAllocation | CartAutomaticDiscountAllocation | CartCustomDiscountAllocation
CartCodeDiscountAllocation
code
The code for the discount
discountedAmount
The money amount that has been discounted from the order
type
The type of the code discount
CartAutomaticDiscountAllocation
discountedAmount
The money amount that has been discounted from the order
title
The title of the automatic discount
type
The type of the automatic discount
CartCustomDiscountAllocation
discountedAmount
The money amount that has been discounted from the order
title
The title of the custom discount
type
The type of the custom discount
CartDiscountCode
code
The code for the discount
Extension
The meta information about an extension target.
apiVersion
The API version that was set in the extension config file.
capabilities
The allowed capabilities of the extension, defined in your [shopify.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 customer'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 customer consent for SMS marketing.
* [`collect_buyer_consent.customer_privacy`](/docs/api/checkout-ui-extensions/configuration#collect-buyer-consent): the extension can register customer consent decisions that will be honored on Shopify-managed services.
* `iframe.sources`: the extension can embed an external URL in an iframe.
editor
Information about the editor where the extension is being rendered.
If the value is undefined, then the extension is not running in an editor.
rendered
A Boolean to show 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 customer has navigated away from where it was rendered. The extension continues running so that your extension is immediately available to render if the customer navigates back.
scriptUrl
The URL to the script that started the extension 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.
version
The published version of the running extension target.
For unpublished extensions, the value is `undefined`.
ApiVersion
Union of supported API versions
'2023-04' | '2023-07' | '2023-10' | '2024-01' | '2024-04' | '2024-07' | '2024-10' | '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`: the extension can embed an external URL in an iframe.
'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.
I18n
formatCurrency
Returns a localized currency value.
This function behaves like the standard `Intl.NumberFormat()` with a style of `currency` applied. It uses the buyer's locale by default.
formatDate
Returns a localized date value.
This function behaves like the standard `Intl.DateTimeFormatOptions()` and uses the buyer's locale by default. Formatting options can be passed in as options.
formatNumber
Returns a localized number.
This function behaves like the standard `Intl.NumberFormat()` with a style of `decimal` applied. It uses the buyer's locale by default.
translate
Returns translated content in the buyer's locale, as supported by the extension.
- `options.count` is a special numeric value used in pluralization.
- The other option keys and values are treated as replacements for interpolation.
- If the replacements are all primitives, then `translate()` returns a single string.
- If replacements contain UI components, then `translate()` returns an array of elements.
I18nTranslate
This returns a translated string matching a key in a locale file.
export interface I18nTranslate {
<ReplacementType = string>(
key: string,
options?: Record<string, ReplacementType | string | number>,
): ReplacementType extends string | number
? string
: (string | ReplacementType)[];
}
CartInstructions
attributes
Cart instructions related to cart attributes.
delivery
Cart instructions related to delivery.
discounts
Cart instructions related to discounts.
lines
Cart instructions related to cart lines.
metafields
Cart instructions related to metafields.
notes
Cart instructions related to notes.
AttributesCartInstructions
canUpdateAttributes
Indicates whether or not cart attributes can be updated.
DeliveryCartInstructions
canSelectCustomAddress
Indicates whether a buyer can select a custom address.
When true, this implies extensions can update the delivery address.
DiscountsCartInstructions
canUpdateDiscountCodes
Indicates whether or not discount codes can be updated.
CartLinesCartInstructions
canAddCartLine
Indicates whether or not new cart lines can be added.
canRemoveCartLine
Indicates whether or not cart lines can be removed.
canUpdateCartLine
Indicates whether or not cart lines can be updated.
MetafieldsCartInstructions
canDeleteCartMetafield
Indicates whether or not cart metafields can be deleted.
canSetCartMetafields
Indicates whether or not cart metafields can be added or updated.
NotesCartInstructions
canUpdateNote
Indicates whether or not notes can be updated.
CartLine
attributes
The line item additional custom attributes.
cost
The details about the cost components attributed to the cart line.
discountAllocations
Discounts applied to the cart line.
id
These line item IDs are not stable at the moment, they might change after any operations on the line items. You should always look up for an updated ID before any call to `applyCartLinesChange` because you'll need the ID to create a `CartLineChange` object.
lineComponents
Sub lines of the merchandise line. If no sub lines are present, this will be an empty array.
merchandise
The merchandise being purchased.
quantity
The quantity of the merchandise being purchased.
CartLineCost
totalAmount
The total amount after reductions the buyer can expect to pay that is directly attributable to a single cart line.
CartBundleLineComponent
attributes
Additional custom attributes for the bundle line component.
cost
The cost attributed to this bundle line component.
id
A unique identifier for the bundle line component.
This ID is not stable. If an operation updates the line items in any way, all IDs could change.
merchandise
The merchandise of this bundle line component.
quantity
The quantity of merchandise being purchased.
type
Merchandise
id
A globally-unique identifier.
image
Image associated with the product variant. This field falls back to the product image if no image is available.
product
The product object that the product variant belongs to.
requiresShipping
Whether or not the product requires shipping.
selectedOptions
List of product options applied to the variant.
sellingPlan
The selling plan associated with the merchandise.
sku
The product variant's sku.
subtitle
The product variant's subtitle.
title
The product variant’s title.
type
Product
id
A globally-unique identifier.
productType
A categorization that a product can be tagged with, commonly used for filtering and searching.
vendor
The product’s vendor name.
SelectedOption
name
The name of the merchandise option.
value
The value of the merchandise option.
SellingPlan
id
A globally-unique identifier.
Localization
country
The country context of the checkout. This value carries over from the context of the cart, where it was used to contextualize the storefront experience. It will update if the buyer changes the country of their shipping address. If the country is unknown, then the value is undefined.
currency
The currency that the customer sees for money amounts in the checkout.
extensionLanguage
This is the customer's language, as supported by the extension. If the customer's actual language is not supported by the extension, then this is the language that is used for translations.
For example, if the customer's language is 'fr-CA' but your extension only supports translations for 'fr', then the `isoCode` for this language is 'fr'. If your extension does not provide french translations at all, then this value is the default locale for your extension (that is, the one matching your .default.json file).
language
The language the customer sees in the checkout.
market
The [market](/docs/apps/markets) context of the checkout. This value carries over from the context of the cart, where it was used to contextualize the storefront experience. It will update if the buyer changes the country of their shipping address. If the market is unknown, then the value is undefined.
timezone
The buyer’s time zone.
Country
isoCode
The ISO-3166-1 code for this country.
Currency
isoCode
The ISO-4217 code for this currency.
Language
isoCode
The BCP-47 language tag. It may contain a dash followed by an ISO 3166-1 alpha-2 region code.
Market
handle
The human-readable, shop-scoped identifier for the market.
id
A globally-unique identifier for a market.
Timezone
'Africa/Abidjan' | 'Africa/Algiers' | 'Africa/Bissau' | 'Africa/Cairo' | 'Africa/Casablanca' | 'Africa/Ceuta' | 'Africa/El_Aaiun' | 'Africa/Johannesburg' | 'Africa/Juba' | 'Africa/Khartoum' | 'Africa/Lagos' | 'Africa/Maputo' | 'Africa/Monrovia' | 'Africa/Nairobi' | 'Africa/Ndjamena' | 'Africa/Sao_Tome' | 'Africa/Tripoli' | 'Africa/Tunis' | 'Africa/Windhoek' | 'America/Adak' | 'America/Anchorage' | 'America/Araguaina' | 'America/Argentina/Buenos_Aires' | 'America/Argentina/Catamarca' | 'America/Argentina/Cordoba' | 'America/Argentina/Jujuy' | 'America/Argentina/La_Rioja' | 'America/Argentina/Mendoza' | 'America/Argentina/Rio_Gallegos' | 'America/Argentina/Salta' | 'America/Argentina/San_Juan' | 'America/Argentina/San_Luis' | 'America/Argentina/Tucuman' | 'America/Argentina/Ushuaia' | 'America/Asuncion' | 'America/Bahia' | 'America/Bahia_Banderas' | 'America/Barbados' | 'America/Belem' | 'America/Belize' | 'America/Boa_Vista' | 'America/Bogota' | 'America/Boise' | 'America/Cambridge_Bay' | 'America/Campo_Grande' | 'America/Cancun' | 'America/Caracas' | 'America/Cayenne' | 'America/Chicago' | 'America/Chihuahua' | 'America/Costa_Rica' | 'America/Cuiaba' | 'America/Danmarkshavn' | 'America/Dawson' | 'America/Dawson_Creek' | 'America/Denver' | 'America/Detroit' | 'America/Edmonton' | 'America/Eirunepe' | 'America/El_Salvador' | 'America/Fort_Nelson' | 'America/Fortaleza' | 'America/Glace_Bay' | 'America/Goose_Bay' | 'America/Grand_Turk' | 'America/Guatemala' | 'America/Guayaquil' | 'America/Guyana' | 'America/Halifax' | 'America/Havana' | 'America/Hermosillo' | 'America/Indiana/Indianapolis' | 'America/Indiana/Knox' | 'America/Indiana/Marengo' | 'America/Indiana/Petersburg' | 'America/Indiana/Tell_City' | 'America/Indiana/Vevay' | 'America/Indiana/Vincennes' | 'America/Indiana/Winamac' | 'America/Inuvik' | 'America/Iqaluit' | 'America/Jamaica' | 'America/Juneau' | 'America/Kentucky/Louisville' | 'America/Kentucky/Monticello' | 'America/La_Paz' | 'America/Lima' | 'America/Los_Angeles' | 'America/Maceio' | 'America/Managua' | 'America/Manaus' | 'America/Martinique' | 'America/Matamoros' | 'America/Mazatlan' | 'America/Menominee' | 'America/Merida' | 'America/Metlakatla' | 'America/Mexico_City' | 'America/Miquelon' | 'America/Moncton' | 'America/Monterrey' | 'America/Montevideo' | 'America/New_York' | 'America/Nipigon' | 'America/Nome' | 'America/Noronha' | 'America/North_Dakota/Beulah' | 'America/North_Dakota/Center' | 'America/North_Dakota/New_Salem' | 'America/Nuuk' | 'America/Ojinaga' | 'America/Panama' | 'America/Pangnirtung' | 'America/Paramaribo' | 'America/Phoenix' | 'America/Port-au-Prince' | 'America/Porto_Velho' | 'America/Puerto_Rico' | 'America/Punta_Arenas' | 'America/Rainy_River' | 'America/Rankin_Inlet' | 'America/Recife' | 'America/Regina' | 'America/Resolute' | 'America/Rio_Branco' | 'America/Santarem' | 'America/Santiago' | 'America/Santo_Domingo' | 'America/Sao_Paulo' | 'America/Scoresbysund' | 'America/Sitka' | 'America/St_Johns' | 'America/Swift_Current' | 'America/Tegucigalpa' | 'America/Thule' | 'America/Thunder_Bay' | 'America/Tijuana' | 'America/Toronto' | 'America/Vancouver' | 'America/Whitehorse' | 'America/Winnipeg' | 'America/Yakutat' | 'America/Yellowknife' | 'Antarctica/Casey' | 'Antarctica/Davis' | 'Antarctica/Macquarie' | 'Antarctica/Mawson' | 'Antarctica/Palmer' | 'Antarctica/Rothera' | 'Antarctica/Troll' | 'Antarctica/Vostok' | 'Asia/Almaty' | 'Asia/Amman' | 'Asia/Anadyr' | 'Asia/Aqtau' | 'Asia/Aqtobe' | 'Asia/Ashgabat' | 'Asia/Atyrau' | 'Asia/Baghdad' | 'Asia/Baku' | 'Asia/Bangkok' | 'Asia/Barnaul' | 'Asia/Beirut' | 'Asia/Bishkek' | 'Asia/Brunei' | 'Asia/Chita' | 'Asia/Choibalsan' | 'Asia/Colombo' | 'Asia/Damascus' | 'Asia/Dhaka' | 'Asia/Dili' | 'Asia/Dubai' | 'Asia/Dushanbe' | 'Asia/Famagusta' | 'Asia/Gaza' | 'Asia/Hebron' | 'Asia/Ho_Chi_Minh' | 'Asia/Hong_Kong' | 'Asia/Hovd' | 'Asia/Irkutsk' | 'Asia/Jakarta' | 'Asia/Jayapura' | 'Asia/Jerusalem' | 'Asia/Kabul' | 'Asia/Kamchatka' | 'Asia/Karachi' | 'Asia/Kathmandu' | 'Asia/Khandyga' | 'Asia/Kolkata' | 'Asia/Krasnoyarsk' | 'Asia/Kuala_Lumpur' | 'Asia/Kuching' | 'Asia/Macau' | 'Asia/Magadan' | 'Asia/Makassar' | 'Asia/Manila' | 'Asia/Nicosia' | 'Asia/Novokuznetsk' | 'Asia/Novosibirsk' | 'Asia/Omsk' | 'Asia/Oral' | 'Asia/Pontianak' | 'Asia/Pyongyang' | 'Asia/Qatar' | 'Asia/Qostanay' | 'Asia/Qyzylorda' | 'Asia/Riyadh' | 'Asia/Sakhalin' | 'Asia/Samarkand' | 'Asia/Seoul' | 'Asia/Shanghai' | 'Asia/Singapore' | 'Asia/Srednekolymsk' | 'Asia/Taipei' | 'Asia/Tashkent' | 'Asia/Tbilisi' | 'Asia/Tehran' | 'Asia/Thimphu' | 'Asia/Tokyo' | 'Asia/Tomsk' | 'Asia/Ulaanbaatar' | 'Asia/Urumqi' | 'Asia/Ust-Nera' | 'Asia/Vladivostok' | 'Asia/Yakutsk' | 'Asia/Yangon' | 'Asia/Yekaterinburg' | 'Asia/Yerevan' | 'Atlantic/Azores' | 'Atlantic/Bermuda' | 'Atlantic/Canary' | 'Atlantic/Cape_Verde' | 'Atlantic/Faroe' | 'Atlantic/Madeira' | 'Atlantic/Reykjavik' | 'Atlantic/South_Georgia' | 'Atlantic/Stanley' | 'Australia/Adelaide' | 'Australia/Brisbane' | 'Australia/Broken_Hill' | 'Australia/Darwin' | 'Australia/Eucla' | 'Australia/Hobart' | 'Australia/Lindeman' | 'Australia/Lord_Howe' | 'Australia/Melbourne' | 'Australia/Perth' | 'Australia/Sydney' | 'CET' | 'CST6CDT' | 'EET' | 'EST' | 'EST5EDT' | 'Etc/GMT' | 'Etc/GMT-1' | 'Etc/GMT-10' | 'Etc/GMT-11' | 'Etc/GMT-12' | 'Etc/GMT-13' | 'Etc/GMT-14' | 'Etc/GMT-2' | 'Etc/GMT-3' | 'Etc/GMT-4' | 'Etc/GMT-5' | 'Etc/GMT-6' | 'Etc/GMT-7' | 'Etc/GMT-8' | 'Etc/GMT-9' | 'Etc/GMT+1' | 'Etc/GMT+10' | 'Etc/GMT+11' | 'Etc/GMT+12' | 'Etc/GMT+2' | 'Etc/GMT+3' | 'Etc/GMT+4' | 'Etc/GMT+5' | 'Etc/GMT+6' | 'Etc/GMT+7' | 'Etc/GMT+8' | 'Etc/GMT+9' | 'Etc/UTC' | 'Europe/Amsterdam' | 'Europe/Andorra' | 'Europe/Astrakhan' | 'Europe/Athens' | 'Europe/Belgrade' | 'Europe/Berlin' | 'Europe/Brussels' | 'Europe/Bucharest' | 'Europe/Budapest' | 'Europe/Chisinau' | 'Europe/Copenhagen' | 'Europe/Dublin' | 'Europe/Gibraltar' | 'Europe/Helsinki' | 'Europe/Istanbul' | 'Europe/Kaliningrad' | 'Europe/Kiev' | 'Europe/Kirov' | 'Europe/Lisbon' | 'Europe/London' | 'Europe/Luxembourg' | 'Europe/Madrid' | 'Europe/Malta' | 'Europe/Minsk' | 'Europe/Monaco' | 'Europe/Moscow' | 'Europe/Oslo' | 'Europe/Paris' | 'Europe/Prague' | 'Europe/Riga' | 'Europe/Rome' | 'Europe/Samara' | 'Europe/Saratov' | 'Europe/Simferopol' | 'Europe/Sofia' | 'Europe/Stockholm' | 'Europe/Tallinn' | 'Europe/Tirane' | 'Europe/Ulyanovsk' | 'Europe/Uzhgorod' | 'Europe/Vienna' | 'Europe/Vilnius' | 'Europe/Volgograd' | 'Europe/Warsaw' | 'Europe/Zaporozhye' | 'Europe/Zurich' | 'HST' | 'Indian/Chagos' | 'Indian/Christmas' | 'Indian/Cocos' | 'Indian/Kerguelen' | 'Indian/Mahe' | 'Indian/Maldives' | 'Indian/Mauritius' | 'Indian/Reunion' | 'MET' | 'MST' | 'MST7MDT' | 'Pacific/Apia' | 'Pacific/Auckland' | 'Pacific/Bougainville' | 'Pacific/Chatham' | 'Pacific/Chuuk' | 'Pacific/Easter' | 'Pacific/Efate' | 'Pacific/Fakaofo' | 'Pacific/Fiji' | 'Pacific/Funafuti' | 'Pacific/Galapagos' | 'Pacific/Gambier' | 'Pacific/Guadalcanal' | 'Pacific/Guam' | 'Pacific/Honolulu' | 'Pacific/Kanton' | 'Pacific/Kiritimati' | 'Pacific/Kosrae' | 'Pacific/Kwajalein' | 'Pacific/Majuro' | 'Pacific/Marquesas' | 'Pacific/Nauru' | 'Pacific/Niue' | 'Pacific/Norfolk' | 'Pacific/Noumea' | 'Pacific/Pago_Pago' | 'Pacific/Palau' | 'Pacific/Pitcairn' | 'Pacific/Pohnpei' | 'Pacific/Port_Moresby' | 'Pacific/Rarotonga' | 'Pacific/Tahiti' | 'Pacific/Tarawa' | 'Pacific/Tongatapu' | 'Pacific/Wake' | 'Pacific/Wallis' | 'PST8PDT' | 'WET'
StorefrontApiVersion
Union of supported storefront API versions
'2022-04' | '2022-07' | '2022-10' | '2023-01' | '2023-04' | '2023-07' | '2024-01' | '2024-04' | '2024-07' | '2024-10' | 'unstable'
GraphQLError
GraphQL error returned by the Shopify Storefront APIs.
extensions
message
SelectedPaymentOption
handle
The unique handle for the payment option.
This is not a globally unique identifier. It may be an identifier specific to the given checkout session or the current shop.
type
The type of the payment option.
Shops can be configured to support many different payment options. Some options are only available to buyers in specific regions.
| Type | Description |
|---|---|
| `creditCard` | A vaulted or manually entered credit card. |
| `deferred` | A [deferred payment](https://help.shopify.com/en/manual/orders/deferred-payments), such as invoicing the buyer and collecting payment at a later time. |
| `local` | A [local payment option](https://help.shopify.com/en/manual/payments/shopify-payments/local-payment-methods) specific to the current region or market |
| `manualPayment` | A manual payment option such as an in-person retail transaction. |
| `offsite` | A payment processed outside of Shopify's checkout, excluding integrated wallets. |
| `other` | Another type of payment not defined here. |
| `paymentOnDelivery` | A payment that will be collected on delivery. |
| `redeemable` | A redeemable payment option such as a gift card or store credit. |
| `wallet` | An integrated wallet such as PayPal, Google Pay, Apple Pay, etc. |
| `customOnsite` | A custom payment option that is processed through a checkout extension with a payments app. |
SessionToken
get
Requests a session token that hasn't expired. You should call this method every time you need to make a request to your backend in order to get a valid token. This method will return cached tokens when possible, so you don’t need to worry about storing these tokens yourself.
ExtensionSettings
The merchant-defined setting values for the extension.
Record<
string,
string | number | boolean | undefined
>
ShippingAddress
address1
The first line of the buyer's address, including street name and number.
{% include /apps/checkout/privacy-icon.md %} Requires level 2 access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data).
address2
The second line of the buyer's address, like apartment number, suite, etc.
{% include /apps/checkout/privacy-icon.md %} Requires level 2 access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data).
city
The buyer's city.
{% include /apps/checkout/privacy-icon.md %} Requires level 2 access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data).
company
The buyer's company name.
{% include /apps/checkout/privacy-icon.md %} Requires level 1 access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data).
countryCode
The ISO 3166 Alpha-2 format for the buyer's country. Refer to https://www.iso.org/iso-3166-country-codes.html.
{% include /apps/checkout/privacy-icon.md %} Requires level 2 access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data).
firstName
The buyer's first name.
{% include /apps/checkout/privacy-icon.md %} Requires level 2 access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data).
lastName
The buyer's last name.
{% include /apps/checkout/privacy-icon.md %} Requires level 2 access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data).
name
The buyer's full name.
{% include /apps/checkout/privacy-icon.md %} Requires level 2 access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data).
oneTimeUse
Specifies whether the address should be saved to the buyer's account.
phone
The buyer's phone number.
{% include /apps/checkout/privacy-icon.md %} Requires level 2 access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data).
provinceCode
The buyer's province code, such as state, province, prefecture, or region.
{% include /apps/checkout/privacy-icon.md %} Requires level 2 access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data).
zip
The buyer's postal or ZIP code.
{% include /apps/checkout/privacy-icon.md %} Requires level 2 access to [protected customer data](/docs/apps/store/data-protection/protected-customer-data).
Shop
id
The shop ID.
myshopifyDomain
The shop's myshopify.com domain.
name
The name of the shop.
storefrontUrl
The primary storefront URL.
> Caution: > As of version `2024-04` this value will no longer have a trailing slash.
Storage
A key-value storage object for the extension.
Stored data is only available to this specific extension and any of its instances.
The storage backend is implemented with `localStorage` and should persist across the buyer's checkout session. However, data persistence isn't guaranteed.
delete
Delete stored data by key.
read
Read and return a stored value by key.
The stored data is deserialized from JSON and returned as its original primitive.
Returns `null` if no stored data exists.
write
Write stored data for this key.
The data must be serializable to JSON.
Ui
overlay
Allows the extension to close an overlay programmatically.
Supported overlay components are [Modal](/docs/api/checkout-ui-extensions/2024-10/components/overlays/modal), [Sheet](/docs/api/checkout-ui-extensions/2024-10/components/overlays/sheet) and [Popover](/docs/api/checkout-ui-extensions/2024-10/components/overlays/popover).
Overlay
close
Closes the overlay with the given ID.
Version
string
Related