Magento 2 Flat-rate shipping with FedEx One Rate

By | August 26, 2025
Spread the love

1. What is FedEx One Rate®?

  • FedEx One Rate is flat-rate pricing for FedEx Express shipments when you use FedEx-supplied packaging (envelopes, paks, tubes, boxes, etc.).

  • Cost depends on package type + delivery speed, not on weight (as long as ≤ 50 lbs) or distance (zones 2–8).

  • Available only for FedEx Express (2Day, Express Saver, Standard Overnight, etc.) — not Ground.


2. Magento 2 Native Behavior

  • Magento 2 core has Flat Rate (one global cost, per order/item/weight).

  • FedEx integration in Magento 2 does not include One Rate out of the box. It only pulls live rates via the FedEx Web Services (SOAP or REST).

So, if you want “FedEx One Rate” as a selectable shipping option, you have 2 paths:


3. Implementation Options

Option A: Custom Flat-Rate Methods

  • Create a custom shipping method(s) in Magento like:

    • FedEx One Rate – Envelope (2Day) → $9.50

    • FedEx One Rate – Medium Box (Express Saver) → $14.25

    • FedEx One Rate – Large Box (Standard Overnight) → $39.10

  • You hardcode the rates (from FedEx’s One Rate chart) into etc/config.xml or system.xml so the admin can manage them.

  • Downside: no live API validation — you must keep rates updated manually.


Option B: FedEx Web Services (with One Rate flag)

  • FedEx SOAP/REST APIs do support One Rate pricing if you:

    • Use RequestedPackageLineItems->SpecialServicesRequested->ContainerType = FEDEX_ONE_RATE (or valid FedEx packaging type like FEDEX_SMALL_BOX, FEDEX_MEDIUM_BOX).

    • Request rates with RateRequest->RateRequestTypes set to ACCOUNT and LIST.

  • FedEx will then return One Rate if you specified eligible packaging.

👉 In Magento 2, you’d extend the FedEx carrier model (Magento\Fedex\Model\Carrier) to pass in these fields and parse One Rate from the response.


Option C: Marketplace Extensions

  • Some shipping extensions (ShipperHQ, PluginHive, EcomDev) already expose FedEx One Rate as separate selectable options in Magento.

  • Good if you don’t want to maintain FedEx API customizations yourself.


4. Recommended Setup

  • If you only need basic flat-rate “like FedEx One Rate”, use Option A (custom flat rate methods) — fastest, simplest.

  • If you need real FedEx One Rate pricing directly from FedEx, go Option B — requires API integration but ensures accuracy and packaging validation.