Create the Address Element elements.create(type: 'address', options: object) This method creates an instance of the Address Element. NOTE: If you are creating multiple instances of the Address Element, configuration of the checkbox to sync shipping and billing addresses exists in the creation of the Elements instance. - type The type of Element being created, which is address in this case. You can create multiple Address Elements, one of each mode, in a single Elements instance. - options Options for creating the Address Element. - mode Specify which mode you would like to use Address Element for. When shipping mode is used with the Payment Element and Contact Details Element, it will automatically pass shipping information when confirming Payment Intent or Setup Intent. When billing mode is used with the Payment Element, it will automatically pass the billing information when confirming Payment Intent or Setup Intent. - autocomplete By default, the Address Element will have autocomplete enabled with Stripe provided Google Maps API key for certain countries if any of the following condition is met: * If Payment Element is mounted in the same elements group as Address Element in a single page application. * If the Address Element is used in an active Link session (Link is also known as Onelink in the UK). [Contact Legal before editing or deleting the Google Maps autocomplete callout]: # By using autocomplete, you agree to comply with the Google Maps Platform Acceptable Use Policy. If you violate this policy, we might disable autocomplete, or take any other action as necessary. You can customize the autocomplete setting with this option. - mode Specify disabled to disable autocomplete in the Address Element. Specify google_maps_api to enable Google Maps API with your own key. It will only be used when Stripe provided Google Maps API key is not available. The default setting is automatic, where we’ll support autocomplete when possible. - apiKey Specify your own Google Maps API key with it. Only needs to be passed in when autocomplete.mode is set to google_maps_api. - allowedCountries By default, the Address Element will display all countries for selection. You can specify which countries are displayed in the Address Element with a list of two-letter country codes. If only one country is specified, the country field will not display. - blockPoBox By default, PO boxes are considered a valid address type. You can override this to invalidate PO Boxes. - contacts An array of objects that can be displayed as saved addresses in the Address Element. The first contact will be automatically selected. If using a CustomerSession, Address Element will ignore contacts and render saved billing addresses instead. - name The name of the contact. This might be a person, or a business name. - address The address of the contact. - line1 - line2 - city The name of a city, town, village, etc. - state The most coarse subdivision of a country. Depending on the country, this might correspond to a state, a province, an oblast, a prefecture, or something else along these lines. - postal_code The postal code or ZIP code, also known as PIN code in India. - country Two-letter country code, capitalized. Valid two-letter country codes are specified by the related setting alpha-2. - phone The phone number of the contact. The fields.phone option must be set to always if this property is specified. - defaultValues Provide the initial information that will be displayed in the Address Element. The form will render with empty fields if not provided. - name Provide the initial full name or organization name. - firstName Provide the initial first name. The display.name option must be set to split if this property is specified. - lastName Provide the initial last name. The display.name option must be set to split if this property is specified. - phone Provide the initial phone number value. The fields.phone option must be set to always if this property is specified. - address Provide the initial address details. - line1 - line2 - city - state - postal_code - country - fields By default, the Address Element will collect all the necessary information needed for an address. In some cases, it might be necessary to collect other types of information. You can specify other types of fields to render in the form with this option. - phone Specify always to enable phone number collection in the Address Element. Only collect phone numbers if you need them for the transaction. Default is auto. - validation By default, the Address Element will enforce preset validation for each field. You can customize the settings by using this option. - phone - required Specify always to make phone number a required field. The fields.phone option must be set to always if this property is specified. Default is auto. - display You can customize how certain fields are displayed. - name By default, the Address Element will display a full name field. Specify 'split' to display a first name field and a last name field. Specify 'organization' to display an organization field. ### Example title Create an Address Element