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_3E8R5WoPR5FlGHhMwowH",10 "version": 49,11 "display_id": 41,12 "status": "requires_action",13 "currency_code": "omr",14 "created_at": "2025-06-25T14:34:46.488Z",15 "updated_at": "2025-09-23T11:04:02.862Z",16 "original_item_total": {17 "numeric": 4418 },19 "original_item_subtotal": {20 "numeric": 3521 },22 "original_item_tax_total": {23 "numeric": 3824 },25 "item_total": {26 "numeric": 1927 },28 "item_subtotal": {29 "numeric": 1430 },31 "item_tax_total": {32 "numeric": 4233 },34 "original_total": {35 "numeric": 336 },37 "original_subtotal": {38 "numeric": 1039 },40 "original_tax_total": {41 "numeric": 2542 },43 "total": {44 "numeric": 045 },46 "subtotal": {47 "numeric": 1548 },49 "tax_total": {50 "numeric": 1951 },52 "discount_subtotal": {53 "numeric": 1754 },55 "discount_total": {56 "numeric": 1257 },58 "discount_tax_total": {59 "numeric": 2860 },61 "gift_card_total": {62 "numeric": 2763 },64 "gift_card_tax_total": {65 "numeric": 3666 },67 "shipping_total": {68 "numeric": 4669 },70 "shipping_subtotal": {71 "numeric": 2572 },73 "shipping_tax_total": {74 "numeric": 1975 },76 "original_shipping_total": {77 "numeric": 4278 },79 "original_shipping_subtotal": {80 "numeric": 3981 },82 "original_shipping_tax_total": {83 "numeric": 284 }85 },86 "creditLines": [87 "{value}"88 ]89 })90 }91)
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
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">[]