Loading...
Was this page helpful?
This documentation provides a reference to the calculateShippingOptionsPricesStep. It belongs to the @medusajs/medusa/core-flows package.
This step calculates the prices for one or more shipping options.
1const data = calculateShippingOptionsPricesStep([{2 id: "so_123",3 provider_id: "provider_123",4 optionData: {5 // custom data relevant for the fulfillment provider6 carrier_code: "UPS",7 },8 data: {9 // custom data relevant for the fulfillment provider10 // specific to the cart using this shipping option11 },12 context: {13 from_location: {14 id: "sloc_123",15 // other location fields16 }17 }18}])
CalculateShippingOptionsPriceStepInputCalculateShippingOptionsPriceStepInputidstringprovider_idstringoptionDataRecord<string, unknown>data property of the shipping option.dataRecord<string, unknown>data property with custom data passed from the frontend.contextCartPropsForFulfillment & { [k: string]: unknown; from_location?: StockLocationDTO | undefined; } & CalculatedRMAShippingContextCalculatedShippingOptionPrice[]CalculatedShippingOptionPrice[]calculated_amountnumberis_calculated_price_tax_inclusiveboolean