Loading...
Was this page helpful?
This documentation provides a reference to the validateOrderCreditLinesStep
. It belongs to the @medusajs/medusa/core-flows
package.
1import { createWorkflow } from "@medusajs/framework/workflows-sdk"2import { validateOrderCreditLinesStep } from "@medusajs/medusa/core-flows"3 4const myWorkflow = createWorkflow(5 "my-workflow",6 () => {7 const data = validateOrderCreditLinesStep({8 "order": {9 "id": "id_OeRI8o90zmlFt",10 "version": 46,11 "display_id": 25,12 "status": "draft",13 "currency_code": "djf",14 "created_at": "2025-11-14T20:23:50.811Z",15 "updated_at": "2025-10-22T16:08:55.455Z",16 "original_item_total": {17 "numeric": 518 },19 "original_item_subtotal": {20 "numeric": 321 },22 "original_item_tax_total": {23 "numeric": 324 },25 "item_total": {26 "numeric": 5027 },28 "item_subtotal": {29 "numeric": 4930 },31 "item_tax_total": {32 "numeric": 1533 },34 "original_total": {35 "numeric": 2236 },37 "original_subtotal": {38 "numeric": 2239 },40 "original_tax_total": {41 "numeric": 1742 },43 "total": {44 "numeric": 3445 },46 "subtotal": {47 "numeric": 3848 },49 "tax_total": {50 "numeric": 451 },52 "discount_subtotal": {53 "numeric": 3454 },55 "discount_total": {56 "numeric": 5057 },58 "discount_tax_total": {59 "numeric": 4360 },61 "credit_line_total": {62 "numeric": 1463 },64 "gift_card_total": {65 "numeric": 1566 },67 "gift_card_tax_total": {68 "numeric": 2269 },70 "shipping_total": {71 "numeric": 2872 },73 "shipping_subtotal": {74 "numeric": 4675 },76 "shipping_tax_total": {77 "numeric": 2178 },79 "original_shipping_total": {80 "numeric": 2881 },82 "original_shipping_subtotal": {83 "numeric": 2784 },85 "original_shipping_tax_total": {86 "numeric": 1787 }88 },89 "creditLines": [90 "{value}"91 ]92 })93 }94)
order
OrderDTOid
stringversion
numberdisplay_id
numberstatus
OrderStatuscurrency_code
stringcreated_at
string | Dateupdated_at
string | Dateoriginal_item_total
BigNumberValueoriginal_item_subtotal
BigNumberValueoriginal_item_tax_total
BigNumberValueitem_total
BigNumberValueitem_subtotal
BigNumberValueitem_tax_total
BigNumberValueoriginal_total
BigNumberValueoriginal_subtotal
BigNumberValueoriginal_tax_total
BigNumberValuetotal
BigNumberValuesubtotal
BigNumberValuetax_total
BigNumberValuediscount_subtotal
BigNumberValuediscount_total
BigNumberValuediscount_tax_total
BigNumberValuecredit_line_total
BigNumberValuegift_card_total
BigNumberValuegift_card_tax_total
BigNumberValueshipping_total
BigNumberValueshipping_subtotal
BigNumberValueshipping_tax_total
BigNumberValueoriginal_shipping_total
BigNumberValueoriginal_shipping_subtotal
BigNumberValueoriginal_shipping_tax_total
BigNumberValueregion_id
stringOptionalcustomer_id
stringOptionalsales_channel_id
stringOptionalemail
stringOptionalis_draft_order
booleanOptionalmetadata
null | Record<string, unknown>Optionalcanceled_at
string | DateOptionaldeleted_at
string | DateOptionalcreditLines
Omit<CreateOrderCreditLineDTO, "order_id">[]