Magento 2 USPS Shipping Extension – Real-Time USPS Rates via REST API v3
- Community
-
Real-time USPS shipping rates at Magento 2 checkout using USPS REST API v3.
-
Secure OAuth2 authentication replacing legacy USPS Web Tools integrations.
-
Built-in rate caching improves checkout speed and reduces API calls.
-
Supports Ground Advantage, Priority Mail, Express, and First-Class services.
-
Includes admin Test Connection and Test Rate tools plus optional debug logging
The Problem
- ✖ USPS legacy Web Tools API is being retired, risking shipping disruptions
- ✖ Default Magento USPS integration does not support modern OAuth REST APIs
- ✖ Inaccurate or missing real-time shipping rates at checkout
- ✖ Limited control over shipping methods, pricing adjustments, and performance
The Solution
Toweringmedia USPS Shipping Extension replaces outdated Web Tools with a secure OAuth 2.0 REST API integration, delivering accurate real-time USPS rates in cart and checkout, along with flexible configuration, performance optimization, and full control over your shipping experience.
How It works
See It In Action
✔ Product updates and support for 12 months
Magento 2 USPS REST API Shipping Extension (OAuth + API v3)
Migrate USPS shipping to the OAuth-secured REST API platform and display real-time USPS rates in cart and checkout. This extension integrates with USPS REST API v3 using OAuth2, with caching and checkout guardrails designed for production traffic.
Short description
- Real-time USPS checkout rates via USPS REST API v3 + OAuth2.
- Built-in rate caching improves checkout speed and reduces API volume on common routes.
- Configurable method filtering, handling fee, markup controls, and optional top-N method output.
- Volume-ready with shared package dimensions and dimension modes (product_attributes, auto_dim_weight, hybrid_fallback).
- Admin test tools + optional debug logging for faster setup and troubleshooting.
Important: USPS Web Tools shutdown (migration)
Got a USPS letter about Web Tools? You likely need to migrate. USPS states the legacy Web Tools platform was retired effective January 25, 2026, and availability may be degraded or interrupted at any time.
If your store uses older services like RateV4, IntlRateV2, or TrackV2, moving to the OAuth + REST API platform helps avoid shipping-rate disruption. This extension is built specifically to migrate Magento 2 stores to USPS’s modern API model.
How it works
Rates are calculated from your configured Magento Shipping Origin to the customer’s destination using total cart weight and resolved package dimensions. To protect performance and quota, the extension supports rate caching (configurable TTL) and checkout guardrails to reduce repeated calls during address entry.
Merchant controls
- Allowed USPS services and optional top-N output to keep checkout clean.
- Handling fee and markup controls for margin-safe shipping.
- Rate caching settings for faster checkout under load.
- Admin test tools for connection validation and sample rates.
Shared dimensions (suite-wide)
Keep one set of product dimensions across all Toweringmedia carriers using shared attributes:
- tm_pkg_length
- tm_pkg_width
- tm_pkg_height
Dimension modes: product_attributes, auto_dim_weight, hybrid_fallback (recommended).
Works with the Toweringmedia Magento 2 Carrier Suite
For a consistent multi-carrier setup (shared dimensions, similar configuration patterns), pair USPS with:
Need multi-origin (dropship / multi-warehouse) USPS rating?
This base USPS module is intentionally single-origin for stability and predictable checkout behavior. If you ship from multiple vendor warehouses, extend your setup with:
Magento 2 Multi-Vendor Dropship Shipping System (UPS/USPS/FedEx Bundle)
Adds vendor-specific origins, per-origin carrier rating, and combined checkout totals while keeping the base carrier clean and reusable.
Which carrier should I enable?
| Carrier | Best for | Strengths | Notes |
|---|---|---|---|
| UPS REST API | Domestic + negotiated pricing | Service control, negotiated rates, reliable quoting | Great “primary” carrier for many stores |
| USPS REST API | Lightweight parcels + cost-sensitive shipping | Caching, top-N output, fast common routes | Web Tools migration path |
| FedEx REST API | Express + international service mix | Account vs list rating, pickup type, transit-time options | Strong for speed-focused delivery offerings |
Who this extension is for
- Stores migrating off USPS Web Tools to the modern OAuth + REST platform.
- Merchants who need real-time USPS rates at checkout (not flat estimates).
- Stores that benefit from rate caching to keep checkout fast under load.
- Catalogs that need consistent dimensions across USPS/UPS/FedEx.
- Teams that want built-in admin test tools for faster setup.
FAQ
Is this a replacement for USPS Web Tools integrations?
Yes — it’s built to migrate Magento 2 stores to USPS’s OAuth + REST API platform.
Will caching reduce repeated calls?
Yes — rate caching can significantly reduce repeat requests on common routes and improve checkout responsiveness.
Can I use this with UPS and FedEx?
Yes — the carrier suite shares dimension attributes and consistent configuration patterns.
What if I ship from multiple warehouses/vendors?
Add the Multi-Vendor Dropship bundle for per-origin rating and combined totals.
-
Real-time USPS shipping rates at Magento 2 checkout using USPS REST API v3.
-
Secure OAuth2 authentication replacing legacy USPS Web Tools integrations.
-
Built-in rate caching improves checkout speed and reduces API calls.
-
Supports Ground Advantage, Priority Mail, Express, and First-Class services.
-
Includes admin Test Connection and Test Rate tools plus optional debug logging
📘 Documentation
Follow our comprehensive guide to quickly set up and configure the USPS OAuth Shipping Extension for Magento 2. From API credentials to real-time rate validation, everything is covered step-by-step.
- Step-by-step installation and module setup
- How to create USPS developer account and API credentials
- OAuth 2.0 configuration (Consumer Key & Secret)
- Shipping method setup and service configuration
- Test Connection and Sample Rate validation
- Rate caching and performance configuration
- Troubleshooting and debug logging
💬 Support
Our Magento experts are ready to help you migrate from USPS Web Tools and ensure your REST API integration works flawlessly.
- Assistance with USPS API setup and OAuth configuration
- Help migrating from legacy Web Tools to REST API
- Shipping rate troubleshooting and checkout validation
- Configuration guidance for services, fees, and rules
- Compatibility support with Hyvä, Luma, and custom themes
- Ongoing updates and Magento version compatibility
USPS has retired the legacy Web Tools API, which means older Magento integrations may stop working or provide unreliable rates. This extension ensures your store is fully compatible with the new USPS OAuth-secured REST API.
You need to create a USPS developer account and register an application to obtain your Consumer Key and Consumer Secret. These credentials are used for OAuth 2.0 authentication with the USPS REST API.
Yes, the extension includes Test Connection and Test Sample Rate features in Magento Admin, allowing you to verify authentication and confirm that shipping rates are being returned correctly.
Yes, the extension fetches real-time USPS rates based on customer location, order weight, and selected services, ensuring accurate pricing in cart and checkout.
Yes, you can enable or disable specific USPS services, apply handling fees or markups, and control how shipping options are presented to customers.
Yes, built-in rate caching reduces repeated API calls, improving speed and ensuring a smoother checkout experience for customers.
- Magento Version: Compatible with Magento 2.4.x (Open Source & Adobe Commerce)
- PHP Version: PHP 7.4, 8.1, 8.2, 8.3 compatible
- Framework: Built using Magento 2 native architecture (no core overrides)
- Installation Type: Composer / Manual installation supported
- Module Dependency: No additional dependencies required
- API Type: USPS REST API v3
- Authentication: OAuth 2.0 (Client Credentials flow)
- Credentials Required: Consumer Key & Consumer Secret
- Legacy Support: Replaces deprecated USPS Web Tools API
- Connection Mode: Secure HTTPS API communication
- Rate Type: Real-time USPS shipping rates
- Rate Display: Cart page & Checkout page
- Supported Services: Ground Advantage, Priority Mail, Express, and more
- Rate Adjustment: Handling fees / markup supported
- Service Control: Enable/disable specific USPS services
- Rate Caching: Built-in caching for improved performance
- Package Handling: Supports product-based, default, and hybrid dimension modes
- Multi-Store Support: Yes
- Store Scope Configuration: Website / Store View level
- Top Methods Display: Optional limit for showing best shipping options
- Admin Configuration Path: Stores → Configuration → Sales → Delivery Methods → USPS REST API
- Test Connection: Validate USPS API authentication
- Sample Rate Test: Verify shipping rate response
- Debug Logging: Optional logging for troubleshooting
- Performance Impact: Minimal (optimized API calls with caching)