Smarty¶
Smarty address verification with USPS DPV/RDI validation, vacancy detection, CMRA indicator, and rooftop geocoding. US and US-territory addresses are validated against the Smarty US Street Address API; all other countries fall back to the Smarty International Street API. Choose it when you want USPS-grade normalization plus delivery-point intelligence (is this address real, deliverable, vacant, a mail drop?) feeding checkout validation and order verification metadata.
At a glance
| Extension id | smarty |
| Category | address_verification |
| Version | 0.1.0 |
| Provides | AddressValidationStrategy implementation (registered as smarty) |
| External account | Smarty — Auth-ID + Auth-Token |
What It Provides¶
- Address validation strategy —
SmartyStrategy, registered with the strategy resolver as anAddressValidationStrategyimplementation namedsmartywhen the extension activates (strategy familyaddress_validation). - USPS-grade normalization — the validated address comes back with the USPS delivery lines, city/state, ZIP+4 (the plus-4 code is appended when Smarty returns one), and county name.
- DPV confirmation — the USPS Delivery Point Validation match code is surfaced on the result (
Yconfirmed,Ssecondary missing,Ddefault match,Nnot confirmed).Y/S/Dcount as valid;Ymaps to deliverable andNto undeliverable. - RDI, vacancy, and CMRA — residential/commercial delivery indicator, USPS vacancy flag, and a Commercial Mail Receiving Agency (e.g. UPS Store) warning.
- Address type classification —
po_box,government, ormilitaryfrom the USPS record type, otherwiseresidential/commercialfrom RDI. - Rooftop geocoding — latitude/longitude from Smarty's metadata, stored on the order when checkout validation runs.
- International verification — non-US addresses go to the International Street API;
VerifiedandPartially Verifiedstatuses count as valid. - Nothing else — the package contributes no webhook endpoints, Temporal workflows, schedules, admin pages, GraphQL fields, or event subscriptions.
Setup¶
- Once installed (or dev-linked in development), the extension is discovered at startup; it can be enabled per channel from Settings > Extensions (per-channel activation via
ChannelExtension). - Create a Smarty account and get the Auth-ID and Auth-Token from your account dashboard (the manifest's install hint: "Create a Smarty account and configure Auth-ID and Auth-Token").
- Provide the credentials. The strategy factory reads
auth_id/auth_tokenfrom a config dict when one is supplied and otherwise falls back to theSMARTY_AUTH_ID/SMARTY_AUTH_TOKENenvironment variables — the strategy proxy registered at boot calls the factory with no config dict, so in the current code path the environment variables on the API service are what the validation call actually reads. - Select the provider for a channel by setting its Address Validation provider to
smarty— from Settings > Channels (edit a channel; saved through theupdateChannelmutation), or the Settings > Geocoding & Geolocation page (which drives theconfigureChannelGeocodingGraphQL mutation); both require thesettings.editpermission. - Checkout address validation only runs when the channel's Geocoding Enabled toggle is on — the
checkoutmutation readsgeocoding_enabledbefore validating the shipping/billing addresses. - Test with the
validateAddressGraphQL query, or the address-validation test panel on the Settings > Geocoding & Geolocation page ("Validate a structured address against configured providers").
Configuration Reference¶
| Key | Type | Required | Secret | Description |
|---|---|---|---|---|
auth_id |
string | Yes | No | Smarty Auth-ID from your account dashboard |
auth_token |
string | Yes | Yes | Smarty Auth-Token from your account dashboard |
license |
enum | No | No | Smarty subscription license type — us-core-cloud (US Core Cloud) or us-rooftop-geocoding-cloud (US Rooftop Geocoding Cloud); defaults to us-rooftop-geocoding-cloud |
Operational Notes¶
- Fail-open when unconfigured. With no Auth-ID/Auth-Token the strategy returns the input address unmodified and marked valid. The core
GeolocationServiceis also fail-open: if the provider raises, checkout validation is skipped rather than blocking the order. - Country routing.
US,PR,VI,GU,AS, andMPgo to the US Street Address API (us-street.api.smarty.com/street-address); every other country goes to the International Street API (international-street.api.smarty.com/verify). - Single-candidate matching. US requests are sent with
match=invalidandcandidates=1, so Smarty always returns at most one best candidate; an empty response yields ano_matcherror andundeliverable. - Warnings raised —
missing_secondary(DPVS: valid but missing apt/suite),default_match(DPVD: matched a default record),cmra(Commercial Mail Receiving Agency), andvacant(USPS vacancy flag). International misses raiseno_intl_match(error) orintl_unverified(warning). - Provider metadata on the result carries
dpv_footnotes,cmra,record_type,county_fips,carrier_route, andprecisionfor the US API, andverification_status/address_precisionfor the international API. - Checkout capture. When the
checkoutmutation validates addresses, the result's address type, RDI, DPV match code, and vacancy flag are stored as verification metadata for fraud review and the order snapshot; ablockvalidation mode on the channel rejects checkout on error-severity issues (default mode iswarn_public). - HTTP timeout is 10 seconds per API request.
- Alternative providers implementing the same strategy family: Google Maps Platform, Radar, and ShipStation Validate Address.