---
title: Shipping methods
slug: commerce-connect-15/docs/shipping-methods
docTags: 
createdAt: 2026-07-30T20:34:43.000Z
---

A shipping method maps a customer-facing name (such as **Ground Shipping**) to a back-end shipping provider (such as UPS). Back-end administrators see and configure the mapping in Commerce Connect; storefront customers see only the friendly name. When a customer picks Ground Shipping, the UPS provider calculates the rate.

This article shows how to add shipping methods in Commerce Connect Admin, and how to retrieve and store the selected shipping method from custom checkout code.

For details on creating gateways and providers, see [Shipping gateways and providers](docId:4ykV-jaYgPaSKJ2lRUBpI).

Classes in this topic are available in the following namespace:

- `Mediachase.Commerce.Orders.Dto`

## Add a shipping method

Go to **Settings** > **Shipping Methods** to see the shipping methods available for the selected language.

Click **Create** to add a shipping method, then fill out the details: name, friendly name, description, provider, language, base price, currency, active, and default.

![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/-dHePiEOt_TQzthZ3MJHj_5731960f16dbbf4ea5567881498b79c8e0e74ddf68efbc781391c0b994b82ae9-image.png)

## Access shipping information

The following example retrieves the shipping methods and rates for the current cart so the storefront can display them to the customer:

```csharp
// Get the list of shipping methods to filter.
ShippingMethodDto methods = ShippingManager.GetShippingMethods(SiteContext.Current.LanguageName);

// Filter to the methods that apply to this cart's shipping address.
List<ShippingMethodDto.ShippingMethodRow> shippingRows = new List<ShippingMethodDto.ShippingMethodRow>();

foreach (ShippingMethodDto.ShippingMethodRow method in methods.ShippingMethod.Rows)
{
    shippingRows.Add(method);
}

List<ShippingRate> list = new List<ShippingRate>();

foreach (ShippingMethodDto.ShippingMethodRow row in shippingRows)
{
    Type type = Type.GetType(row.ShippingOptionRow.ClassName);
    string message = String.Empty;
    IShippingGateway provider = (IShippingGateway)Activator.CreateInstance(type);

    List<LineItem> items = new List<LineItem>();

    foreach (LineItem lineItem in CartHelper.LineItems)
    {
        items.Add(lineItem);
    }

    if (items.Count > 0)
    {
        list.Add(provider.GetRate(row.ShippingMethodId, items.ToArray(), ref message));
    }
}
```

To store the selected shipping method, set the `LineItem` properties. You do not need to create a shipment object — the **Cart Prepare** workflow does that.

```csharp
ShippingMethodDto methods = ShippingManager.GetShippingMethods(SiteContext.Current.LanguageName);

ShippingMethodDto.ShippingMethodRow row = methods.ShippingMethod.FindByShippingMethodId(new Guid(ShippingRatesList.SelectedValue));
foreach (LineItem lineItem in CartHelper.LineItems)
{
    lineItem.ShippingMethodName = row.DisplayName;
    lineItem.ShippingMethodId = row.ShippingMethodId;
}
```
