USPS Integration Services

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.

Address Validation Rate Calculation Label Generation Package Tracking WooCommerce Web Tools Migration

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.

What We Do

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.

Address validation and ZIP+4 standardisation
Real-time postage calculation by service class and dimensions
Domestic and international label generation (PDF, ZPL, TIFF)
Package tracking with webhook delivery to your system
Web Tools XML to new USPS REST API migration
Shipping adjustment and postage discrepancy reconciliation
Discuss your USPS integration
USPS REST API endpoints we integrate
Address validation and ZIP+4Addresses API
Postage rates by service classPrices API
Domestic shipping label (PDF / ZPL)Domestic Labels API
International shipping labelInternational Labels API
Package tracking and scan eventsTracking API
Real-time tracking push eventsTracking Webhook
Postage adjustment reconciliationAdjustments API
Returns label creationReturns Labels API
Web Tools Migration

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.

Legacy Web Tools API (retired Jan 2026)
XML request and response format with custom USPS tag structures
Authentication via USERID parameter appended to the XML payload
Single HTTP endpoint for all operations, differentiated by API name in the XML
No versioning, no OAuth, no standard error codes
Fully shut down. Calls will fail or return degraded responses
New USPS REST API (current standard)
JSON request and response format following REST conventions
OAuth 2.0 client credentials flow with Consumer Key and Consumer Secret
Separate versioned REST endpoints per resource (addresses, prices, labels, tracking)
Requires CRID and MID in addition to API credentials for tracking access
Sandbox environment available for full end-to-end testing before production
What We Integrate

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.

Platform Integrations

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

WooCommerce USPS Integration

Custom WooCommerce shipping rate plugin calling the USPS Prices API live at checkout with package weight and destination ZIP code
Address validation on the billing and shipping address fields before checkout completes, with inline correction prompts
Label generation triggered on order fulfilment from the WooCommerce admin, with label PDF delivered to the fulfilment team
Tracking number stored on the WooCommerce order and customer-facing tracking page updated automatically via webhook
Returns label generated on request from the WooCommerce order admin and emailed to the customer
Shopify

Shopify USPS Integration

Custom Shopify carrier service app connecting USPS Prices API to Shopify's carrier-calculated shipping for live rates at checkout
Private app integration for label generation triggered by Shopify fulfilment events, syncing tracking numbers back to the order
Address validation via USPS Addresses API before order submission using Shopify checkout extensibility
Tracking webhook from USPS processed and pushed to Shopify order status and customer-facing order tracking page
Custom eCommerce

Custom Platform Integration

REST API middleware layer connecting your order management system to USPS with OAuth 2.0 token refresh, retry logic, and request logging
Multi-carrier rate comparison presenting USPS rates alongside UPS, FedEx, or other carriers for the buyer or fulfilment team to select
Batch label generation for high-volume fulfilment operations processing many shipments in a single operation
Adjustment data from the USPS Adjustments API reconciled automatically against order records in your accounting system
Internal Fulfilment Systems

Fulfilment and Warehouse Integration

Internal shipping dashboard pulling live USPS rates and generating labels directly from the warehouse management interface
ZPL label output integrated with thermal label printers at packing stations without manual file handling
Scan event extract (SEX) integration for high-volume operations needing bulk tracking data rather than per-package API calls
Inbound returns tracking monitored via Tracking Webhook with automated receiving workflows triggered on confirmed delivery
Our Process

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.

01

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.

02

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.

03

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.

04

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.

05

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.

Technology

How we build and maintain USPS integrations.

USPS APIs Used
Addresses API Prices API Domestic Labels API International Labels API Tracking API Tracking Webhook Returns Labels API Adjustments API
Platforms Integrated Into
WooCommerce Shopify Custom PHP Node.js Python Laravel
Integration Layer
OAuth 2.0 REST / JSON Webhook handlers Token refresh logic Retry with backoff Request logging
Label and Print Formats
PDF TIFF ZPL 203dpi ZPL 300dpi SVG JPG
120+

Brands Consulted

390+

Projects Delivered

14+

Years of Expertise

$11M+

Transactions Processed

FAQs

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 us

The 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.