## Update the Customer's shipping address Use this method to update the Customer's shipping address. If your integration uses the [Express Checkout Element](/elements/express-checkout-element.md), the shipping address is collected directly from the wallet and the value set by `updateShippingAddress` is not used for express checkout payments. This method returns a `Promise` that resolves with an object containing the following fields: * `type`: one of either `"success"` or `"error"` * `session`: only populated when `type` is `"success"`. Contains a [Session](/js/custom_checkout/session_object) instance representing the updated state. * `error`: only populated when `type` is `"error"`. Contains an object with a string `message` field which can be displayed to your customer. - `shippingAddress` (nullable object) **required** New shipping address for the Customer. - `name` (optional string) Full name. - `address` (optional object) Address. - `country` (string) **required** Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - `line1` (string) **required** Address line 1 (e.g., street, PO Box, or company name). - `line2` (optional string) Address line 2 (e.g., apartment, suite, unit, or building). - `city` (optional string) City, district, suburb, town, or village. - `postal_code` (optional string) ZIP or postal code. - `state` (optional string) State, county, province, or region. ### Update the Customer's shipping address ```jsx const checkoutState = useCheckout(); if (checkoutState.type === 'success') { const {updateShippingAddress} = checkoutState.checkout; updateShippingAddress({ address: { line1: '27 Fredrick Ave', city: 'Brothers', state: 'OR', postal_code: '97712', country: 'US', } }); } ```