Skip to main content

FedEx Shipping

Configures plg_easycommerce_fedex, which talks to the modern FedEx REST API (https://developer.fedex.com/api/en-us/catalog.html). The legacy WSDL/SOAP integration is not used.

Prerequisites

  1. A FedEx developer account at developer.fedex.com.
  2. A FedEx shipping account number (9 to 12 digits).
  3. A project on the developer portal with Ship, Rate, Track, and Address Validation APIs subscribed.

Getting API Credentials

Step 1: Register

  1. Go to developer.fedex.com.
  2. Create an account and verify your email.

Step 2: Create a Project

  1. Sign in to the developer portal.
  2. Open My Projects, Create a Project.
  3. Select the Ship, Rate, and Other APIs project type.
  4. Accept the terms and create the project.

Step 3: Capture Credentials

Each project issues distinct Test and Production credentials. Capture both:

CredentialDescription
API KeyActs as the OAuth client_id.
API SecretActs as the OAuth client_secret.
Account NumberYour FedEx shipper account number.
Meter NumberOptional, only required for some legacy reports.

Authentication Model

The plugin uses OAuth2 client credentials:

  1. The plugin POSTs grant_type=client_credentials with the API key/secret to /oauth/token.
  2. FedEx returns an access token with expires_in (typically 3600 seconds).
  3. The token is cached in the Joomla session, keyed by mode + sha256(api_key), and re-used until 60 seconds before expiry.
  4. On HTTP 401 the cached token is dropped and the request is retried once.

Every API call carries:

HeaderValue
AuthorizationBearer {access_token}
Content-Typeapplication/json
X-localeen_US
x-customer-transaction-idPer-call 32-char hex token. FedEx support uses this to trace a specific call.

Endpoints

OperationMethodPath
OAuth tokenPOST/oauth/token
Rate quotePOST/rate/v1/rates/quotes
Create shipment / labelPOST/ship/v1/shipments
Cancel shipmentPUT/ship/v1/shipments/cancel
Track shipmentPOST/track/v1/trackingnumbers
Validate addressPOST/address/v1/addresses/resolve

Rate requests use the Rate Request Type field (ACCOUNT, LIST, PREFERRED) and ask for transit times via rateRequestControlParameters.returnTransitTimes.

Shipment creation requests labels with labelResponseOptions: 'URL_ONLY', so labels are downloaded from URLs FedEx returns rather than streamed inline.

Configuration

Configure button

The Configure button on the Shipping settings tab is disabled until the plugin is enabled in System, Manage, Plugins.

Credentials

SettingDescription
Modetest (sandbox) or live (production).
Test API KeySandbox client_id. Shown when mode is test.
Test API SecretSandbox client_secret. Encrypted at rest.
Live API KeyProduction client_id. Shown when mode is live.
Live API SecretProduction client_secret. Encrypted at rest.
Account NumberFedEx shipper account; required.
Meter NumberOptional, legacy.

Origin / Shipper

Required fields: name, address, city, state, postal code, country. Optional: company, address line 2, phone, residential flag. Country defaults to US.

Services

Service CodeService Name
FEDEX_GROUNDFedEx Ground
GROUND_HOME_DELIVERYFedEx Home Delivery
SMART_POSTFedEx Ground Economy
FEDEX_2_DAYFedEx 2Day
FEDEX_2_DAY_AMFedEx 2Day A.M.
FEDEX_EXPRESS_SAVERFedEx Express Saver
STANDARD_OVERNIGHTStandard Overnight
PRIORITY_OVERNIGHTPriority Overnight
FIRST_OVERNIGHTFirst Overnight
FEDEX_INTERNATIONAL_PRIORITYInternational Priority
FEDEX_INTERNATIONAL_PRIORITY_EXPRESSInternational Priority Express
INTERNATIONAL_ECONOMYInternational Economy
FEDEX_INTERNATIONAL_CONNECT_PLUSInternational Connect Plus
FEDEX_REGIONAL_ECONOMYRegional Economy

Only enabled services appear at checkout. The default selection is FEDEX_GROUND.

Options

SettingValuesDefault
Pickup TypeUSE_SCHEDULED_PICKUP, CONTACT_FEDEX_TO_SCHEDULE, DROPOFF_AT_FEDEX_LOCATIONDROPOFF_AT_FEDEX_LOCATION
Packaging TypeYOUR_PACKAGING, FEDEX_ENVELOPE, FEDEX_PAK, FEDEX_TUBE, FEDEX_SMALL_BOX, FEDEX_MEDIUM_BOX, FEDEX_LARGE_BOX, FEDEX_EXTRA_LARGE_BOX, FEDEX_10KG_BOX, FEDEX_25KG_BOXYOUR_PACKAGING
Rate Request TypeACCOUNT, LIST, PREFERREDACCOUNT
Weight UnitLB, KGLB
Dimension UnitIN, CMIN
Default Length / Width / HeightFallbacks when product dimensions are missing10 / 8 / 4
Enable InsuranceYes / NoNo
Return Transit TimesYes / NoYes

Advanced

SettingDescriptionDefault
API TimeoutcURL timeout in seconds, clamped to 5 to 6015
Debug ModeLogs each request/response (truncated to 4 KB)No

Testing

  1. Set Mode to test.
  2. Enter sandbox API key and secret.
  3. Add the plugin to a shipping zone with valid US origin and destination.
  4. Place a test cart through checkout; rates should populate for every enabled service that supports the lane.
  5. If no rates appear, enable Debug Mode and inspect the plugin log for the FedEx error payload.

Going Live

  1. Switch Mode to live.
  2. Enter the live API key and secret (these are different from sandbox).
  3. Run a low-value test order end to end, including label generation if you use it.
  4. Monitor logs for 401s or rate-failure responses.

Troubleshooting

SymptomLikely Cause
FedEx authentication failedAPI key/secret wrong for the active mode, or test credentials used in live mode.
FedEx request failed at the network layerFirewall, TLS, or cURL timeout. Check cacert.pem is still present in the plugin folder.
No services returned but HTTP 200The selected service codes are not eligible for the lane (e.g., domestic codes on an international shipment).
Rates much higher than expectedSwitch Rate Request Type to ACCOUNT to use your negotiated rates instead of list rates.
All requests fail with 4xx and "invalid account"Account number does not match the API key environment (sandbox accounts ≠ production accounts).