shippingAddress. The section accepts every option the standalone Shipping address element accepts.
Enable the section
Configure fields
Default country
SetdefaultCountry to pre-select a country instead of inferring from the shopper’s locale:
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Configure the shipping address section inside Checkout.
shippingAddress. The section accepts every option the standalone Shipping address element accepts.
overflow.checkout({
paymentMethods: ['card'],
shippingAddress: {},
});
overflow.checkout({
paymentMethods: ['card'],
shippingAddress: {
header: { text: 'Shipping address' },
fields: {
fullName: {},
country: { supportedCountries: ['US', 'CA', 'GB'] },
line2: { hidden: true },
},
},
});
defaultCountry to pre-select a country instead of inferring from the shopper’s locale:
overflow.checkout({
paymentMethods: ['card'],
shippingAddress: {
defaultCountry: 'US',
},
});
overflow.checkout({
paymentMethods: ['card'],
shippingAddress: {
addressAutocomplete: {
provider: 'googlePlaces',
apiKey: 'AIza...',
},
},
});
checkout.on('onSubmit', ({ value }) => {
// value.shippingAddress: { line1, line2?, city, state, zip, country, ... }
});
Was this page helpful?