Populate shipping methods in Checkout

Learn how to populate shipping methods in Checkout.

You can populate the default shipping methods in the Digital River Dashboard. You can also do this by listening to and responding to a shipping callout once a user adds a shipping address within the checkout experience.

Set default methods

You can set default shipping methods in the Digital River Dashboard by creating them in the Logistics section of the Prebuilt Checkout settings page.

  1. On the Digital River Dashboard, under Settings, click Prebuilt Checkout. The Prebuilt Checkout page appears.

  2. Find the Logistics section of the page.

  3. In the Default shipping methods subsection of Logistics, add your default shipping methods.

  4. Click Save.

Use the shipping callout function

Use the shipping callout function by completing the following tasks:

  1. Configure the shipping callout URL.

  2. Configure the ability to listen to and respond to a shipping callout.

Configure the shipping callout URL

To configure the shipping callout URL:

  1. On the Digital River Dashboard, under Settings, click Prebuilt Checkout. The Prebuilt Checkout page appears.

  2. Find the Shipping webhook URL subsection of the Webhooks section of the page.

  3. Click Save.

Configure the ability to listen to and respond to a shipping callout

When the customer enters an address, your endpoint receives a POST request with the checkout details and the entered shipping address. The sessionId is the Digital River Checkout Session ID. The sessionUpstreamId is the BigCommerce Cart Identifier.

The following shows an example:

{
    "sessionId": "e77a19a2-0e5a-4b41-b340-4451f1b3023e",
    "sessionUpstreamId": "b304d277-3398-4507-8834-6026b642106c",
    "currency": "USD",
    "shipTo": {
        "address": {
            "line1": "10380 Bren Road W",
            "city": "Minnetonka",
            "postalCode": "55446",
            "state": "MN",
            "country": "US"
        },
        "name": "John Doe",
        "phone": "6519881234",
        "email": "test@test.com"
    },
    "items": [
        {
            "sku": {
                "id": "sku_e102c701-e1fc-4de6-94c7-91f6f58871d4",
                "name": "Blue Jeans",
                "eccn": "8A992",
                "taxCode": "55101504.100",
                "image": "https://cdn11.bigcommerce.com/s-kxzhuipxqw/products/112/images/378/jeans_blue_classic__66844.1668100978.220.290.png?c=1",
                "url": "https://christeststore-d1.mybigcommerce.com/blue-jeans/",
                "physical": true,
                "skuGroupId": "physical-product"
            },
            "amount": 34.95,
            "quantity": 1,
            "id": "60cd34b0-1413-4e52-b8cf-0391f57ae450"
        }
    ]
}

Your system should provide shipment details and shipping methods for display. The following example shows how to provide the shipping methods and details:

{
  "shipments": [
    {
      "itemIds": [
        "60cd34b0-1413-4e52-b8cf-0391f57ae450"
      ],
      "shipFrom": {
        "address": {
          "city": "Minnetonka",
          "line1": "10380 Bren Rd W",
          "line2": "string",
          "state": "MN",
          "country": "US",
          "postalCode": "55446"
        }
      }
    }
  ],
  "shippingMethods": [
    {
      "amount": 2.99,
      "description": "Standard Shipping",
      "serviceLevel": "Standard"
    },
    {
      "amount": 10.99,
      "description": "Expedited Shipping",
      "serviceLevel": "Expedited"
    }
  ]
}

After responding to the shipping callout, the user interface will show these shipping methods.

Last updated