Magento 2 USPS Shipping Extension – Real-Time USPS Rates via REST API v3
Live USPS rates via REST API v3
- OAuth2 REST USPS API v3 credentials
- Rate Caching Configurable TTL cache
- Method Control Allowed services and top-N
- Admin Test Tools Connection and sample rates
Live USPS rates via REST v3
USPS legacy Web Tools is being retired and default Magento USPS lacks modern OAuth REST. This extension quotes real-time USPS rates with OAuth2 REST API v3, caching, and checkout controls.
- Real-time rates via USPS REST API v3
- OAuth2 Consumer Key and Secret credentials
- Configurable rate cache to cut repeat API calls
- Service filters, fees, markup, and top-N display
Built for your store
Built for Magento 2.4.x Open Source and Adobe Commerce with PHP 8.1–8.3. Single-origin quoting; configure under USPS REST API (Toweringmedia).
- Magento 2.4.x Open Source and Adobe Commerce
- Sandbox or live mode in carrier settings
- Admin Test Connection and Test Rate tools
- Commercial or retail USPS price type support
How It works
Real-Time USPS Shipping Rates for Magento 2 with REST API v3
Offer accurate USPS shipping rates directly in your Magento 2 cart and checkout with the Towering Media USPS REST API Shipping Extension. Built around USPS REST API v3 and OAuth 2.0 authentication, the module connects your store to modern USPS rating services.
Instead of maintaining fixed shipping prices, your store can request live USPS rates using the shipping origin, customer destination, package weight, and resolved package dimensions. Customers can select from eligible USPS services before completing their purchase.
The extension also includes service filtering, shipping price adjustments, rate caching, automatic handling of overweight shipments, and administrative testing tools.
Live USPS Shipping Rates
USPS REST API v3 + OAuth 2.0
Illustrative checkout methods. Actual availability and prices depend on USPS responses.
Show Customers Available USPS Shipping Services at Checkout
Give shoppers the ability to choose USPS shipping services based on their delivery destination and order details. The module requests eligible rates through the USPS REST API and presents the available methods in Magento's shipping selection.
Merchants can configure the USPS services they want to offer, select Commercial or Retail rate requests, and limit the number of displayed shipping methods.
- ✓ Real-time USPS rate requests for cart and checkout
- ✓ USPS Ground Advantage and eligible Priority Mail services
- ✓ Configurable Commercial or Retail pricing type
- ✓ Allow or restrict specific USPS shipping methods
- ✓ Optional limit on the number of returned methods
USPS shipping rates calculated from shipment and destination details
Secure OAuth 2.0 authentication using USPS developer application credentials
Connect Magento 2 to the Modern USPS REST API v3
The USPS REST API Shipping Extension uses OAuth 2.0 authentication with a Consumer Key and Consumer Secret from your USPS developer application.
This integration is designed for merchants moving away from legacy USPS Web Tools, which USPS retired in January 2026. The module provides an alternative based on the current USPS REST API architecture.
Administrators can configure the API environment, enter the required credentials, and validate the connection using built-in testing tools.
- ✓ USPS REST API v3 rate integration
- ✓ Consumer Key and Consumer Secret authentication
- ✓ Sandbox and production environment configuration
- ✓ Built-in connection and sample-rate testing
Reduce Repeated USPS API Calls and Control Shipping Charges
Shipping estimates may be recalculated repeatedly as shoppers update their carts or enter checkout information. The module includes configurable rate caching to reduce unnecessary duplicate requests for matching shipment calculations.
Merchants can also adjust USPS shipping charges using configurable handling fees and price markup settings. These options provide flexibility when shipping prices need to include additional operational costs.
- ✓ Configurable USPS rate caching
- ✓ Adjustable cache lifetime
- ✓ Handling fee configuration
- ✓ Shipping price markup controls
- ✓ Configurable shipping method visibility
Rate caching, configurable price adjustments, and fewer duplicate API requests
Automatic package splitting for overweight rate calculations
Calculate USPS Shipping Rates for Heavy Orders
Large orders can exceed the maximum weight supported for an individual USPS package. The extension includes package splitting logic for shipping rate calculations when total shipment weight exceeds the configured threshold.
The module divides an overweight shipment into equal-weight packages, requests applicable USPS service rates for each package, and aggregates matching service charges into a combined checkout total.
Administrators can also configure default package weight and dimensions used by the rating process.
- ✓ Configurable maximum package weight
- ✓ Automatic splitting of overweight rate requests
- ✓ Aggregated USPS shipping service totals
- ✓ Default package weight and dimension settings
Package splitting applies to rate calculation. It does not create physical packing instructions or generate USPS shipping labels.
Configure, Test, and Manage USPS Shipping from Magento Admin
Manage USPS carrier settings directly from the Magento administration panel. Configure your API credentials, shipping service preferences, rate adjustments, package settings, and caching behavior without editing application code.
The extension includes connection testing and sample-rate calculation tools to help administrators investigate configuration problems before making the shipping method available to customers.
Find the extension under Stores → Configuration → Sales → Delivery Methods → USPS REST API (Toweringmedia) .
- ✓ USPS OAuth credential configuration
- ✓ Test Connection and Test Rate Calculation
- ✓ Shipping method selection and price settings
- ✓ Configurable debugging and diagnostic logging
Centralized USPS configuration and rate testing in Magento Admin
Compatibility & Technical Specifications
Magento Version
Magento Open Source and Adobe Commerce 2.4.x
PHP
PHP 8.1, 8.2, 8.3
USPS API
USPS REST API v3 with OAuth 2.0
Magento Module
Toweringmedia_USPSRestApi
Module Dependency
Toweringmedia Base
Shipping Origin
Single configured Magento shipping origin
Works Great With
Multi-Vendor Dropship
Manage vendor shipping origins and multi-vendor fulfillment workflows with the compatible USPS add-on.
View Multi-Vendor DropshipUSPS Multi-Vendor Add-on
Extend USPS rating to vendor-specific shipping origins when used with the required Multi-Vendor modules.
Sold separately
USPS REST API User Guide
Review installation, OAuth setup, carrier configuration, and shipping rate troubleshooting.
Read the Setup GuideKey Features
Standalone USPS REST rates for Magento 2 cart and checkout, with caching and merchant controls.
- Live checkout rates Quotes from Magento shipping origin to the shopper destination.
- OAuth2 credentials Consumer Key and Secret with optional sandbox mode.
- Intelligent rate cache Cache rates with a configurable lifetime to cut repeat API calls.
- Services and top-N Allow specific USPS methods and optionally limit how many show.
- Fees and markup Add a flat handling fee and/or percentage markup per rate.
- Weight-based packages Estimates dimensions from weight; splits overweight carts by max package weight.
- Admin rate tests Test Connection and Test Rate Calculation before go-live.
- Debug logging Optional debug logs under var/log for troubleshooting.
Demo
Docs & Support
📘 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
Reviews
Frequently Asked Questions
What does the Magento 2 USPS Shipping Extension do?
The Towering Media Magento 2 USPS Shipping Extension retrieves real-time USPS shipping rates in the shopping cart and checkout using USPS REST API v3 and OAuth 2.0 authentication. It supports configurable USPS services, shipping price adjustments, rate caching, and administrative testing tools.
Does this extension replace the legacy USPS Web Tools API?
Yes. The extension is designed to replace legacy USPS Web Tools rate integrations with the OAuth-secured USPS REST API v3. USPS retired its legacy Web Tools platform on January 25, 2026, making migration important for stores using older USPS shipping integrations.
Where do I configure USPS OAuth credentials in Magento 2?
Go to Stores → Configuration → Sales → Delivery Methods → USPS REST API (Toweringmedia). Enter the Consumer Key and Consumer Secret obtained from your USPS developer application, select the appropriate environment, and use Test Connection and Test Rate Calculation to validate the integration.
Which USPS shipping services can customers select at checkout?
The extension supports eligible USPS services such as USPS Ground Advantage, Priority Mail, and Priority Mail Express. Available methods depend on the shipment details, USPS API response, account eligibility, and the services enabled in Magento Admin.
Does the USPS REST API extension support real-time shipping rates?
Yes. The extension requests USPS shipping prices based on the configured Magento shipping origin, customer destination, shipment weight, and resolved package dimensions. Eligible services and their calculated charges are displayed in cart shipping estimates and checkout.
How does USPS shipping rate caching work in Magento 2?
The extension includes configurable rate caching with an adjustable cache lifetime. Matching shipping calculations can reuse cached rate responses, reducing repetitive USPS API requests. Actual performance benefits depend on checkout activity, cache settings, and API response conditions.
Can I add handling fees or limit USPS shipping methods?
Yes. Magento administrators can configure allowed USPS services, handling charges, percentage markups, and an optional Top-N limit for the number of methods displayed. The module also supports Commercial and Retail price type settings.
How does the extension calculate shipping for heavy orders?
When an order exceeds the configured Maximum Package Weight, the extension divides the shipment into equal-weight packages for USPS rate calculation. It then combines charges for matching USPS services into the checkout shipping total. This is rate calculation logic, not automatic physical packing or shipping-label creation.
Does the standalone USPS extension support multi-vendor shipping?
No. The standalone USPS REST API Shipping Extension calculates rates from one configured Magento shipping origin. Vendor-specific origins and combined multi-vendor shipping require the separate Towering Media Multi-Vendor Dropship system and its compatible USPS integration.
What are the requirements for the Magento 2 USPS REST API Shipping Extension?
The published product specifications list Magento 2.4.x Open Source and Adobe Commerce compatibility, PHP 8.1–8.3, the Toweringmedia Base module, and valid USPS REST API credentials. Merchants should configure their shipping origin and validate real checkout scenarios before enabling the method in production.
Technical Specifications
- Magento Version: Compatible with Magento 2.4.x (Open Source & Adobe Commerce)
- PHP Version: PHP 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: Requires toweringmedia/module-base
- 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: Estimates dimensions from package weight; admin defaults when weight is 0
- 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)
Compatible with your Magento 2 store
Built for Magento 2.4.x (Open Source and Adobe Commerce) with PHP 8.1, 8.2, and 8.3. Install as toweringmedia/module-usps-rest-api (requires toweringmedia/module-base). Configure under Stores → Configuration → Sales → Delivery Methods → USPS REST API (Toweringmedia). Single-origin quoting; multi-warehouse setups pair with the Multi-Vendor Dropship bundle.
-
Magento 2.4.x
Open Source & Adobe Commerce
Updates & supportKeep your store running smoothly