- Get Started
- Product
- Resources
- Tools & SDKs
- Framework
- Reference
Menu
- Get Started
- Product
- Resources
- Tools & SDKs
- Framework
- Reference
setTaxLinesForItemsStep - Medusa Core Workflows Reference
This documentation provides a reference to the setTaxLinesForItemsStep
. It belongs to the @medusajs/medusa/core-flows
package.
This step sets the tax lines of shipping methods and line items in a cart.
Tip: You can use the retrieveCartStep to retrieve a cart's details.
Example#
1const data = setTaxLinesForItemsStep({2 // retrieve the details of the cart from another workflow3 // or in another step using the Cart Module's service4 cart,5 "item_tax_lines": [{6 "rate": 48,7 "code": "CODE123",8 "name": "Tax rate 2",9 "provider_id": "provider_1",10 "line_item_id": "litem_123"11 }],12 "shipping_tax_lines": [{13 "rate": 49,14 "code": "CODE456",15 "name": "Tax rate 1",16 "provider_id": "provider_1",17 "shipping_line_id": "sm_123"18 }]19})
Input#
SetTaxLinesForItemsStepInput
SetTaxLinesForItemsStepInputThe details of the tax lines to set in a cart.
SetTaxLinesForItemsStepInput
SetTaxLinesForItemsStepInputcart
CartWorkflowDTOThe cart's details.
cart
CartWorkflowDTOitem_tax_lines
ItemTaxLineDTO[]The tax lines to set for line items.
item_tax_lines
ItemTaxLineDTO[]shipping_tax_lines
ShippingTaxLineDTO[]The tax lines to set for shipping methods.
shipping_tax_lines
ShippingTaxLineDTO[]Was this page helpful?