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_xzCM28c88WF8fYQ",10 "currency_code": "iqd",11 "amount": {12 "numeric": 4813 },14 "status": "awaiting",15 "payment_providers": [{16 "id": "id_L4zxG4vkhYJy",17 "is_enabled": false18 }]19 }20 })21 }22)
paymentCollection
PaymentCollectionDTOid
stringcurrency_code
stringamount
BigNumberValuestatus
PaymentCollectionStatuscompleted_at
string | DateOptionalcreated_at
string | DateOptionalupdated_at
string | DateOptionalmetadata
Record<string, unknown>Optional