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_YfBXtarUusmkSXFE7Jr",10 "version": 50,11 "display_id": 45,12 "status": "archived",13 "currency_code": "top",14 "created_at": "2026-04-05T03:38:46.635Z",15 "updated_at": "2025-10-19T17:51:24.259Z",16 "original_item_total": {17 "numeric": 1018 },19 "original_item_subtotal": {20 "numeric": 1821 },22 "original_item_tax_total": {23 "numeric": 4724 },25 "item_total": {26 "numeric": 2427 },28 "item_subtotal": {29 "numeric": 3830 },31 "item_tax_total": {32 "numeric": 433 },34 "original_total": {35 "numeric": 336 },37 "original_subtotal": {38 "numeric": 339 },40 "original_tax_total": {41 "numeric": 4642 },43 "total": {44 "numeric": 3045 },46 "subtotal": {47 "numeric": 4948 },49 "tax_total": {50 "numeric": 3851 },52 "discount_subtotal": {53 "numeric": 1854 },55 "discount_total": {56 "numeric": 4957 },58 "discount_tax_total": {59 "numeric": 860 },61 "gift_card_total": {62 "numeric": 1263 },64 "gift_card_tax_total": {65 "numeric": 3466 },67 "shipping_total": {68 "numeric": 4269 },70 "shipping_subtotal": {71 "numeric": 3472 },73 "shipping_tax_total": {74 "numeric": 075 },76 "original_shipping_total": {77 "numeric": 1278 },79 "original_shipping_subtotal": {80 "numeric": 4481 },82 "original_shipping_tax_total": {83 "numeric": 3884 }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 | DateOptionalcreditLines
Omit<CreateOrderCreditLineDTO, "order_id">[]