## Update an Express Checkout Element

`element.update(options: object)`

Updates the options the [Express Checkout Element](https://docs.stripe.com/js/element/express_checkout_element.md) was initialized with. Updates merge into the existing configuration.

- `options`
  Options for updating the Express Checkout Element.
- `allowedShippingCountries`
  By default, the Express Checkout Element allows all countries for shipping. You can specify which countries are allowed for shipping in the Express Checkout Element with a list of two-letter country codes.
- `billingAddressRequired`
  Controls whether the Express Checkout Element collects the billing address. The default value depends on your integration:
  - If you pass `allowedShippingCountries`, `phoneNumberRequired`, `shippingAddressRequired`, `emailRequired`, `applePay`, `lineItems`, or `business` when creating the Express Checkout Element, `billingAddressRequired` defaults to false.
  - Otherwise, `billingAddressRequired` defaults to true. You can explicitly set `billingAddressRequired` to true or false to override the default behavior. We highly recommend that you collect the billing address because it can be used to perform address verifications and block fraudulent payments.
- `emailRequired`
  Collect the customer's email by setting this option to `true`.
- `layout`
  Specify how the buttons are arranged in a grid-like layout in the Express Checkout Element. Elements determines the layout by using certain factors, such as available space, number of buttons, and the defined `layout` object.
- `maxColumns`
  Defines the maximum number of columns the Express Checkout Element can use to render. Default is `0`, meaning unlimited.
- `maxRows`
  Defines the maximum number of rows the Express Checkout Element can use to render. Default is `0`, meaning unlimited.
- `overflow`
  Specify whether or not to always hide the overflow menu or allow Elements to determine when to show the overflow menu. Default is `auto`. You can't specify both `overflow: 'never'` and set `maxRows` to a number greater than 0.
- `paymentMethodOrder`
  By default, the Express Checkout Element uses a dynamic ordering that optimizes payment method display for

### Example

```html
<button id="update-button">Update Express Checkout Element</button>

<script>
  const expressCheckoutElement = stripe.elements().create('expressCheckout', {
    // ... initial options
  });
  expressCheckoutElement.mount('#express-checkout-element');

  document.getElementById('update-button').addEventListener('click', () => {
    expressCheckoutElement.update({
      allowedShippingCountries: ['US', 'CA'],
    });
  });
</script>
```