Modern FedEx REST API integration for osCommerce V4.
A drop-in FedEx shipping module for osCommerce Online Merchant V4 using the current FedEx REST API with OAuth 2.0 authentication. Replaces the legacy SOAP/XML-based integration that FedEx is fully retiring on August 31, 2026. Built native for the Yii2-based V4 architecture with real-time rates, label generation, tracking, and address validation.
Live shipping rates at checkout via the FedEx Rate API. Supports account-specific negotiated rates, handling fees (flat or percentage), and rate discounts.
Secure client credentials flow as required by FedEx's current API. Tokens cached with 0600 permissions to minimize authentication requests.
All API calls over HTTPS with full certificate verification, TLS 1.2 minimum, disabled redirects (anti-SSRF), and configurable CA bundle paths.
Ground, Home Delivery, Express Saver, 2Day, 2Day A.M., Standard/Priority/First Overnight, Freight Economy/Priority/First, and 5 International services.
Admin tracking tool shows delivery status, service type, estimated delivery, and complete scan history with locations. Built with Yii2 controllers and Smarty templates.
Create shipments and download labels in PDF, PNG, or ZPL format directly from the admin panel. View tracking numbers for created shipments.
Optional address verification via the FedEx Address Validation API. Resolves and classifies addresses before rate requests to reduce delivery failures.
Extends ModuleShipping base class with configure_keys(), platform-aware configuration, Smarty templates, Yii2 controllers, and multi-platform support.
Test with FedEx sandbox environment before going live. Toggle between sandbox and production credentials with a single setting in the admin panel.
Get the module running in 7 steps. Requires osCommerce V4, PHP 8.1+, and a FedEx Developer account.
Create a project at the FedEx Developer Portal (developer.fedex.com) and select the APIs you need:
Note your API Key (Client ID), Secret Key (Client Secret), and FedEx Account Number. For sandbox testing, FedEx provides test credentials when you create a sandbox project.
Copy the files into your osCommerce V4 installation:
# Core shipping module + API classes (REQUIRED)
cp lib/common/modules/orderShipping/fedex.php \
/path/to/oscommerce/lib/common/modules/orderShipping/
cp -r lib/common/classes/FedEx \
/path/to/oscommerce/lib/common/classes/
# Admin controllers + templates (OPTIONAL)
cp ext/FedEx/admin/FedExTrackingController.php \
/path/to/oscommerce/lib/backend/controllers/
cp ext/FedEx/admin/FedExLabelsController.php \
/path/to/oscommerce/lib/backend/controllers/
mkdir -p /path/to/oscommerce/lib/backend/themes/basic/fedex/
cp ext/FedEx/views/fedex/*.tpl \
/path/to/oscommerce/lib/backend/themes/basic/fedex/
Ensure proper permissions on your server:
# Module and class files — readable by web server
chmod 644 /path/to/oscommerce/lib/common/modules/orderShipping/fedex.php
chmod 644 /path/to/oscommerce/lib/common/classes/FedEx/*.php
# Runtime directory — writable for token cache and error logs
chmod 755 /path/to/oscommerce/runtime/
Log in to your osCommerce V4 Admin Panel, go to Modules → Shipping, enable "Show not installed modules" if needed, find FedEx in the list, and click Install. The module's configure_keys() method automatically creates all 21 configuration entries in the platforms_configuration table.
Edit the FedEx module in Modules → Shipping and fill in your settings:
Set Sandbox Mode to True and use your FedEx sandbox API credentials. Place a test order and verify shipping rates appear at checkout. Test the admin tracking and label tools if installed. Check runtime/fedex_errors.log for any API errors.
Replace sandbox credentials with your production API Key and Secret Key, set Sandbox Mode to False, and verify rates are returned correctly with a test checkout.
Important: State/province codes must be 2-letter abbreviations (e.g., TX not Texas). The FedEx REST API enforces stricter validation than the legacy SOAP API.
osCommerce V4 (Yii2-based), PHP 8.1+, cURL and JSON extensions, valid SSL certificate on the server.
FedEx Developer account with API credentials from developer.fedex.com. Ship API requires FedEx certification for production use.
Server must support TLS 1.2+. Up-to-date CA certificates required. Custom CA bundle path configurable for non-standard setups.
Built for the FedEx REST API before the June 2026 SOAP deadline.
Get Notified on Release