Address autocomplete & validation
Fewer typos at checkout via Maps Platform.
As a shopper types their address at checkout, real-world suggestions appear so they can pick the right one in a tap instead of typing it all out. That means fewer typos, fewer failed deliveries, and a faster checkout. Before the order is placed, the address is checked and tidied up (correct formatting, valid postal code) so what you ship to is what the customer meant.
How to turn it on
This feature uses Google Maps to look up and verify addresses, so it needs a Google Maps key connected to your environment. Until that key is in place, autocomplete suggestions stay empty and address checking falls back to a basic postal-code check. Google bills you directly for these lookups - GenMB does not add any markup. Just ask in chat to add address autocomplete to your checkout and we will wire it up.
For developers
// Autocomplete (per-session token recommended)
const sug = await window.genmb.address.autocomplete('221b baker', { country: 'GB' });
// Validate before placing the order
const v = await window.genmb.address.validate({
address: {
line1: '221B Baker St',
city: 'London',
postalCode: 'NW1 6XE',
country: 'GB',
},
});
// { valid: true, confidence: 0.95, normalized: {...}, location: {...} }Requires MAPS_API_KEY_SECRET_NAME in your environment. Without it, validate falls back to postal-code regex and autocomplete returns an empty list.