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.

TipYou can use the retrieveCartStep to retrieve a cart's details.

Example#

Code
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#

SetTaxLinesForItemsStepInputSetTaxLinesForItemsStepInput
The details of the tax lines to set in a cart.
The cart's details.
item_tax_linesItemTaxLineDTO[]
The tax lines to set for line items.
shipping_tax_linesShippingTaxLineDTO[]
The tax lines to set for shipping methods.
Was this page helpful?
Ask Anything
FAQ
What is Medusa?
How can I create a module?
How can I create a data model?
How do I create a workflow?
How can I extend a data model in the Product Module?
Recipes
How do I build a marketplace with Medusa?
How do I build digital products with Medusa?
How do I build subscription-based purchases with Medusa?
What other recipes are available in the Medusa documentation?
Chat is cleared on refresh
Line break