IPA – Indian Pincode Autofill
IPA – Indian Pincode Autofill
Description
IPA – Indian Pincode Autofill streamlines the WooCommerce checkout process for Indian e-commerce stores. When a customer enters a valid 6-digit Indian PIN code at checkout or My Account address form, the plugin instantly detects the corresponding city, district, and state, and autofills the respective fields without disrupting typing flow.
By eliminating typos in city and state names and ensuring exact postal alignment, this plugin helps Indian merchants significantly reduce Return to Origin (RTO) rates on Cash on Delivery (COD) and prepaid orders while boosting checkout conversion.
Why Choose IPA?
- Lightning-Fast Autofill: Detects location within milliseconds as soon as 6 digits are typed.
- Intelligent Debouncing (500ms): Eliminates duplicate requests while typing.
- High-Performance Transients Caching: Caches verified PIN codes in WordPress Transients for 30 days to ensure instantaneous lookup and minimal API load.
- Country-Specific Checkout Ordering: Intelligently reorders checkout fields for India (PIN Code -> City -> District -> State) using WooCommerce’s native locale filter, leaving all other countries 100% untouched.
- Dedicated District Field Support: Optionally display a dedicated District checkout field with toggleable autofill and customer edit/lock controls.
- Configurable City Value Source: Choose between “District as City” (courier & logistics standard) or “Smart Town Mode” (filters out bazaar and neighborhood street names).
- Zero Impact on International Orders: The plugin operates strictly when the selected country is India (
IN). For US, UK, EU, or any non-Indian checkout, the plugin remains completely inactive. - Seamless Compatibility: Works with standard WooCommerce checkout, WooCommerce Gutenberg Blocks, AJAX fragments refresh, One Page Checkout plugins, and modern themes.
- Dedicated Admin Settings: Separate admin menu with toggle switches for enabling/disabling the plugin, toggling city, district, and state autofill, locking fields as readonly, or reordering checkout fields.
- Live PIN Code Tester: Test any PIN code directly in the WordPress admin to inspect live API results, cached responses, and state codes.
- Cash on Delivery (COD) Restriction & RTO Protection: Reduce courier RTO losses by restricting COD for high-risk postal codes (blacklist or whitelist mode) with smart range syntax (e.g.
302001-302020) and min/max order total safeguards. - Reactive Dynamic Checkout Updates: Automatically unsets and removes the Cash on Delivery payment option in real-time as soon as a customer enters a restricted PIN code at checkout.
- 100% HPOS Ready: Fully compatible with WooCommerce High-Performance Order Storage (HPOS).
- Accessible & Secure: Built using WordPress Coding Standards (WPCS), strict nonces, input sanitization, and output escaping.
External services
This plugin relies on a 3rd-party external API service to verify and resolve Indian PIN codes into geographical locations:
- Service Name: Postal Pincode API
- Provider URL: https://api.postalpincode.in/
- Service Purpose: Resolves a 6-digit Indian postal code (PIN) into its respective District (City) and State name.
- Data Transmitted: Only the 6-digit numeric PIN code entered by the user (e.g.
302001). No personal information, names, email addresses, street addresses, phone numbers, or IP addresses are ever transmitted or stored remotely. - When Data is Transmitted: An outbound HTTPS GET request is made exclusively when a customer enters exactly 6 digits into the billing or shipping postcode field and the selected country is India (
IN). - Terms of Service: https://api.postalpincode.in/
- Privacy Policy: https://api.postalpincode.in/
Installation
- Upload the
ipa-indian-pincode-autofillfolder to the/wp-content/plugins/directory, or install the plugin directly through the WordPress Plugins screen. - Activate the plugin through the Plugins screen in WordPress.
- Ensure WooCommerce is installed and activated.
- Navigate to your checkout page, select India as the country, and type any valid 6-digit PIN code (e.g.
110001or400001). City and State will autofill automatically!
Screenshots

Instant City and State autofill upon entering a 6-digit Indian PIN code at WooCommerce checkout.

Dedicated Indian District checkout field with reordering and readonly lock controls.

Modern Admin Settings Dashboard with tabbed navigation and diagnostic metrics.

Live PIN code verification and transient cache inspector tool.

WooCommerce Gutenberg Checkout Blocks real-time address synchronization.


Faq
No. The plugin has zero effect on non-Indian checkouts. If a customer selects any country other than India (such as the United States, United Kingdom, Australia, Canada, etc.), the plugin will not send requests or modify any checkout fields.
The plugin validates the response from the postal database. If an invalid or unallocated PIN code is entered, an inline notification appears under the PIN code field, allowing the customer to correct it or enter their address manually without intrusive alert popups.
Yes! The plugin explicitly declares compatibility with WooCommerce High-Performance Order Storage (HPOS) and follows modern WooCommerce architecture standards.
Not at all. JavaScript and CSS assets are enqueued strictly on checkout and cart pages. All network requests use 500ms debouncing and 30-day transient caching.
Reviews
Changelog
1.1.0
- Added: Multi-tier fallback architecture (India Post -> Cloudflare Edge Zippopotam -> 100% Offline Local Sorting Database).
- Added: Cash on Delivery (COD) Restriction & RTO Protection manager with blacklist/whitelist modes, range support (e.g. 302001-302020), and min/max order total safeguards.
- Added: Reactive checkout payment update dynamically hiding or restoring COD via update_checkout trigger.
- Added: Offline Local PIN Code database (
IPAA_Local_DB) covering all Indian postal sorting districts with 0ms response. - Added: Live Postal Gateway Ping & Latency Inspector tool in Admin System Diagnostics.
- Added: Product Page Delivery & COD Checker widget and
[ipa_pincode_checker]shortcode. - Added: WooCommerce Cart Page shipping calculator instant PIN code autofill.
- Added: My Account Edit Address persistence for billing and shipping district user meta.
- Added: Developer filter
ipaa_location_datato filter returned location details before response. - Added: WooCommerce Native Logger integration (
wc_get_logger()) under WooCommerce > Status > Logs. - Improved: Safe field unlock on checkout to prevent wiping user input on network timeouts.
- Updated: Tested up to WooCommerce 11.2 and WordPress 7.1.
1.0.0
- Initial release.
- Automated Indian PIN code detection and autofill for City, District, and State at WooCommerce checkout.
- Support for dedicated District checkout field with independent autofill and lock controls.
- Configurable “City Value Source” setting (“District as City” or “Smart Town Mode”).
- Dedicated admin dashboard with tabbed navigation, live PIN code tester, and one-click AJAX cache purge.
- 30-day transient caching layer for instantaneous lookups.
- Full WooCommerce High-Performance Order Storage (HPOS) compatibility.
- Compatible with standard WooCommerce Classic checkout and WooCommerce Blocks checkout.