LokiCheckout_AddressAutocompleteFetchify

This integration is available in the paid plans for the Loki Checkout. Support for this integration is provided as is, because we are depending upon the original vendor as well. High priority support is only available on an hourly basis.
Address Completion
Integration
Other
Professional
Standard
PHP 8.2 - 8.5
Magento 2.4.6 - 2.4.9
CSP Yes
Unit Tests 49
Integration Tests 31
Functional Tests 16
PHPStan 5
Magento PHPCS 9
License OSL-3.0
Latest Release 0.0.2

Installation

Install this package via composer:

composer require loki-checkout/magento2-address-autocomplete-fetchify

Next, enable this module:

bin/magento module:enable LokiCheckout_AddressAutocompleteFetchify

Configuration

Configure the module under Stores > Configuration > Loki Checkout > Address Autocomplete via Fetchify:

  • Access Token: The access token provided by Fetchify (stored encrypted). Use the Validate Access Token button to check it.
  • Mode:
    • UK Postcode Lookup: Customers enter their postcode and house number (or building name). The street, city and county are then filled in automatically.
    • Address Finder: A search field. Customers type part of their address and pick it from a list.
    • Auto: The UK Postcode Lookup for the lookup countries and the Address Finder for all other countries.
  • API Mode: Live calls the Fetchify API. Test never calls Fetchify and uses fixed responses instead (see below).
  • UK Postcode Lookup Countries: The countries that use the UK Postcode Lookup. Default: United Kingdom, Isle of Man, Jersey and Guernsey (all of which use Royal Mail postcodes).
  • Address Finder Countries: The countries that show the Address Finder. Leave empty for all countries.
  • Save Company Name: Also save the company name of an address that is selected in the Address Finder (an existing company name is cleared when the selected address has none), or of the house number that is matched by the UK Postcode Lookup.
  • UK Postcode Lookup County Data: The county that the UK Postcode Lookup saves as region: none, former postal counties or traditional counties (default).
  • Address Finder Fills UK Counties: Save the county of UK addresses that are selected in the Address Finder (default Yes).
  • Address Finder Exclude Areas: A comma-separated list of Fetchify exclusion areas (like gbr_northern_ireland). In the mode Auto, gbr_isle_of_man and gbr_channel_islands are added automatically when the Isle of Man, Jersey or Guernsey are UK Postcode Lookup countries.
  • Address Finder Exclude PO Boxes: Exclude PO Box addresses from the Address Finder results.
  • Remove +4 from US ZIP Codes: Remove the plus-four codes from US ZIP codes in the Address Finder.
  • Address Finder Rate Limit: The maximum number of Address Finder searches per customer session per minute (default 60, 0 disables the limit). Further searches get the HTTP status 429.
  • Cache Lifetime: The number of seconds that successful Fetchify responses are cached (default 86400, 0 disables caching), so that repeated lookups do not use up credits. The cache is cleaned with a full cache flush. Responses are never cached in the API mode Test.
  • API Client Timeout: The number of seconds after which a call to Fetchify times out.

The general autocompletion settings (enable, toggle, region, house number additions) live under Address Autocompletion (module LokiCheckout_AddressAutocomplete).

When the Fetchify API fails (for instance, because the access token is invalid or the credits are used up), the error is logged and the customer can enter the address manually.

Differences with the original Fetchify module

This module covers the address features of the original Fetchify module (fetchify/module-fetchify), but calls the Fetchify API from the server instead of loading the Fetchify JavaScript widget. The following features of the original module are not included:

  • Phone Validation and Email Validation: These are separate Fetchify products.
  • Style settings (mode, ambient, accent), custom texts, search element ID and Use first address line for search: These only apply to the Fetchify JavaScript widget. Texts can be changed via translations.
  • Hide Address Fields: Use the autocompletion toggle of LokiCheckout_AddressAutocomplete instead.
  • Transliteration and the access token format check.
  • Forms outside the Loki Checkout (customer account, registration, multishipping, admin orders).

Testing

Fetchify offers test postcodes that are not charged: AA1 1AA, AA1 1AB, AA1 1AD and AA1 1AE (UK Postcode Lookup, fictitious data) and SL6 7RJ (Address Auto-Complete, real data).

In the API mode Test, these same responses are served from Client/Mock/fixtures/ without calling Fetchify. The Address Finder query SL6 returns a grouping that expands into the SL6 7RJ addresses. The fictitious Jersey postcode JE1 1AA only exists in this test mode. The access token invalid-access-token returns an "invalid access token" error. The Playwright tests use this mode by default. To run the Playwright tests against the live API instead, set the environment variables FETCHIFY_API_MODE=live and FETCHIFY_TOKEN. The live integration test (Test/Integration/Client/FetchifyClientFactoryTest::testLiveApiWithTestPostcodes) runs only when FETCHIFY_TOKEN is set.

The features of this module are described as user stories in the stories/ folder, each with references to the tests that cover them.

Current status

pipeline failed

Support

For getting support, create an Issue under the following project URL:

https://gitlab.yireo.com/loki-checkout/LokiCheckout_AddressAutocompleteFetchify.git

Configuration Options

The following options of this module can be configured via the Store Configuration:

