---
title: Addresses API
description: >-
  Access the buyer's shipping and billing addresses and update the shipping
  address during checkout. Requires Level 2 protected customer data access.
api_version: 2027-01
source_url:
  html: >-
    https://shopify.dev/docs/api/checkout-ui-extensions/2027-01-rc/target-apis/checkout-apis/addresses-api
  md: >-
    https://shopify.dev/docs/api/checkout-ui-extensions/2027-01-rc/target-apis/checkout-apis/addresses-api.md
api_name: checkout-ui-extensions
---

# Addresses API

**Requires level 2 access to [protected customer data](https://shopify.dev/docs/apps/store/data-protection/protected-customer-data).:**

The Addresses API provides access to the buyer's shipping and billing addresses during checkout. Use this API to display address details, show location-specific information, and update the shipping address.

The billing address is read-only. There's no method to modify it from an extension. `shippingAddress` is `undefined` when the cart contains only digital products or delivery isn't required.

### Use cases

* **Display the shipping destination**: Show the buyer's city, province, and country to confirm their shipping location.
* **Show billing information**: Display the billing address to confirm the buyer's payment details.
* **Modify the shipping address**: Update the shipping address programmatically, such as pre-filling a postal code or correcting a field.

### Support Targets (33)

### Supported targets

* [purchase.​address-autocomplete.​format-suggestion](https://shopify.dev/docs/api/checkout-ui-extensions/2027-01-rc/targets/checkout/address#format-a-selected-suggestion-)
* [purchase.​address-autocomplete.​suggest](https://shopify.dev/docs/api/checkout-ui-extensions/2027-01-rc/targets/checkout/address#suggest-address-completions-)
* [purchase.​checkout.​actions.​render-before](https://shopify.dev/docs/api/checkout-ui-extensions/2027-01-rc/targets/checkout/navigation#navigation-target)
* [purchase.​checkout.​block.​render](https://shopify.dev/docs/api/checkout-ui-extensions/2027-01-rc/targets/checkout/block#block-target)
* [purchase.​checkout.​cart-line-item.​render-after](https://shopify.dev/docs/api/checkout-ui-extensions/2027-01-rc/targets/checkout/order-summary#line-item-targets)
* [purchase.​checkout.​cart-line-list.​render-after](https://shopify.dev/docs/api/checkout-ui-extensions/2027-01-rc/targets/checkout/order-summary#checkout-cart-line-list-)
* [purchase.​checkout.​chat.​render](https://shopify.dev/docs/api/checkout-ui-extensions/2027-01-rc/web-components/overlays/chat)
* [purchase.​checkout.​contact.​render-after](https://shopify.dev/docs/api/checkout-ui-extensions/2027-01-rc/targets/checkout/information#information-target)
* [purchase.​checkout.​delivery-address.​render-after](https://shopify.dev/docs/api/checkout-ui-extensions/2027-01-rc/targets/checkout/shipping#render-after-delivery-address-)
* [purchase.​checkout.​delivery-address.​render-before](https://shopify.dev/docs/api/checkout-ui-extensions/2027-01-rc/targets/checkout/shipping#delivery-address-targets)
* [purchase.​checkout.​footer.​render-after](https://shopify.dev/docs/api/checkout-ui-extensions/2027-01-rc/targets/checkout/footer#footer-target)
* [purchase.​checkout.​header.​render-after](https://shopify.dev/docs/api/checkout-ui-extensions/2027-01-rc/targets/checkout/header#header-target)
* [purchase.​checkout.​payment-method-list.​render-after](https://shopify.dev/docs/api/checkout-ui-extensions/2027-01-rc/targets/checkout/payment#render-after-payment-methods-)
* [purchase.​checkout.​payment-method-list.​render-before](https://shopify.dev/docs/api/checkout-ui-extensions/2027-01-rc/targets/checkout/payment#payment-targets)
* [purchase.​checkout.​pickup-location-list.​render-after](https://shopify.dev/docs/api/checkout-ui-extensions/2027-01-rc/targets/checkout/local-pickup#render-after-pickup-locations-)
* [purchase.​checkout.​pickup-location-list.​render-before](https://shopify.dev/docs/api/checkout-ui-extensions/2027-01-rc/targets/checkout/local-pickup#location-list-targets)
* [purchase.​checkout.​pickup-location-option-item.​render-after](https://shopify.dev/docs/api/checkout-ui-extensions/2027-01-rc/targets/checkout/local-pickup#location-option-item-target)
* [purchase.​checkout.​pickup-point-list.​render-after](https://shopify.dev/docs/api/checkout-ui-extensions/2027-01-rc/targets/checkout/pickup-points#render-after-pickup-points-)
* [purchase.​checkout.​pickup-point-list.​render-before](https://shopify.dev/docs/api/checkout-ui-extensions/2027-01-rc/targets/checkout/pickup-points#pickup-points-targets)
* [purchase.​checkout.​reductions.​render-after](https://shopify.dev/docs/api/checkout-ui-extensions/2027-01-rc/targets/checkout/order-summary#checkout-reductions-after-)
* [purchase.​checkout.​reductions.​render-before](https://shopify.dev/docs/api/checkout-ui-extensions/2027-01-rc/targets/checkout/order-summary#reductions-targets)
* [purchase.​checkout.​shipping-option-item.​details.​render](https://shopify.dev/docs/api/checkout-ui-extensions/2027-01-rc/targets/checkout/shipping#shipping-option-item-targets)
* [purchase.​checkout.​shipping-option-item.​render-after](https://shopify.dev/docs/api/checkout-ui-extensions/2027-01-rc/targets/checkout/shipping#render-after-shipping-option-)
* [purchase.​checkout.​shipping-option-list.​render-after](https://shopify.dev/docs/api/checkout-ui-extensions/2027-01-rc/targets/checkout/shipping#render-after-shipping-options-)
* [purchase.​checkout.​shipping-option-list.​render-before](https://shopify.dev/docs/api/checkout-ui-extensions/2027-01-rc/targets/checkout/shipping#shipping-option-list-targets)
* [purchase.​thank-you.​announcement.​render](https://shopify.dev/docs/api/checkout-ui-extensions/2027-01-rc/targets/thank-you/announcement#thank-you-announcement-)
* [purchase.​thank-you.​block.​render](https://shopify.dev/docs/api/checkout-ui-extensions/2027-01-rc/targets/thank-you/block#block-target)
* [purchase.​thank-you.​cart-line-item.​render-after](https://shopify.dev/docs/api/checkout-ui-extensions/2027-01-rc/targets/thank-you/order-summary#line-item-targets)
* [purchase.​thank-you.​cart-line-list.​render-after](https://shopify.dev/docs/api/checkout-ui-extensions/2027-01-rc/targets/thank-you/order-summary#thank-you-cart-line-list-)
* [purchase.​thank-you.​chat.​render](https://shopify.dev/docs/api/checkout-ui-extensions/2027-01-rc/web-components/overlays/chat)
* [purchase.​thank-you.​customer-information.​render-after](https://shopify.dev/docs/api/checkout-ui-extensions/2027-01-rc/targets/thank-you/information#information-target)
* [purchase.​thank-you.​footer.​render-after](https://shopify.dev/docs/api/checkout-ui-extensions/2027-01-rc/targets/thank-you/footer#footer-target)
* [purchase.​thank-you.​header.​render-after](https://shopify.dev/docs/api/checkout-ui-extensions/2027-01-rc/targets/thank-you/header#header-target)

### Properties

The [`shopify` global object](https://shopify.dev/docs/api/checkout-ui-extensions/2027-01-rc#target-apis-define-what-your-extension-does) provides address data for the current checkout. Access the following properties on `shopify` to read the buyer's addresses. Available to `purchase` extension targets.

* **billing​Address**

  **SubscribableSignalLike\<MailingAddress | undefined>**

  The proposed customer billing address. The address updates when the field is committed (on change) rather than every keystroke. The property is available only if the extension has access to protected customer data. The subscribable value is `undefined` if the billing address hasn't been provided yet.

  [](https://shopify.dev/apps/store/data-protection/protected-customer-data)Requires access to [protected customer data](https://shopify.dev/docs/apps/store/data-protection/protected-customer-data).

* **shipping​Address**

  **SubscribableSignalLike\<ShippingAddress | undefined>**

  The proposed customer shipping address. During the information step, the address updates when the field is committed (on change) rather than every keystroke. The property is available only if the extension has access to protected customer data. When available, the subscribable value is `undefined` if delivery isn't required.

  [](https://shopify.dev/apps/store/data-protection/protected-customer-data)Requires access to [protected customer data](https://shopify.dev/docs/apps/store/data-protection/protected-customer-data).

### SubscribableSignalLike

Represents a reactive signal interface that provides both immediate value access and subscription-based updates. Enables real-time synchronization with changing data through the observer pattern. This interface extends \`ReadonlySignalLike\` with deprecated fields that are still supported for backwards compatibility.

* current

  The current value of the signal. Equivalent to \`.value\`, accessing this property subscribes to changes when used in a reactive context.

  ```ts
  T
  ```

* destroy

  Cleans up the subscription and releases any resources held by this signal. After calling \`destroy()\`, the signal stops receiving updates from the main thread.

  ```ts
  () => Promise<void>
  ```

* subscribe

  Subscribes to value changes and calls the provided function whenever the value updates. Returns an unsubscribe function to clean up the subscription. Use to automatically react to changes in the signal's value.

  ```ts
  (fn: (value: T) => void) => () => void
  ```

* value

  The current value of the signal. This property provides immediate access to the current value without requiring subscription setup. Use for one-time value checks or initial setup.

  ```ts
  T
  ```

### MailingAddress

* address1

  The first line of the street address, including the street number and name. The value is \`undefined\` if the buyer hasn't entered an address yet. {% include /apps/checkout/privacy-icon.md %} Requires level 2 access to \[protected customer data]\(/docs/apps/store/data-protection/protected-customer-data).

  ```ts
  string
  ```

* address2

  The second line of the buyer's address, such as apartment number, suite, or unit. The value is \`undefined\` if the buyer didn't provide a second address line. {% include /apps/checkout/privacy-icon.md %} Requires level 2 access to \[protected customer data]\(/docs/apps/store/data-protection/protected-customer-data).

  ```ts
  string
  ```

* addressCode

  A postal or national address code that identifies the address independently of its street lines, used by countries such as Saudi Arabia. The value is \`undefined\` if the country doesn't use one or it hasn't been provided. {% include /apps/checkout/privacy-icon.md %} Requires level 2 access to \[protected customer data]\(/docs/apps/store/data-protection/protected-customer-data).

  ```ts
  string
  ```

* addressLineComponents

  The parts of \`address1\` and \`address2\`, such as street name, street number and apartment. The value is \`undefined\` if the country doesn't store address components or none have been entered. \`address1\` and \`address2\` are still provided alongside them. Writable through \`applyShippingAddressChange\`, which doesn't check the components against \`Country.acceptedAddressInputFields\`. For each street line, changed components always win over the line, and the line is rebuilt from them. Components that match the current address count as unchanged. In countries that store components, an edited line wins over unchanged components, so an extension can spread the address it read and correct only \`address1\`. If the country accepts components but doesn't store them, the line is built from the components and only the line is saved. If the country's address format has no components, a change that includes them is rejected. {% include /apps/checkout/privacy-icon.md %} Requires level 2 access to \[protected customer data]\(/docs/apps/store/data-protection/protected-customer-data).

  ```ts
  AddressLineComponents
  ```

* city

  The city, town, or village of the address. The value is \`undefined\` if the buyer hasn't entered a city yet. {% include /apps/checkout/privacy-icon.md %} Requires level 2 access to \[protected customer data]\(/docs/apps/store/data-protection/protected-customer-data).

  ```ts
  string
  ```

* company

  The buyer's company name. The value is \`undefined\` if the buyer didn't enter a company or the store doesn't collect company names. {% include /apps/checkout/privacy-icon.md %} Requires level 1 access to \[protected customer data]\(/docs/apps/store/data-protection/protected-customer-data).

  ```ts
  string
  ```

* countryCode

  The two-letter country code in \[ISO 3166 Alpha-2]\(https://en.wikipedia.org/wiki/ISO\_3166-1\_alpha-2) format. The value is \`undefined\` if the buyer hasn't selected a country yet. {% include /apps/checkout/privacy-icon.md %} Requires level 2 access to \[protected customer data]\(/docs/apps/store/data-protection/protected-customer-data).

  ```ts
  CountryCode
  ```

* firstName

  The buyer's first name. Use this alongside \`lastName\` when you need to display or process name parts separately. The value is \`undefined\` if the buyer didn't provide a first name or the store doesn't collect split names. {% include /apps/checkout/privacy-icon.md %} Requires level 2 access to \[protected customer data]\(/docs/apps/store/data-protection/protected-customer-data).

  ```ts
  string
  ```

* lastName

  The buyer's last name. Use this alongside \`firstName\` when you need to display or process name parts separately. The value is \`undefined\` if the buyer didn't provide a last name or the store doesn't collect split names. {% include /apps/checkout/privacy-icon.md %} Requires level 2 access to \[protected customer data]\(/docs/apps/store/data-protection/protected-customer-data).

  ```ts
  string
  ```

* name

  The buyer's full name, typically a combination of first and last name. The value is \`undefined\` if the buyer didn't provide a name. {% include /apps/checkout/privacy-icon.md %} Requires level 2 access to \[protected customer data]\(/docs/apps/store/data-protection/protected-customer-data).

  ```ts
  string
  ```

* phone

  The phone number associated with the address, typically in international format. The value is \`undefined\` if the buyer didn't provide a phone number or the store doesn't collect phone numbers. {% include /apps/checkout/privacy-icon.md %} Requires level 2 access to \[protected customer data]\(/docs/apps/store/data-protection/protected-customer-data).

  ```ts
  string
  ```

* provinceCode

  The province, state, prefecture, or region code of the address. The format varies by country. The value is \`undefined\` if the buyer hasn't selected one yet or the country doesn't have provinces. {% include /apps/checkout/privacy-icon.md %} Requires level 2 access to \[protected customer data]\(/docs/apps/store/data-protection/protected-customer-data).

  ```ts
  string
  ```

* zip

  The postal code or ZIP code of the address, used for mail sorting and delivery routing. The value is \`undefined\` if the buyer hasn't entered one yet or the country doesn't use postal codes. {% include /apps/checkout/privacy-icon.md %} Requires level 2 access to \[protected customer data]\(/docs/apps/store/data-protection/protected-customer-data).

  ```ts
  string
  ```

### AddressLineComponents

Components of the \`address1\`/\`address2\` lines on a \`MailingAddress\`, for countries whose address format accepts them.

* additionalInformation

  Additional address information, for example an apartment, suite, or unit. {% include /apps/checkout/privacy-icon.md %} Requires level 2 access to \[protected customer data]\(/docs/apps/store/data-protection/protected-customer-data).

  ```ts
  string
  ```

* district

  A regional or city subdivision (for example, county, metropolitan region, neighborhood, ward). {% include /apps/checkout/privacy-icon.md %} Requires level 2 access to \[protected customer data]\(/docs/apps/store/data-protection/protected-customer-data).

  ```ts
  string
  ```

* streetName

  The street name, without the number. {% include /apps/checkout/privacy-icon.md %} Requires level 2 access to \[protected customer data]\(/docs/apps/store/data-protection/protected-customer-data).

  ```ts
  string
  ```

* streetNumber

  The house or building number. {% include /apps/checkout/privacy-icon.md %} Requires level 2 access to \[protected customer data]\(/docs/apps/store/data-protection/protected-customer-data).

  ```ts
  string
  ```

* subdistrict

  A finer subdivision within \`district\`, when the country uses both. {% include /apps/checkout/privacy-icon.md %} Requires level 2 access to \[protected customer data]\(/docs/apps/store/data-protection/protected-customer-data).

  ```ts
  string
  ```

### CountryCode

```ts
'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'
```

### ShippingAddress

* address1

  The first line of the street address, including the street number and name. The value is \`undefined\` if the buyer hasn't entered an address yet. {% include /apps/checkout/privacy-icon.md %} Requires level 2 access to \[protected customer data]\(/docs/apps/store/data-protection/protected-customer-data).

  ```ts
  string
  ```

* address2

  The second line of the buyer's address, such as apartment number, suite, or unit. The value is \`undefined\` if the buyer didn't provide a second address line. {% include /apps/checkout/privacy-icon.md %} Requires level 2 access to \[protected customer data]\(/docs/apps/store/data-protection/protected-customer-data).

  ```ts
  string
  ```

* addressCode

  A postal or national address code that identifies the address independently of its street lines, used by countries such as Saudi Arabia. The value is \`undefined\` if the country doesn't use one or it hasn't been provided. {% include /apps/checkout/privacy-icon.md %} Requires level 2 access to \[protected customer data]\(/docs/apps/store/data-protection/protected-customer-data).

  ```ts
  string
  ```

* addressLineComponents

  The parts of \`address1\` and \`address2\`, such as street name, street number and apartment. The value is \`undefined\` if the country doesn't store address components or none have been entered. \`address1\` and \`address2\` are still provided alongside them. Writable through \`applyShippingAddressChange\`, which doesn't check the components against \`Country.acceptedAddressInputFields\`. For each street line, changed components always win over the line, and the line is rebuilt from them. Components that match the current address count as unchanged. In countries that store components, an edited line wins over unchanged components, so an extension can spread the address it read and correct only \`address1\`. If the country accepts components but doesn't store them, the line is built from the components and only the line is saved. If the country's address format has no components, a change that includes them is rejected. {% include /apps/checkout/privacy-icon.md %} Requires level 2 access to \[protected customer data]\(/docs/apps/store/data-protection/protected-customer-data).

  ```ts
  AddressLineComponents
  ```

* city

  The city, town, or village of the address. The value is \`undefined\` if the buyer hasn't entered a city yet. {% include /apps/checkout/privacy-icon.md %} Requires level 2 access to \[protected customer data]\(/docs/apps/store/data-protection/protected-customer-data).

  ```ts
  string
  ```

* company

  The buyer's company name. The value is \`undefined\` if the buyer didn't enter a company or the store doesn't collect company names. {% include /apps/checkout/privacy-icon.md %} Requires level 1 access to \[protected customer data]\(/docs/apps/store/data-protection/protected-customer-data).

  ```ts
  string
  ```

* countryCode

  The two-letter country code in \[ISO 3166 Alpha-2]\(https://en.wikipedia.org/wiki/ISO\_3166-1\_alpha-2) format. The value is \`undefined\` if the buyer hasn't selected a country yet. {% include /apps/checkout/privacy-icon.md %} Requires level 2 access to \[protected customer data]\(/docs/apps/store/data-protection/protected-customer-data).

  ```ts
  CountryCode
  ```

* firstName

  The buyer's first name. Use this alongside \`lastName\` when you need to display or process name parts separately. The value is \`undefined\` if the buyer didn't provide a first name or the store doesn't collect split names. {% include /apps/checkout/privacy-icon.md %} Requires level 2 access to \[protected customer data]\(/docs/apps/store/data-protection/protected-customer-data).

  ```ts
  string
  ```

* lastName

  The buyer's last name. Use this alongside \`firstName\` when you need to display or process name parts separately. The value is \`undefined\` if the buyer didn't provide a last name or the store doesn't collect split names. {% include /apps/checkout/privacy-icon.md %} Requires level 2 access to \[protected customer data]\(/docs/apps/store/data-protection/protected-customer-data).

  ```ts
  string
  ```

* name

  The buyer's full name, typically a combination of first and last name. The value is \`undefined\` if the buyer didn't provide a name. {% include /apps/checkout/privacy-icon.md %} Requires level 2 access to \[protected customer data]\(/docs/apps/store/data-protection/protected-customer-data).

  ```ts
  string
  ```

* oneTimeUse

  Controls whether the address is saved to the buyer's account. When \`true\`, the address won't be saved and is only used for this checkout. When \`false\` or \`undefined\`, the address might be saved to the buyer's account for future use.

  ```ts
  boolean
  ```

* phone

  The phone number associated with the address, typically in international format. The value is \`undefined\` if the buyer didn't provide a phone number or the store doesn't collect phone numbers. {% include /apps/checkout/privacy-icon.md %} Requires level 2 access to \[protected customer data]\(/docs/apps/store/data-protection/protected-customer-data).

  ```ts
  string
  ```

* provinceCode

  The province, state, prefecture, or region code of the address. The format varies by country. The value is \`undefined\` if the buyer hasn't selected one yet or the country doesn't have provinces. {% include /apps/checkout/privacy-icon.md %} Requires level 2 access to \[protected customer data]\(/docs/apps/store/data-protection/protected-customer-data).

  ```ts
  string
  ```

* zip

  The postal code or ZIP code of the address, used for mail sorting and delivery routing. The value is \`undefined\` if the buyer hasn't entered one yet or the country doesn't use postal codes. {% include /apps/checkout/privacy-icon.md %} Requires level 2 access to \[protected customer data]\(/docs/apps/store/data-protection/protected-customer-data).

  ```ts
  string
  ```

### Methods

The [`shopify` global object](https://shopify.dev/docs/api/checkout-ui-extensions/2027-01-rc#target-apis-define-what-your-extension-does) provides methods to modify address data. Access the following methods on `shopify` to apply shipping address changes. Available to `purchase.checkout` extension targets.

* **apply​Shipping​Address​Change**

  **(change: ShippingAddressUpdateChange) => Promise\<ShippingAddressChangeResult>**

  Updates the buyer's shipping address on the checkout. The provided fields are merged into the existing address without prompting the buyer. On success, the `shippingAddress` property updates to reflect the change.

  **Note:** This method returns an error if the \<a href="/docs/api/checkout-ui-extensions/2027-01-rc/apis/cart-instructions#properties-propertydetail-instructions">cart instruction\</a> \<code>\<span class="PreventFireFoxApplyingGapToWBR">delivery.can\<wbr/>Select\<wbr/>Custom\<wbr/>Address\</span>\</code> is false, or the buyer is using an accelerated checkout method, such as Apple Pay or Google Pay.

  [](https://shopify.dev/apps/store/data-protection/protected-customer-data)Requires access to [protected customer data](https://shopify.dev/docs/apps/store/data-protection/protected-customer-data).

### ShippingAddressUpdateChange

Updates the buyer's shipping address on the checkout. Pass this to \`applyShippingAddressChange()\` to modify specific address fields without replacing the entire address.

* address

  Fields to update in the shipping address. You only need to provide values for the fields you want to update. Any fields you don't list keep their current values. Address line components are written nested under \`addressLineComponents\`, the same shape they're read.

  ```ts
  Partial<ShippingAddress>
  ```

* type

  Identifies this as a shipping address update. This is the only supported change type for \`applyShippingAddressChange()\`.

  ```ts
  'updateShippingAddress'
  ```

### ShippingAddressChangeResult

The result of calling \`applyShippingAddressChange()\`. Use the \`type\` property to determine whether the change succeeded or failed. On failure, the \`errors\` array contains field-level details.

```ts
ShippingAddressChangeResultSuccess | ShippingAddressChangeResultError
```

### ShippingAddressChangeResultSuccess

The result of a successful shipping address change. The \`type\` property is \`'success'\` and \`errors\` is \`null\`.

* errors

  Always \`null\` for a successful address change. Present so that you can check \`result.errors\` without narrowing the union type first.

  ```ts
  null
  ```

* type

  Indicates that the shipping address change was applied successfully.

  ```ts
  'success'
  ```

### ShippingAddressChangeResultError

The result of a failed shipping address change. Check the \`errors\` array for field-level details about what went wrong.

* errors

  The list of field-level errors that prevented the address change. Each entry identifies which address field failed and why.

  ```ts
  ShippingAddressChangeFieldError[]
  ```

* type

  Indicates that the shipping address change couldn't be applied. Check the \`errors\` array for field-level details.

  ```ts
  'error'
  ```

### ShippingAddressChangeFieldError

An error corresponding to a particular field from a given change. Use the \`field\` property to determine which address field caused the error.

* field

  The address input that caused the error, such as \`'countryCode'\` or \`'zip'\`, or an address line component such as \`'streetName'\`. The value is \`undefined\` if the error isn't specific to a single input.

  ```ts
  ShippingAddressChangeErrorField
  ```

* message

  A message that explains the error. This message is useful for debugging. It isn't localized and shouldn't be displayed to the buyer.

  ```ts
  string
  ```

### ShippingAddressChangeErrorField

The input a shipping address change failed on: an accepted input, \`'name'\`, or \`'addressLineComponents'\` when the components object itself is invalid.

```ts
AcceptedAddressInputField | 'addressLineComponents' | 'name'
```

### AcceptedAddressInputField

An address input a country's address format carries. Flat fields (\`address1\`, \`city\`, \`zip\`, …) are written on the change's \`address\`; line components (\`streetName\`, \`streetNumber\`, \`additionalInformation\`, \`district\`, \`subdistrict\`) are written inside \`addressLineComponents\`, and are rejected as unknown properties if sent at the top level.

```ts
'additionalInformation' | 'address1' | 'address2' | 'addressCode' | 'city' | 'company' | 'countryCode' | 'district' | 'firstName' | 'lastName' | 'phone' | 'provinceCode' | 'streetName' | 'streetNumber' | 'subdistrict' | 'zip'
```

### Examples

* #### Display the shipping destination

  ##### Description

  Show the buyer's city, province, and country to confirm their shipping location. This example renders \`shopify.shippingAddress\` fields, with a fallback banner when no address has been entered.

  ##### jsx

  ```jsx
  import '@shopify/ui-extensions/preact';
  import {render} from 'preact';

  export default function extension() {
    render(<Extension />, document.body);
  }

  function Extension() {
    const shippingAddress = shopify.shippingAddress?.value;

    if (!shippingAddress) {
      return (
        <s-banner>
          No shipping address has been entered yet.
        </s-banner>
      );
    }

    const parts = [
      shippingAddress.city,
      shippingAddress.provinceCode,
      shippingAddress.countryCode,
    ].filter(Boolean);

    return (
      <s-stack>
        <s-text>Shipping to: {parts.join(', ')}</s-text>
      </s-stack>
    );
  }
  ```

* #### Show the billing address

  ##### Description

  Format the billing address as a single-line string. This example filters the optional address fields like city, province, and country, and joins them into a readable line.

  ##### jsx

  ```jsx
  import '@shopify/ui-extensions/preact';
  import {render} from 'preact';

  export default function extension() {
    render(<Extension />, document.body);
  }

  function Extension() {
    const billingAddress = shopify.billingAddress?.value;

    if (!billingAddress) {
      return null;
    }

    const formattedAddress = [
      billingAddress.address1,
      billingAddress.city,
      billingAddress.provinceCode,
      billingAddress.countryCode,
    ]
      .filter(Boolean)
      .join(', ');

    return (
      <s-banner heading="Billing address">
        {formattedAddress}
      </s-banner>
    );
  }
  ```

***

## Best practices

* **Preserve buyer input with partial updates**: When updating the shipping address, include only the fields you need to change. Unspecified fields keep their current values, so you don't accidentally clear what the buyer already entered.
* **Hide mutation UI when changes are blocked**: Check `delivery.canSelectCustomAddress` via the [Cart Instructions API](https://shopify.dev/docs/api/checkout-ui-extensions/2027-01-rc/target-apis/checkout-apis/cart-instructions-api) before rendering address modification controls. If it's `false`, hide the feature entirely rather than showing an error after the buyer interacts with it.

***

## Limitations

* Shipping address changes aren't available when the buyer uses an accelerated checkout method such as Apple Pay or Google Pay.

***
