USPS API Integration for eCommerce, Shipping, and Fulfilment Platforms.
We integrate the USPS REST API into WooCommerce, Shopify, custom eCommerce platforms, and internal fulfilment systems. Address validation, real-time rate calculation, label generation, package tracking, and legacy Web Tools migration to the new USPS API standard.
USPS Web Tools APIs were retired January 25, 2026
If your store or fulfilment system still uses the legacy USPS XML-based Web Tools API, it is already experiencing failures or degraded service. USPS has fully shut down the old platform and migrated to a new OAuth 2.0 REST API. If you need to migrate off Web Tools, we handle the full transition including endpoint mapping, authentication changes, response schema updates, and testing.
USPS API integration built into your existing shipping workflow.
We integrate the full suite of USPS REST APIs into your WooCommerce store, Shopify app, custom eCommerce platform, or internal fulfilment system. Every integration is production-ready: OAuth 2.0 authentication, error handling, retry logic, sandbox testing, and webhook processing all included.
We also help businesses migrate from the now-retired USPS Web Tools XML API to the new REST API, including remapping endpoints, updating authentication from USERID-based to OAuth 2.0, and handling the schema differences between the old and new response formats.
Migrating from the retired USPS Web Tools XML API.
The old API and the new API differ significantly in authentication, request format, and response structure. A migration is not a simple swap of endpoint URLs. It requires rebuilding the integration layer.
Six USPS API capabilities we build into your system.
Each is built as a production-grade integration with OAuth 2.0 token management, error handling, retry logic, and logging.
Address Validation and Standardisation
Validate and standardise US addresses at checkout using the USPS Addresses API. Corrects street abbreviations, fills in missing ZIP+4 codes, and flags undeliverable addresses before the order is placed. Reduces failed deliveries and return shipping costs from address errors.
Real-time Rate Calculation
Live USPS postage rates displayed at checkout based on the buyer's ZIP code, package weight, dimensions, and the service classes you offer. Priority Mail, Priority Mail Express, USPS Ground Advantage, Media Mail, and flat rate options calculated and presented accurately in real time.
Label Generation
Generate domestic and international USPS shipping labels with Intelligent Mail Package Barcodes (IMpb) via the Domestic Labels and International Labels APIs. Labels returned in PDF, TIFF, or ZPL format for thermal or standard printing. Postage paid, manifesting handled automatically.
Package Tracking
Real-time tracking status and scan event history pulled via the USPS Tracking API and displayed within your platform. Tracking webhook integration receives push notifications from USPS when package status changes, updating your system and triggering customer notifications without polling.
Returns Label Creation
Prepaid USPS returns labels generated via the Returns Labels API and included in outbound shipments or sent to customers on request. Address validation at time of creation, destination address collected from the returns API request, and full tracking on the return shipment.
Postage Adjustment Reconciliation
Retrieve shipping adjustment data via the Adjustments API when USPS identifies weight, dimension, or zone discrepancies on shipped packages. Surface adjustment detail in your order management system for finance reconciliation and to identify repeated measurement errors in your fulfilment process.
USPS integrated into every platform we work with.
Each platform has a different architecture for shipping rate display, label generation, and order fulfilment. We build USPS integrations that fit correctly into each one.
WooCommerce USPS Integration
Shopify USPS Integration
Custom Platform Integration
Fulfilment and Warehouse Integration
From USPS account setup to live integration in five stages.
USPS API setup involves account registration, CRID and MID configuration, and OAuth credentials that must be obtained before development can begin. We handle this process alongside the build.
Requirements and scope
Map which USPS API capabilities you need, which platforms they integrate into, and any custom business logic for rate selection, label format, or tracking notification triggers.
USPS account and credential setup
Register on the USPS Developer Portal, obtain Consumer Key and Consumer Secret, confirm CRID and MID are configured, and request Tracking API access where needed. We guide you through every step.
Sandbox build and testing
Full integration built and tested in the USPS sandbox environment. Address validation, rate calculation, label generation, and tracking all tested end-to-end before live credentials are used.
Production deployment
Switch to live USPS credentials, verify OAuth token refresh cycle, test with real addresses and shipping scenarios, and confirm labels are accepted and scanned correctly by USPS.
Documentation and handover
Full documentation of the integration: credential locations, OAuth flow, error codes, retry behaviour, and a runbook for common failure scenarios your team may encounter in production.
How we build and maintain USPS integrations.
Brands Consulted
Projects Delivered
Years of Expertise
Transactions Processed
Common questions about USPS API integration.
Have a specific USPS integration requirement? Send it through the contact form and we will respond with a direct technical answer.
Talk to usThe USPS Web Tools XML API was fully retired on January 25, 2026, meaning any calls to it are failing or returning degraded responses. Migration to the new USPS REST API is required immediately. The new API uses OAuth 2.0 instead of the old USERID parameter, JSON instead of XML, and separate versioned endpoints per resource. You cannot simply update the endpoint URL: the authentication method, request format, and response parsing all need to be rebuilt. We handle the full migration: mapping your existing XML calls to the equivalent REST endpoints, rebuilding the authentication layer, updating response parsers, and testing end-to-end in the USPS sandbox before going live.
You need a Consumer Key and Consumer Secret obtained by registering an application on the USPS Developer Portal at developers.usps.com. For label generation and tracking, you also need a valid Customer Registration ID (CRID) and Mailer ID (MID) registered through the USPS Business Customer Gateway. The CRID and MID are separate from the API credentials and are required for OAuth token generation to access the Tracking API and generate labels with an embedded MID in the barcode. If you are migrating from Web Tools, your existing MID should transfer, but the CRID registration may need updating. We walk through this setup with you as part of the integration engagement.
Yes. We build a custom WooCommerce shipping rate plugin that calls the USPS Prices API at checkout and returns live rates based on the buyer's destination ZIP code, the order weight, and the package dimensions you configure. You control which USPS service classes to display (Priority Mail, Ground Advantage, Media Mail, etc.) and can apply markup rules or flat handling fees per service. Rates update in real time as the buyer changes their address. We test the integration against a range of weights, dimensions, and ZIP codes before deployment to confirm accurate rate returns.
The USPS Tracking Webhook pushes scan event updates to your server as they happen rather than requiring your system to repeatedly call the Tracking API to check for status changes. This means your order management system learns about delivery or exception events within seconds of them occurring at USPS, rather than on your polling interval. It also eliminates the API call volume and associated rate limit risk of polling hundreds or thousands of tracking numbers regularly. We build the webhook receiver endpoint on your server, handle USPS signature verification, parse the event payload, and trigger the appropriate actions in your system such as updating order status, sending customer notifications, or flagging exceptions for your operations team.
The USPS Domestic Labels API returns labels in PDF, TIFF, SVG, JPG, ZPL203DPI, and ZPL300DPI formats. PDF is the most universal and works with any printer including standard inkjet and laser printers. ZPL (Zebra Programming Language) is the format used by thermal label printers and produces the sharpest barcode output at scale. If you have thermal printers in your fulfilment operation, use ZPL at the resolution matching your printer's DPI setting (most Zebra printers are 203dpi or 300dpi). We integrate whichever format your print workflow requires, and can build format selection logic if you have a mix of printer types across your fulfilment locations.
Yes. We build multi-carrier rate comparison integrations where USPS rates appear alongside UPS, FedEx, DHL, or other carriers at checkout or in your fulfilment dashboard. The buyer sees a unified list of shipping options and their actual costs, and can choose based on price or speed. For high-volume operations, we can also build intelligent carrier selection logic that automatically routes each order to the lowest-cost carrier meeting the delivery speed requirement, without any manual carrier selection from the fulfilment team. This is particularly effective for businesses shipping a high proportion of packages that qualify for USPS flat rate or Ground Advantage pricing.