Address Autocomplete via Fetchify > Enable
loki_checkout/address_autocomplete_fetchify/enable
Enable or disable the Fetchify integration
Address Autocomplete via Fetchify > Access Token
loki_checkout/address_autocomplete_fetchify/api_key
The access token as provided by Fetchify (format xxxxx-xxxxx-xxxxx-xxxxx)
Address Autocomplete via Fetchify > Validate Access Token
loki_checkout/address_autocomplete_fetchify/api_check
Address Autocomplete via Fetchify > API Mode
loki_checkout/address_autocomplete_fetchify/api_mode
In test mode, no calls are made to Fetchify. Instead, a fixed set of responses (for example for postcodes AA1 1AA and SL6 7RJ) is used.
Address Autocomplete via Fetchify > Mode
loki_checkout/address_autocomplete_fetchify/mode
UK Postcode Lookup fills the address of UK customers based on postcode and house number. The Address Finder adds a search field for the Address Finder countries.
Address Autocomplete via Fetchify > UK Postcode Lookup Countries
loki_checkout/address_autocomplete_fetchify/lookup_countries
The countries that use the UK Postcode Lookup (postcode and house number) in the modes UK Postcode Lookup and Auto. Fetchify covers the United Kingdom, the Isle of Man, Jersey and Guernsey.
Address Autocomplete via Fetchify > Address Finder Countries
loki_checkout/address_autocomplete_fetchify/finder_countries
The countries that show the Address Finder search field in the modes Address Finder and Auto. Leave empty to allow all countries.
Address Autocomplete via Fetchify > Save Company Name
loki_checkout/address_autocomplete_fetchify/save_company
When an address with a company name is selected in the Address Finder, also save the company name to the address
Address Autocomplete via Fetchify > Address Finder Rate Limit
loki_checkout/address_autocomplete_fetchify/finder_rate_limit
The maximum number of Address Finder searches per customer session per minute. Use 0 to disable this limit.
Address Autocomplete via Fetchify > Cache Lifetime
loki_checkout/address_autocomplete_fetchify/cache_lifetime
The number of seconds that Fetchify responses are cached, so that repeated searches do not use up credits. Use 0 to disable caching.
Address Autocomplete via Fetchify > API Client Timeout
loki_checkout/address_autocomplete_fetchify/api_client_timeout
A setting to determine after how many seconds an API client call times out.
Loki Components

The following LokiComponents are created or references in this module:

loki-checkout.billing.address.address_autocomplete_toggle loki-checkout.billing.address.country_id loki-checkout.billing.address.fetchify_finder loki-checkout.shipping.address.address_autocomplete_toggle loki-checkout.shipping.address.country_id loki-checkout.shipping.address.fetchify_finder
Module Dependencies

The following dependencies are declared in the module its `etc/module.xml` file:

LokiCheckout_AddressAutocomplete LokiCheckout_Core Loki_Base Loki_Components Loki_CssUtils Loki_FieldComponents Magento_AdminNotification Magento_Backend Magento_Catalog Magento_CatalogInventory Magento_Checkout Magento_CheckoutAgreements Magento_Cms Magento_Config Magento_Csp Magento_Customer Magento_Directory Magento_Eav Magento_Indexer Magento_MediaGalleryUiApi Magento_Newsletter Magento_Payment Magento_Quote Magento_Rule Magento_Sales Magento_SalesRule Magento_SalesSequence Magento_Shipping Magento_Store Magento_Tax Magento_Theme Magento_Ui Magento_User Magento_Variable Magento_Vault Magento_Widget Yireo_CspUtilities
Composer details
Magento module name
LokiCheckout_AddressAutocompleteFetchify
Composer name
loki-checkout/magento2-address-autocomplete-fetchify
Composer version
0.0.2
Default branch
main
Requirements
ext-json: *
ext-pcre: *
guzzlehttp/guzzle: ^7.10
guzzlehttp/promises: ^1.4 || ^2.0
guzzlehttp/psr7: ^2.0
loki-checkout/magento2-address-auto-complete: ^1.0.3
loki-checkout/magento2-core: ^2.7
loki/magento2-components: ^2.8.3
loki/magento2-css-utils: ^1.1
loki/magento2-field-components: ^2.2
magento/framework: ^103.0
magento/module-backend: ^102.0
magento/module-checkout: ^100.4
magento/module-config: ^101.2
magento/module-directory: ^100.4
magento/module-quote: ^101.2
magento/module-store: ^101.1
php: >=8.2 <8.6
psr/http-message: ^1.0 || ^2.0
psr/log: ^1.0 || ^2.0 || ^3.0
Releases
0.0.2 11 November 2026
0.0.1 11 November 2026
Changelog

[0.0.2] - 09 November 2026

Fixed

  • Document features as user stories and describe new settings
  • Cover billing finder, Jersey lookup, finder countries, admin validation and accessibility

Added

  • Add en_US and nl_NL translations
  • Make the Address Finder an accessible combobox with status messages
  • Optionally save the company name of the selected address
  • Rate limit searches per session and prevent HTTP caching
  • Cache successful Fetchify responses
  • Make the UK Postcode Lookup and Address Finder countries configurable

[0.0.1] - 30 October 2026

Added

  • Initial Fetchify UK Postcode Lookup and Address Finder

Last modified: September 18, 2026