Loading...
Was this page helpful?
This documentation provides a reference to the throwUnlessStatusIsNotPaid. It belongs to the @medusajs/medusa/core-flows package.
This step validates that the order doesn't have an active payment collection.
1import { createWorkflow } from "@medusajs/framework/workflows-sdk"2import { throwUnlessStatusIsNotPaid } from "@medusajs/medusa/core-flows"3 4const myWorkflow = createWorkflow(5 "my-workflow",6 () => {7 const data = throwUnlessStatusIsNotPaid({8 "paymentCollection": {9 "id": "id_Jy5F8IvlKwaXGlwY",10 "currency_code": "ron",11 "amount": {12 "numeric": 4613 },14 "status": "partially_captured",15 "payment_providers": [{16 "id": "id_wKGWEvpSrI12",17 "is_enabled": true18 }]19 }20 })21 }22)
paymentCollectionPaymentCollectionDTOidstringcurrency_codestringamountBigNumberValuestatusPaymentCollectionStatuscompleted_atstring | DateOptionalcreated_atstring | DateOptionalupdated_atstring | DateOptionalmetadataRecord<string, unknown>Optional