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_vaAPA8uGKohilvBiN",10 "version": 33,11 "display_id": 27,12 "status": "draft",13 "currency_code": "pab",14 "created_at": "2026-02-27T02:39:12.711Z",15 "updated_at": "2025-12-25T21:25:11.722Z",16 "original_item_total": {17 "numeric": 3018 },19 "original_item_subtotal": {20 "numeric": 1521 },22 "original_item_tax_total": {23 "numeric": 624 },25 "item_total": {26 "numeric": 3727 },28 "item_subtotal": {29 "numeric": 1830 },31 "item_tax_total": {32 "numeric": 1333 },34 "item_discount_total": {35 "numeric": 636 },37 "original_total": {38 "numeric": 2939 },40 "original_subtotal": {41 "numeric": 3742 },43 "original_tax_total": {44 "numeric": 245 },46 "total": {47 "numeric": 4648 },49 "subtotal": {50 "numeric": 2951 },52 "tax_total": {53 "numeric": 4454 },55 "discount_subtotal": {56 "numeric": 057 },58 "discount_total": {59 "numeric": 4860 },61 "discount_tax_total": {62 "numeric": 4063 },64 "credit_line_total": {65 "numeric": 1066 },67 "gift_card_total": {68 "numeric": 4469 },70 "gift_card_tax_total": {71 "numeric": 172 },73 "shipping_total": {74 "numeric": 4475 },76 "shipping_subtotal": {77 "numeric": 1178 },79 "shipping_tax_total": {80 "numeric": 2181 },82 "shipping_discount_total": {83 "numeric": 1184 },85 "original_shipping_total": {86 "numeric": 3887 },88 "original_shipping_subtotal": {89 "numeric": 3990 },91 "original_shipping_tax_total": {92 "numeric": 193 }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">[]