Checkout Step 3: Choose Shipping Method

In the third step of the checkout flow, the customer chooses the shipping method to receive their order's items.

To do that, you:

  1. Retrieve the available shipping options for the cart using the List Shipping Options API route and show them to the customer.
  2. When the customer chooses a shipping option, you use the Add Shipping Method to Cart API route to set the cart's shipping method.

For example:

In the example above, you:

  • Retrieve the available shipping options of the cart to allow the customer to select from them.
  • Once the customer selects a shipping option, you send a request to the Add Shipping Method to Cart API route to update the cart's shipping method using the selected shipping option.

data Request Body Parameter#

When setting the shipping method using the Add Shipping Method to Cart API route, you can pass a data request body parameter that holds data relevant for the fulfillment provider.

This isn't implemented here as it's different for each provider. Refer to the provider's documentation on details of expected data, if any.

Was this page helpful?
Edit this page