- Get Started
- Product
- Resources
- Tools & SDKs
- Framework
- Reference
Menu
- Get Started
- Product
- Resources
- Tools & SDKs
- Framework
- Reference
throwUnlessStatusIsNotPaid - Medusa Core Workflows Reference
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_azcYQBRz6KRyzen",10 "currency_code": "mnt",11 "amount": {12 "numeric": 1513 },14 "status": "completed",15 "payment_providers": [{16 "id": "id_Q46GidwN6Y",17 "is_enabled": false18 }]19 }20 })21 }22)
Input#
paymentCollection
PaymentCollectionDTOThe payment collection details.
paymentCollection
PaymentCollectionDTOid
stringThe ID of the payment collection.
id
stringcurrency_code
stringThe ISO 3 character currency code of the payment sessions and payments associated with payment collection.
currency_code
stringamount
BigNumberValueThe total amount to be authorized and captured.
amount
BigNumberValuestatus
PaymentCollectionStatusThe status of the payment collection.
status
PaymentCollectionStatusThe payment provider used to process the associated payment sessions and payments.
The amount authorized within the associated payment sessions.
The amount refunded within the associated payments.
The amount captured within the associated payments.
completed_at
string | DateOptionalWhen the payment collection was completed.
completed_at
string | DateOptionalcreated_at
string | DateOptionalWhen the payment collection was created.
created_at
string | DateOptionalupdated_at
string | DateOptionalWhen the payment collection was updated.
updated_at
string | DateOptionalmetadata
Record<string, unknown>OptionalHolds custom data in key-value pairs.
metadata
Record<string, unknown>OptionalThe associated payment sessions.
The associated payments.
Was this page helpful?