Skip to content

Magento Shipping — Shipping Methods, Carriers and Zones

DodaTech Updated 2026-06-27 11 min read

In this tutorial, you'll learn how to configure shipping in Magento, including flat rate, table rates, free shipping, carrier integrations with UPS, FedEx, USPS, and DHL, and managing shipping zones and origins.

What You'll Learn

  • Configuring flat rate, table rates, and free shipping methods
  • Setting up carrier integrations with real-time rate calculation
  • Managing shipping zones, origins, and address requirements
  • Configuring shipping handling fees and label generation
  • Creating a shipping policy CMS page per store
  • Restricting shipping methods by customer group and order amount

Why It Matters

Shipping configuration directly affects your store's profitability and customer satisfaction. Incorrect shipping rates either lose you money on every order or drive customers away with inflated costs. Real-time carrier rates ensure accuracy, but they require proper configuration. Understanding how each shipping method works lets you choose the right model for your business.

Real-World Use

An online furniture store ships large items. They cannot use flat rate because shipping costs vary wildly by zip code. They configure UPS real-time rates for large furniture and free shipping for accessories over $50. Table rates handle mid-sized items by weight zones. The result: customers see accurate shipping costs at checkout, and the store never loses money on shipping.

Learning Path

flowchart LR
  A["Payment Gateways"] --> B["Shipping
← You are here"]:::current B --> C["Tax Configuration"] C --> D["Orders & Invoices"] D --> E["Sales Rules & Coupons"] classDef current fill:#38bdf8,color:#0f172a,stroke-width:2px

Shipping Configuration

All shipping settings are in Stores > Configuration > Sales > Shipping Methods.

The configuration page lists every available shipping method. Each section controls one method's behavior, rates, and availability.

Flat Rate

Flat rate is the simplest shipping method. You set a fixed price that applies to all orders meeting the conditions.

Configuration options:

  • Enabled — Yes/No
  • Title — Display name ("Flat Rate" or "Standard Shipping")
  • Method Name — Name shown in checkout
  • Type — Per Order (one fee per order) or Per Item (fee per item in cart)
  • Price — The flat fee amount
  • Calculate Handling Fee — None or Fixed + variable
  • Handling Fee — Additional fee amount
  • Displayed Error Message — Message shown if method is unavailable
  • Ship to Applicable Countries — All Allowed or Specific Countries
  • Ship to Specific Countries — Selected countries
  • Sort Order — Display order in checkout

Flat rate is ideal for stores where shipping costs are relatively consistent across all orders.

Table Rates

Table rates use a CSV file to define shipping costs based on conditions. This is more flexible than flat rate.

The CSV file columns:

Country, Region/State, Zip/Postal Code, Weight (and above), Price (and above), Qty, Shipping Price
USA, *, *, 0, 0, 0, 5.00
USA, *, *, 5, 0, 0, 10.00
USA, *, *, 10, 0, 0, 15.00
USA, NY, *, 0, 0, 0, 4.00
USA, CA, *, 0, 0, 0, 6.00

Each row defines a condition (country, region, zip, weight, price, qty) and the resulting shipping price. The asterisk (*) means "any value." Magento matches the customer's order against the most specific row.

Configure table rates:

  1. Go to Stores > Configuration > Sales > Shipping Methods > Table Rates.
  2. Set "Enabled" to Yes.
  3. Upload your CSV file.
  4. Set the condition type: Weight vs Destination, Price vs Destination, or Quantity vs Destination.

The condition type determines what the "vs Destination" column uses (weight, price, or quantity of the order).

Free Shipping

Free shipping encourages larger orders. Configure it:

  • Enabled — Yes/No
  • Title — Display name
  • Method Name — Name shown in checkout
  • Minimum Order Amount — Orders at or above this amount qualify
  • Include Tax to Amount — Whether to include tax in the minimum amount calculation
  • Displayed Error Message — Message if conditions are not met
  • Ship to Applicable Countries — All Allowed or Specific Countries

You can also restrict free shipping to specific customer groups. This is useful for offering free shipping to VIP or Wholesale customers only.

Carrier Integration: UPS

UPS integration provides real-time shipping rates from the UPS API.

Configuration in Stores > Configuration > Sales > Shipping Methods > UPS:

  1. Enabled — Yes
  2. UPS Type — United Parcel Service (residential or commercial)
  3. Gateway URL — Default UPS API URL
  4. Mode — Live or Develop (sandbox)
  5. Access License Number, User ID, Password — From your UPS developer account
  6. Origin of the Shipment — Your shipping origin country, state, city, and postal code
  7. Package Weight Handling — Divide by weight, unit conversion
  8. Packaging Type — Package, Box, Tube, Pallet
  9. Packing Slip — Generate packing slip
  10. Pickup Type — Daily Pickup, Customer Counter, One Time
  11. Allowed Methods — Select which UPS services to offer (Ground, 2nd Day Air, Next Day Air)
  12. Free Shipping — Enable specific methods for free shipping
  13. Handling Fee — Additional fee on top of UPS rate

UPS real-time rates display at checkout based on the destination address and package weight.

Carrier Integration: FedEx

FedEx integration requires a FedEx developer account.

Configuration:

  1. Enabled — Yes
  2. Mode — Test or Live
  3. Account ID, Meter Number, Key, Password — FedEx API credentials
  4. Dropoff Type — Regular Pickup, Drop Box, Business Service Center
  5. Packaging Type — Your Packaging, FedEx Envelope, FedEx Box
  6. Allowed Methods — FedEx Ground, Express Saver, 2 Day, Standard Overnight
  7. Free Shipping — Configure per method
  8. Handling Fee — Additional handling fee

FedEx rates depend on package dimensions and weight, which can be set per product.

Carrier Integration: USPS

USPS integration for US-based stores:

  1. Enabled — Yes
  2. Gateway URL — USPS API endpoint
  3. User ID — USPS Web Tools ID (free to register)
  4. Mode — Live or Test
  5. Packaging Types — Package, Envelope, Box, Tube
  6. Allowed Methods — Priority Mail, First Class, Priority Mail Express, Media Mail
  7. Free Shipping — Per method configuration

USPS is the most affordable carrier for small packages within the US.

Carrier Integration: DHL

DHL for international shipping:

  1. Enabled — Yes
  2. Gateway URL — DHL API URL
  3. Account Number — DHL account
  4. Mode — Live or Test
  5. Content Type — Documents or Non-Documents
  6. Allowed Methods — DHL Express, DHL Express Worldwide
  7. Handling Fee — Additional handling fee

DHL is preferred for international shipments, especially to Europe and Asia.

Shipping Origin

The shipping origin is the default location your shipments come from. Set it in Stores > Configuration > Sales > Shipping Origin:

  • Country
  • Region/State
  • Postal Code
  • City
  • Street Address

This origin is used for:

  • Real-time carrier rate calculations
  • Distance-based source selection (MSI)
  • Tax jurisdiction for origin-based tax calculation

Shipping Address Requirements

Configure address field requirements in Stores > Configuration > Customers > Customer Configuration > Name and Address Options:

  • Telephone Required — Whether phone number is required at checkout
  • Region/State Required — Required for selected countries
  • Number of Lines in a Street Address — 1 or 2 street lines
  • Show Prefix/Suffix — Mr/Mrs/Ms options

Minimizing required fields reduces checkout friction, but phone numbers are important for carrier delivery issues.

Shipping Handling Fee

Handling fees add to the shipping rate:

  • None — No additional fee
  • Fixed — Fixed amount added to shipping cost
  • Percentage — Percentage of shipping cost added

Handle fees cover packaging materials, insurance, or order processing costs.

Shipping Label Generation

Magento supports shipping label generation via carrier integration. When configuring a carrier:

  1. Enable Shipping Label generation.
  2. Configure label format (PDF, thermal).
  3. In Sales > Shipments > Create Shipment, you can generate and print labels.

The label generation works with UPS, FedEx, USPS, and DHL when properly configured.

Shipping Policy

Create a shipping policy CMS page and link to it from the checkout. Go to Content > Pages and create a page with:

  • Shipping methods and delivery times
  • Shipping costs and free shipping thresholds
  • International shipping information
  • Tracking information
  • Returns policy

Reference this page in checkout using a terms and conditions link or a shipping block.

Common Mistakes

  1. Not testing real-time rates in sandbox. Configuring UPS or FedEx without sandbox testing can result in incorrect rates or no rates at checkout. Always test with test credentials and verify the rates match your expectations.

  2. Using flat rate for heavy or oversized items. Flat rate works for small, consistent items. For furniture, exercise equipment, or international shipping, use real-time carrier rates or table rates. Otherwise, you will overcharge some customers and undercharge others.

  3. Forgetting to configure handling fees. If your packaging costs are not factored into shipping rates, you lose money on every order. Add a handling fee to cover materials, insurance, and labor.

  4. Not restricting carriers by region. If you only ship within the US, configure carriers to show only for US addresses. Showing DHL or USPS methods to UK customers who cannot use them clutters the checkout.

  5. Ignoring shipping address requirements. Making phone numbers optional saves a few seconds but causes delivery problems when the carrier cannot reach the customer. Require phone numbers for shipped orders.

Practice Questions

  1. What is the difference between flat rate and table rate shipping? Answer: Flat rate charges the same fee for every order (per order or per item). Table rates use a CSV file to define different fees based on weight, price, quantity, and destination. Table rates are more flexible and accurate for varying shipping costs.

  2. How do real-time carrier rates differ from flat rates? Answer: Real-time carrier rates query the carrier's API (UPS, FedEx, USPS, DHL) with the customer's address and package weight/dimensions to return an exact shipping cost. Flat rates use a predetermined fixed price regardless of destination or weight.

  3. What information does a carrier need to calculate real-time rates? Answer: The carrier needs the origin address (your shipping origin), destination address (customer's shipping address), package weight, package dimensions, and the selected service level (Ground, Express, etc.). Magento sends this data via the API.

  4. Challenge: Create a complete shipping Strategy for an electronics store shipping within the US, to Canada, and to the UK. Configure: free shipping for orders over $100 (US only), flat rate $10 for orders under $100, table rates for Canada based on weight, UPS real-time rates for US express shipping, and DHL for UK orders. Create the table rate CSV for Canada with three weight tiers. Document the configuration decisions and test with sample addresses.

FAQ

What is the best shipping method for a small store?

Flat rate is the simplest and works well for small stores with consistent product sizes and weights. As your catalog grows, switch to table rates for accuracy or real-time carrier rates for an optimal customer experience.

Why is no shipping method showing at checkout?

Check that at least one shipping method is enabled in Stores > Configuration > Sales > Shipping Methods. Verify the shipping origin address is configured. Ensure the customer's destination is covered by at least one enabled method. Clear cache after configuration changes.

Can I offer free shipping for specific products?

Yes. You can configure free shipping per product at the product level (set individual product to 'Free Shipping' in the Advanced Inventory) or use cart price rules to apply free shipping based on conditions (certain categories, customer groups, or order amounts).

Do I need a carrier API account for real-time rates?

Yes. Each carrier requires you to register for API access. UPS, FedEx, and DHL provide developer accounts with sandbox credentials for testing. USPS Web Tools is free to register. Production accounts require negotiated rates.

Mini Project

Your task: Configure a complete shipping suite for a multi-region store.

  1. Configure Flat Rate: $5.99 per order for orders under $50.
  2. Configure Free Shipping: Free for orders $50+ (US only).
  3. Create a Table Rate CSV for Canada with three weight tiers (0-5 lbs: $9.99, 5-15 lbs: $19.99, 15+ lbs: $29.99).
  4. Configure UPS real-time rates with sandbox credentials.
  5. Configure DHL for international (UK, EU) orders.
  6. Set the shipping origin to a US address.
  7. Restrict each method to appropriate countries.
  8. Set handling fee: $1.00 on all methods (packaging).
  9. Add handling fee percentage: 5% on UPS and DHL (insurance).
  10. Create a shipping policy CMS page.
  11. Test each method with various customer addresses and cart totals.

This exercise covers every shipping configuration you will need in production.

What's Next

Now that you understand shipping, learn about tax configuration:

Continue to Lesson 12: Tax Configuration — Tax rules, rates, VAT, and display settings.

Related lessons:

Built by the developers of DodaTech

Doda Browser, DodaZIP & Durga Antivirus Pro