osCommerce V4 Module

FedEx Shipping

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.

Get Notified on Release osCommerce Module
osCommerce V4 — Checkout
Shipping Options
FedEx
FedEx Ground 5-7 business days
$12.45
FedEx
FedEx 2Day 2 business days
$24.90
FedEx
Priority Overnight Next business day
$48.15
Live rates via FedEx REST API • OAuth 2.0 • TLS 1.2+

Features

Real-Time Rate Quotes

Live shipping rates at checkout via the FedEx Rate API. Supports account-specific negotiated rates, handling fees (flat or percentage), and rate discounts.

OAuth 2.0 Authentication

Secure client credentials flow as required by FedEx's current API. Tokens cached with 0600 permissions to minimize authentication requests.

TLS 1.2+ Enforced

All API calls over HTTPS with full certificate verification, TLS 1.2 minimum, disabled redirects (anti-SSRF), and configurable CA bundle paths.

16 Service Types

Ground, Home Delivery, Express Saver, 2Day, 2Day A.M., Standard/Priority/First Overnight, Freight Economy/Priority/First, and 5 International services.

Package Tracking

Admin tracking tool shows delivery status, service type, estimated delivery, and complete scan history with locations. Built with Yii2 controllers and Smarty templates.

Label Generation

Create shipments and download labels in PDF, PNG, or ZPL format directly from the admin panel. View tracking numbers for created shipments.

Address Validation

Optional address verification via the FedEx Address Validation API. Resolves and classifies addresses before rate requests to reduce delivery failures.

osCommerce V4 Native

Extends ModuleShipping base class with configure_keys(), platform-aware configuration, Smarty templates, Yii2 controllers, and multi-platform support.

Sandbox Support

Test with FedEx sandbox environment before going live. Toggle between sandbox and production credentials with a single setting in the admin panel.

Setup & Installation

Get the module running in 7 steps. Requires osCommerce V4, PHP 8.1+, and a FedEx Developer account.

1

Get FedEx API Credentials

Create a project at the FedEx Developer Portal (developer.fedex.com) and select the APIs you need:

  • Rate API — shipping quotes at checkout (required)
  • Ship API — label generation (recommended, requires FedEx certification)
  • Track API — package tracking (recommended)
  • Address Validation API — address verification (optional)

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.

2

Copy Module Files

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/
3

Set File Permissions

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/
4

Install via Admin Panel

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.

5

Configure the Module

Edit the FedEx module in Modules → Shipping and fill in your settings:

API Key & Secret Key Your Client ID and Client Secret from developer.fedex.com
Account Number Your FedEx account number
Ship From Origin zip code, 2-letter state code, and ISO country code
Enabled Services Comma-separated service codes (empty = all). e.g., FEDEX_GROUND, FEDEX_2_DAY
Weight Unit LB or KG — must match your product catalog weights
Handling & Discount Flat or percentage handling fee; discount % for negotiated rates
6

Test in Sandbox

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.

7

Go Live

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.

Requirements

Server

osCommerce V4 (Yii2-based), PHP 8.1+, cURL and JSON extensions, valid SSL certificate on the server.

FedEx Account

FedEx Developer account with API credentials from developer.fedex.com. Ship API requires FedEx certification for production use.

SSL/TLS

Server must support TLS 1.2+. Up-to-date CA certificates required. Custom CA bundle path configurable for non-standard setups.

Replace your deprecated FedEx integration.

Built for the FedEx REST API before the June 2026 SOAP deadline.

Get Notified on Release