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_wixnPZHJAdj",10 "version": 50,11 "display_id": 25,12 "status": "completed",13 "currency_code": "syp",14 "created_at": "2026-05-01T19:02:45.689Z",15 "updated_at": "2026-09-12T07:48:31.995Z",16 "original_item_total": {17 "numeric": 4818 },19 "original_item_subtotal": {20 "numeric": 2221 },22 "original_item_tax_total": {23 "numeric": 324 },25 "item_total": {26 "numeric": 927 },28 "item_subtotal": {29 "numeric": 3630 },31 "item_tax_total": {32 "numeric": 3433 },34 "item_discount_total": {35 "numeric": 4336 },37 "original_total": {38 "numeric": 4239 },40 "original_subtotal": {41 "numeric": 442 },43 "original_tax_total": {44 "numeric": 1445 },46 "total": {47 "numeric": 3848 },49 "subtotal": {50 "numeric": 2551 },52 "tax_total": {53 "numeric": 3854 },55 "discount_subtotal": {56 "numeric": 2957 },58 "discount_total": {59 "numeric": 660 },61 "discount_tax_total": {62 "numeric": 3563 },64 "credit_line_total": {65 "numeric": 3566 },67 "gift_card_total": {68 "numeric": 2069 },70 "gift_card_tax_total": {71 "numeric": 4772 },73 "shipping_total": {74 "numeric": 1175 },76 "shipping_subtotal": {77 "numeric": 2378 },79 "shipping_tax_total": {80 "numeric": 381 },82 "shipping_discount_total": {83 "numeric": 684 },85 "original_shipping_total": {86 "numeric": 1887 },88 "original_shipping_subtotal": {89 "numeric": 5090 },91 "original_shipping_tax_total": {92 "numeric": 4893 }94 },95 "creditLines": [96 "{value}"97 ]98 })99 }100)
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
BigNumberValueitem_discount_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
BigNumberValueshipping_discount_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">[]