docs: [3/n] generate core-flows reference (#8784)

This commit is contained in:
Shahed Nasser authored and GitHub committed 2024-08-27 12:00:19 +03:00
1 parent b09c19912b
commit 82155257df
68 files changed
+1135

No files matched your search

@@ -0,0 +1,16 @@
---
slug: /references/medusa-workflows/steps/deleteLineItemsStep
sidebar_label: deleteLineItemsStep
---
import { TypeList, WorkflowDiagram } from "docs-ui"
# deleteLineItemsStep - Medusa Workflows API Reference
This documentation provides a reference to the `deleteLineItemsStep`. It belongs to the `@medusajs/core-flows` package.
This step deletes line items.
## Input
<TypeList types={[{"name":"string[]","type":"`string`[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"string","type":"`string`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deleteLineItemsStep"/>
@@ -0,0 +1,21 @@
---
slug: /references/medusa-workflows/steps/listLineItemsStep
sidebar_label: listLineItemsStep
---
import { TypeList, WorkflowDiagram } from "docs-ui"
# listLineItemsStep - Medusa Workflows API Reference
This documentation provides a reference to the `listLineItemsStep`. It belongs to the `@medusajs/core-flows` package.
This step retrieves a list of a cart's line items
matching the specified filters.
## Input
<TypeList types={[{"name":"ListLineItemsStepInput","type":"[ListLineItemsStepInput](../../../../interfaces/core_flows.ListLineItemsStepInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"filters","type":"[FilterableLineItemProps](../../../../../cart/interfaces/cart.FilterableLineItemProps/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string` \\| `string`[]","description":"The IDs to filter the line items by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"cart_id","type":"`string` \\| `string`[]","description":"Filter the line items by the ID of their associated cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"Filter the line items by their title.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_id","type":"`string` \\| `string`[]","description":"Filter the line items by the ID of their associated variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_id","type":"`string` \\| `string`[]","description":"Filter the line items by the ID of their associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([FilterableLineItemProps](../../../../../cart/interfaces/cart.FilterableLineItemProps/page.mdx) \\| [BaseFilterable](../../../../../cart/interfaces/cart.BaseFilterable/page.mdx)&#60;[FilterableLineItemProps](../../../../../cart/interfaces/cart.FilterableLineItemProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string` \\| `string`[]","description":"The IDs to filter the line items by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"cart_id","type":"`string` \\| `string`[]","description":"Filter the line items by the ID of their associated cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"Filter the line items by their title.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_id","type":"`string` \\| `string`[]","description":"Filter the line items by the ID of their associated variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_id","type":"`string` \\| `string`[]","description":"Filter the line items by the ID of their associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([FilterableLineItemProps](../../../../../cart/interfaces/cart.FilterableLineItemProps/page.mdx) \\| [BaseFilterable](../../../../../cart/interfaces/cart.BaseFilterable/page.mdx)&#60;[FilterableLineItemProps](../../../../../cart/interfaces/cart.FilterableLineItemProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterableLineItemProps](../../../../../cart/interfaces/cart.FilterableLineItemProps/page.mdx) \\| [BaseFilterable](../../../../../cart/interfaces/cart.BaseFilterable/page.mdx)&#60;[FilterableLineItemProps](../../../../../cart/interfaces/cart.FilterableLineItemProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([BaseFilterable](../../../../../cart/interfaces/cart.BaseFilterable/page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseFilterable](../../../../../cart/interfaces/cart.BaseFilterable/page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"$or","type":"([FilterableLineItemProps](../../../../../cart/interfaces/cart.FilterableLineItemProps/page.mdx) \\| [BaseFilterable](../../../../../cart/interfaces/cart.BaseFilterable/page.mdx)&#60;[FilterableLineItemProps](../../../../../cart/interfaces/cart.FilterableLineItemProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string` \\| `string`[]","description":"The IDs to filter the linLine truncated
## Output
<TypeList types={[{"name":"CartLineItemDTO[]","type":"[CartLineItemDTO](../../../../../cart/interfaces/cart.CartLineItemDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"CartLineItemDTO","type":"[CartLineItemDTO](../../../../../cart/interfaces/cart.CartLineItemDTO/page.mdx)","optional":false,"defaultValue":"","description":"The cart line item details.","expandable":false,"children":[{"name":"original_total","type":"[BigNumberValue](../../../../../cart/types/cart.BigNumberValue/page.mdx)","description":"The original total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../../../cart/types/cart.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"original_subtotal","type":"[BigNumberValue](../../../../../cart/types/cart.BigNumberValue/page.mdx)","description":"The original subtotal of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../../../cart/types/cart.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"original_tax_total","type":"[BigNumberValue](../../../../../cart/types/cart.BigNumberValue/page.mdx)","description":"The original tax total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../../../cart/types/cart.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"item_total","type":"[BigNumberValue](../../../../../cart/types/cart.BigNumberValue/page.mdx)","description":"The item total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../../../cart/types/cart.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"item_subtotal","type":"[BigNumberValue](../../../../../cart/types/cart.BigNumberValue/page.mdx)","description":"The item subtotal of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../../../cart/types/cart.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"item_tax_total","type":"[BigNumberValue](../../../../../cart/types/cart.BigNumberValue/page.mdx)","description":"The item tax total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../../../cart/types/cart.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"total","type":"[BigNumberValue](../../../../../cart/types/cart.BigNumberValue/page.mdx)","description":"The total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../../../cart/types/cart.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber",Line truncated
@@ -0,0 +1,20 @@
---
slug: /references/medusa-workflows/steps/updateLineItemsStepWithSelector
sidebar_label: updateLineItemsStepWithSelector
---
import { TypeList, WorkflowDiagram } from "docs-ui"
# updateLineItemsStepWithSelector - Medusa Workflows API Reference
This documentation provides a reference to the `updateLineItemsStepWithSelector`. It belongs to the `@medusajs/core-flows` package.
This step updates line items.
## Input
<TypeList types={[{"name":"UpdateLineItemWithSelectorDTO","type":"[UpdateLineItemWithSelectorDTO](../../../../../cart/interfaces/cart.UpdateLineItemWithSelectorDTO/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"selector","type":"Partial&#60;[CartLineItemDTO](../../../../../cart/interfaces/cart.CartLineItemDTO/page.mdx)&#62;","description":"Filters to specify which line items to update.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"original_total","type":"[BigNumberValue](../../../../../cart/types/cart.BigNumberValue/page.mdx)","description":"The original total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../../../cart/types/cart.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"original_subtotal","type":"[BigNumberValue](../../../../../cart/types/cart.BigNumberValue/page.mdx)","description":"The original subtotal of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../../../cart/types/cart.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"original_tax_total","type":"[BigNumberValue](../../../../../cart/types/cart.BigNumberValue/page.mdx)","description":"The original tax total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../../../cart/types/cart.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"item_total","type":"[BigNumberValue](../../../../../cart/types/cart.BigNumberValue/page.mdx)","description":"The item total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../../../cart/types/cart.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"item_subtotal","type":"[BigNumberValue](../../../../../cart/types/cart.BigNumberValue/page.mdx)","description":"The item subtotal of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../../../cart/types/cart.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"item_tax_total","type":"[BigNumberValue](../../../../../cart/types/cart.BigNumberValue/page.mdx)","description":"The item tax total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../../../cart/types/cart.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"total","type":"[BigNumberValue](../../../../../cart/types/cart.BigNumberValue/page.mdx)","description":"The total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../../../cart/types/cart.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaLine truncated
## Output
<TypeList types={[{"name":"CartLineItemDTO[]","type":"[CartLineItemDTO](../../../../../cart/interfaces/cart.CartLineItemDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"CartLineItemDTO","type":"[CartLineItemDTO](../../../../../cart/interfaces/cart.CartLineItemDTO/page.mdx)","optional":false,"defaultValue":"","description":"The cart line item details.","expandable":false,"children":[{"name":"original_total","type":"[BigNumberValue](../../../../../cart/types/cart.BigNumberValue/page.mdx)","description":"The original total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../../../cart/types/cart.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"original_subtotal","type":"[BigNumberValue](../../../../../cart/types/cart.BigNumberValue/page.mdx)","description":"The original subtotal of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../../../cart/types/cart.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"original_tax_total","type":"[BigNumberValue](../../../../../cart/types/cart.BigNumberValue/page.mdx)","description":"The original tax total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../../../cart/types/cart.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"item_total","type":"[BigNumberValue](../../../../../cart/types/cart.BigNumberValue/page.mdx)","description":"The item total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../../../cart/types/cart.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"item_subtotal","type":"[BigNumberValue](../../../../../cart/types/cart.BigNumberValue/page.mdx)","description":"The item subtotal of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../../../cart/types/cart.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"item_tax_total","type":"[BigNumberValue](../../../../../cart/types/cart.BigNumberValue/page.mdx)","description":"The item tax total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../../../cart/types/cart.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"total","type":"[BigNumberValue](../../../../../cart/types/cart.BigNumberValue/page.mdx)","description":"The total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../../../cart/types/cart.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber",Line truncated
@@ -0,0 +1,5 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# deleteLineItemsStepId
`Const` **deleteLineItemsStepId**: `"delete-line-items"`
@@ -0,0 +1,5 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# listLineItemsStepId
`Const` **listLineItemsStepId**: `"list-line-items"`
@@ -0,0 +1,5 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# updateLineItemsStepWithSelectorId
`Const` **updateLineItemsStepWithSelectorId**: `"update-line-items-with-selector"`
@@ -0,0 +1,20 @@
---
slug: /references/medusa-workflows/deleteLineItemsWorkflow
sidebar_label: deleteLineItemsWorkflow
---
import { TypeList, WorkflowDiagram } from "docs-ui"
# deleteLineItemsWorkflow - Medusa Workflows API Reference
This documentation provides a reference to the `deleteLineItemsWorkflow`. It belongs to the `@medusajs/core-flows` package.
This workflow deletes line items from a cart.
## Steps
<WorkflowDiagram workflow={{"name":"deleteLineItemsWorkflow","steps":[{"type":"step","name":"deleteLineItemsStep","description":"This step deletes line items.","link":"../../../../core_flows.Steps_Line_Item/page.mdx#deletelineitemsstep","depth":1},{"type":"workflow","name":"updateCartPromotionsWorkflow","description":"This workflow updates a cart's promotions.","link":"../../../../core_flows.Workflows_Cart/page.mdx#updatecartpromotionsworkflow","depth":2}]}} />
## Input
<TypeList types={[{"name":"DeleteLineItemsWorkflowInput","type":"[DeleteLineItemsWorkflowInput](../../../../types/core_flows.DeleteLineItemsWorkflowInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"cart_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"ids","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deleteLineItemsWorkflow"/>
@@ -0,0 +1,5 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# deleteLineItemsWorkflowId
`Const` **deleteLineItemsWorkflowId**: `"delete-line-items"`
@@ -0,0 +1,40 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# Steps\_Line Item
## deleteLineItemsStep
This step deletes line items.
### Input
<TypeList types={[{"name":"string[]","type":"`string`[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"string","type":"`string`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deleteLineItemsStep"/>
___
## listLineItemsStep
This step retrieves a list of a cart's line items
matching the specified filters.
### Input
<TypeList types={[{"name":"ListLineItemsStepInput","type":"[ListLineItemsStepInput](../../interfaces/core_flows.ListLineItemsStepInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"filters","type":"[FilterableLineItemProps](../../../cart/interfaces/cart.FilterableLineItemProps/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string` \\| `string`[]","description":"The IDs to filter the line items by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"cart_id","type":"`string` \\| `string`[]","description":"Filter the line items by the ID of their associated cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"Filter the line items by their title.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_id","type":"`string` \\| `string`[]","description":"Filter the line items by the ID of their associated variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_id","type":"`string` \\| `string`[]","description":"Filter the line items by the ID of their associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([FilterableLineItemProps](../../../cart/interfaces/cart.FilterableLineItemProps/page.mdx) \\| [BaseFilterable](../../../cart/interfaces/cart.BaseFilterable/page.mdx)&#60;[FilterableLineItemProps](../../../cart/interfaces/cart.FilterableLineItemProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string` \\| `string`[]","description":"The IDs to filter the line items by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"cart_id","type":"`string` \\| `string`[]","description":"Filter the line items by the ID of their associated cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"Filter the line items by their title.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_id","type":"`string` \\| `string`[]","description":"Filter the line items by the ID of their associated variant.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"product_id","type":"`string` \\| `string`[]","description":"Filter the line items by the ID of their associated product.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([FilterableLineItemProps](../../../cart/interfaces/cart.FilterableLineItemProps/page.mdx) \\| [BaseFilterable](../../../cart/interfaces/cart.BaseFilterable/page.mdx)&#60;[FilterableLineItemProps](../../../cart/interfaces/cart.FilterableLineItemProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterableLineItemProps](../../../cart/interfaces/cart.FilterableLineItemProps/page.mdx) \\| [BaseFilterable](../../../cart/interfaces/cart.BaseFilterable/page.mdx)&#60;[FilterableLineItemProps](../../../cart/interfaces/cart.FilterableLineItemProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([BaseFilterable](../../../cart/interfaces/cart.BaseFilterable/page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseFilterable](../../../cart/interfaces/cart.BaseFilterable/page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"$or","type":"([FilterableLineItemProps](../../../cart/interfaces/cart.FilterableLineItemProps/page.mdx) \\| [BaseFilterable](../../../cart/interfaces/cart.BaseFilterable/page.mdx)&#60;[FilterableLineItemProps](../../../cart/interfaces/cart.FilterableLineItemProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string` \\| `string`[]","description":"The IDs to filter the line items by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"cart_iLine truncated
### Output
<TypeList types={[{"name":"CartLineItemDTO[]","type":"[CartLineItemDTO](../../../cart/interfaces/cart.CartLineItemDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"CartLineItemDTO","type":"[CartLineItemDTO](../../../cart/interfaces/cart.CartLineItemDTO/page.mdx)","optional":false,"defaultValue":"","description":"The cart line item details.","expandable":false,"children":[{"name":"original_total","type":"[BigNumberValue](../../../cart/types/cart.BigNumberValue/page.mdx)","description":"The original total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../cart/types/cart.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"original_subtotal","type":"[BigNumberValue](../../../cart/types/cart.BigNumberValue/page.mdx)","description":"The original subtotal of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../cart/types/cart.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"original_tax_total","type":"[BigNumberValue](../../../cart/types/cart.BigNumberValue/page.mdx)","description":"The original tax total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../cart/types/cart.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"item_total","type":"[BigNumberValue](../../../cart/types/cart.BigNumberValue/page.mdx)","description":"The item total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../cart/types/cart.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"item_subtotal","type":"[BigNumberValue](../../../cart/types/cart.BigNumberValue/page.mdx)","description":"The item subtotal of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../cart/types/cart.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"item_tax_total","type":"[BigNumberValue](../../../cart/types/cart.BigNumberValue/page.mdx)","description":"The item tax total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../cart/types/cart.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"total","type":"[BigNumberValue](../../../cart/types/cart.BigNumberValue/page.mdx)","description":"The total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../cart/types/cart.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"chilLine truncated
___
## updateLineItemsStepWithSelector
This step updates line items.
### Input
<TypeList types={[{"name":"UpdateLineItemWithSelectorDTO","type":"[UpdateLineItemWithSelectorDTO](../../../cart/interfaces/cart.UpdateLineItemWithSelectorDTO/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"selector","type":"Partial&#60;[CartLineItemDTO](../../../cart/interfaces/cart.CartLineItemDTO/page.mdx)&#62;","description":"Filters to specify which line items to update.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"original_total","type":"[BigNumberValue](../../../cart/types/cart.BigNumberValue/page.mdx)","description":"The original total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../cart/types/cart.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"original_subtotal","type":"[BigNumberValue](../../../cart/types/cart.BigNumberValue/page.mdx)","description":"The original subtotal of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../cart/types/cart.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"original_tax_total","type":"[BigNumberValue](../../../cart/types/cart.BigNumberValue/page.mdx)","description":"The original tax total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../cart/types/cart.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"item_total","type":"[BigNumberValue](../../../cart/types/cart.BigNumberValue/page.mdx)","description":"The item total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../cart/types/cart.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"item_subtotal","type":"[BigNumberValue](../../../cart/types/cart.BigNumberValue/page.mdx)","description":"The item subtotal of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../cart/types/cart.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"item_tax_total","type":"[BigNumberValue](../../../cart/types/cart.BigNumberValue/page.mdx)","description":"The item tax total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../cart/types/cart.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"total","type":"[BigNumberValue](../../../cart/types/cart.BigNumberValue/page.mdx)","description":"The total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../cart/types/cart.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","descripLine truncated
### Output
<TypeList types={[{"name":"CartLineItemDTO[]","type":"[CartLineItemDTO](../../../cart/interfaces/cart.CartLineItemDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"CartLineItemDTO","type":"[CartLineItemDTO](../../../cart/interfaces/cart.CartLineItemDTO/page.mdx)","optional":false,"defaultValue":"","description":"The cart line item details.","expandable":false,"children":[{"name":"original_total","type":"[BigNumberValue](../../../cart/types/cart.BigNumberValue/page.mdx)","description":"The original total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../cart/types/cart.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"original_subtotal","type":"[BigNumberValue](../../../cart/types/cart.BigNumberValue/page.mdx)","description":"The original subtotal of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../cart/types/cart.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"original_tax_total","type":"[BigNumberValue](../../../cart/types/cart.BigNumberValue/page.mdx)","description":"The original tax total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../cart/types/cart.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"item_total","type":"[BigNumberValue](../../../cart/types/cart.BigNumberValue/page.mdx)","description":"The item total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../cart/types/cart.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"item_subtotal","type":"[BigNumberValue](../../../cart/types/cart.BigNumberValue/page.mdx)","description":"The item subtotal of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../cart/types/cart.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"item_tax_total","type":"[BigNumberValue](../../../cart/types/cart.BigNumberValue/page.mdx)","description":"The item tax total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../cart/types/cart.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"total","type":"[BigNumberValue](../../../cart/types/cart.BigNumberValue/page.mdx)","description":"The total of the cart line item.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../cart/types/cart.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"chilLine truncated
@@ -0,0 +1,15 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# Workflows\_Line Item
## deleteLineItemsWorkflow
This workflow deletes line items from a cart.
### Steps
<WorkflowDiagram workflow={{"name":"deleteLineItemsWorkflow","steps":[{"type":"step","name":"deleteLineItemsStep","description":"This step deletes line items.","link":"../../core_flows.Steps_Line_Item/page.mdx#deletelineitemsstep","depth":1},{"type":"workflow","name":"updateCartPromotionsWorkflow","description":"This workflow updates a cart's promotions.","link":"../../core_flows.Workflows_Cart/page.mdx#updatecartpromotionsworkflow","depth":2}]}} />
### Input
<TypeList types={[{"name":"DeleteLineItemsWorkflowInput","type":"[DeleteLineItemsWorkflowInput](../../types/core_flows.DeleteLineItemsWorkflowInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"cart_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"ids","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deleteLineItemsWorkflow"/>
@@ -0,0 +1,3 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# Steps\_Notification
@@ -0,0 +1,20 @@
---
slug: /references/medusa-workflows/steps/authorizePaymentSessionStep
sidebar_label: authorizePaymentSessionStep
---
import { TypeList, WorkflowDiagram } from "docs-ui"
# authorizePaymentSessionStep - Medusa Workflows API Reference
This documentation provides a reference to the `authorizePaymentSessionStep`. It belongs to the `@medusajs/core-flows` package.
This step authorizes a payment session.
## Input
<TypeList types={[{"name":"AuthorizePaymentSessionStepInput","type":"[AuthorizePaymentSessionStepInput](../../../../types/core_flows.AuthorizePaymentSessionStepInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"`Record<string, unknown>`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="authorizePaymentSessionStep"/>
## Output
<TypeList types={[{"name":"PaymentDTO","type":"[PaymentDTO](../../../../../payment/interfaces/payment.PaymentDTO/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the payment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberValue](../../../../../payment/types/payment.BigNumberValue/page.mdx)","description":"The payment's total amount.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../../../payment/types/payment.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"currency_code","type":"`string`","description":"The ISO 3 character currency code of the payment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The ID of the associated payment provider.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_collection_id","type":"`string`","description":"The ID of the associated payment collection.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_amount","type":"[BigNumberValue](../../../../../payment/types/payment.BigNumberValue/page.mdx)","description":"The raw amount of the payment.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../../../payment/types/payment.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"authorized_amount","type":"[BigNumberValue](../../../../../payment/types/payment.BigNumberValue/page.mdx)","description":"The authorized amount of the payment.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../../../payment/types/payment.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"raw_authorized_amount","type":"[BigNumberValue](../../../../../payment/types/payment.BigNumberValue/page.mdx)","description":"The raw authorized amount of the payment.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../../../payment/types/payment.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"cart_id","type":"`string`","description":"The ID of the associated cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order_id","type":"`string`","description":"The ID of the associated order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order_edit_id","type":"`string`","description":"The ID of the associated order edit.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`string`","description":"The ID of the associated customer.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>`","description":"The data relevant for the payment provider to process the payment.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the payment was cLine truncated
@@ -0,0 +1,16 @@
---
slug: /references/medusa-workflows/steps/cancelPaymentStep
sidebar_label: cancelPaymentStep
---
import { TypeList, WorkflowDiagram } from "docs-ui"
# cancelPaymentStep - Medusa Workflows API Reference
This documentation provides a reference to the `cancelPaymentStep`. It belongs to the `@medusajs/core-flows` package.
This step cancels one or more payments.
## Input
<TypeList types={[{"name":"CancelPaymentStepInput","type":"[CancelPaymentStepInput](../../../../types/core_flows.CancelPaymentStepInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"paymentIds","type":"`string` \\| `string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="cancelPaymentStep"/>
@@ -0,0 +1,20 @@
---
slug: /references/medusa-workflows/steps/capturePaymentStep
sidebar_label: capturePaymentStep
---
import { TypeList, WorkflowDiagram } from "docs-ui"
# capturePaymentStep - Medusa Workflows API Reference
This documentation provides a reference to the `capturePaymentStep`. It belongs to the `@medusajs/core-flows` package.
This step captures a payment.
## Input
<TypeList types={[{"name":"CapturePaymentStepInput","type":"[CapturePaymentStepInput](../../../../types/core_flows.CapturePaymentStepInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"payment_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"captured_by","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberInput](../../../../../types/types/types.BigNumberInput/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../../../types/types/types.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="capturePaymentStep"/>
## Output
<TypeList types={[{"name":"PaymentDTO","type":"[PaymentDTO](../../../../../payment/interfaces/payment.PaymentDTO/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the payment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberValue](../../../../../payment/types/payment.BigNumberValue/page.mdx)","description":"The payment's total amount.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../../../payment/types/payment.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"currency_code","type":"`string`","description":"The ISO 3 character currency code of the payment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The ID of the associated payment provider.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_collection_id","type":"`string`","description":"The ID of the associated payment collection.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_amount","type":"[BigNumberValue](../../../../../payment/types/payment.BigNumberValue/page.mdx)","description":"The raw amount of the payment.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../../../payment/types/payment.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"authorized_amount","type":"[BigNumberValue](../../../../../payment/types/payment.BigNumberValue/page.mdx)","description":"The authorized amount of the payment.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../../../payment/types/payment.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"raw_authorized_amount","type":"[BigNumberValue](../../../../../payment/types/payment.BigNumberValue/page.mdx)","description":"The raw authorized amount of the payment.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../../../payment/types/payment.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"cart_id","type":"`string`","description":"The ID of the associated cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order_id","type":"`string`","description":"The ID of the associated order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order_edit_id","type":"`string`","description":"The ID of the associated order edit.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`string`","description":"The ID of the associated customer.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>`","description":"The data relevant for the payment provider to process the payment.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the payment was cLine truncated
@@ -0,0 +1,20 @@
---
slug: /references/medusa-workflows/steps/refundPaymentStep
sidebar_label: refundPaymentStep
---
import { TypeList, WorkflowDiagram } from "docs-ui"
# refundPaymentStep - Medusa Workflows API Reference
This documentation provides a reference to the `refundPaymentStep`. It belongs to the `@medusajs/core-flows` package.
This step refunds a payment.
## Input
<TypeList types={[{"name":"RefundPaymentStepInput","type":"[RefundPaymentStepInput](../../../../types/core_flows.RefundPaymentStepInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"payment_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberInput](../../../../../types/types/types.BigNumberInput/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../../../types/types/types.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="refundPaymentStep"/>
## Output
<TypeList types={[{"name":"PaymentDTO","type":"[PaymentDTO](../../../../../payment/interfaces/payment.PaymentDTO/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the payment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberValue](../../../../../payment/types/payment.BigNumberValue/page.mdx)","description":"The payment's total amount.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../../../payment/types/payment.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"currency_code","type":"`string`","description":"The ISO 3 character currency code of the payment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The ID of the associated payment provider.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_collection_id","type":"`string`","description":"The ID of the associated payment collection.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_amount","type":"[BigNumberValue](../../../../../payment/types/payment.BigNumberValue/page.mdx)","description":"The raw amount of the payment.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../../../payment/types/payment.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"authorized_amount","type":"[BigNumberValue](../../../../../payment/types/payment.BigNumberValue/page.mdx)","description":"The authorized amount of the payment.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../../../payment/types/payment.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"raw_authorized_amount","type":"[BigNumberValue](../../../../../payment/types/payment.BigNumberValue/page.mdx)","description":"The raw authorized amount of the payment.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../../../payment/types/payment.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"cart_id","type":"`string`","description":"The ID of the associated cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order_id","type":"`string`","description":"The ID of the associated order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order_edit_id","type":"`string`","description":"The ID of the associated order edit.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`string`","description":"The ID of the associated customer.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>`","description":"The data relevant for the payment provider to process the payment.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the payment was cLine truncated
@@ -0,0 +1,5 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# authorizePaymentSessionStepId
`Const` **authorizePaymentSessionStepId**: `"authorize-payment-session-step"`
@@ -0,0 +1,5 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# cancelPaymentStepId
`Const` **cancelPaymentStepId**: `"cancel-payment-step"`
@@ -0,0 +1,5 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# capturePaymentStepId
`Const` **capturePaymentStepId**: `"capture-payment-step"`
@@ -0,0 +1,5 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# refundPaymentStepId
`Const` **refundPaymentStepId**: `"refund-payment-step"`
@@ -0,0 +1,24 @@
---
slug: /references/medusa-workflows/capturePaymentWorkflow
sidebar_label: capturePaymentWorkflow
---
import { TypeList, WorkflowDiagram } from "docs-ui"
# capturePaymentWorkflow - Medusa Workflows API Reference
This documentation provides a reference to the `capturePaymentWorkflow`. It belongs to the `@medusajs/core-flows` package.
This workflow captures a payment.
## Steps
<WorkflowDiagram workflow={{"name":"capturePaymentWorkflow","steps":[{"type":"step","name":"capturePaymentStep","description":"This step captures a payment.","link":"../../../../core_flows.Steps_Payment/page.mdx#capturepaymentstep","depth":1},{"type":"step","name":"useRemoteQueryStep","description":"This step fetches data across modules using the remote query.\n\nLearn more in the [Remote Query documentation](https://docs.medusajs.com/v2/advanced-development/modules/remote-query).\n\n","link":"../../../../core_flows.Steps_Common/page.mdx#useremotequerystep","depth":2},{"type":"when","condition":"{\n return !!orderPayment?.order?.id\n }","depth":"3","steps":[{"type":"step","name":"addOrderTransactionStep","description":"This step creates an order transaction.","link":"../../../../core_flows.Steps_Order/page.mdx#addordertransactionstep","depth":3}]},{"type":"step","name":"emitEventStep","description":"Emit an event.\n\n","link":"../../../../core_flows.Steps_Common/page.mdx#emiteventstep","depth":4}]}} />
## Input
<TypeList types={[{"name":"payment_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"captured_by","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberInput](../../../../../types/types/types.BigNumberInput/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../../../types/types/types.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="capturePaymentWorkflow"/>
## Output
<TypeList types={[{"name":"PaymentDTO","type":"[PaymentDTO](../../../../../payment/interfaces/payment.PaymentDTO/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the payment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberValue](../../../../../payment/types/payment.BigNumberValue/page.mdx)","description":"The payment's total amount.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../../../payment/types/payment.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"currency_code","type":"`string`","description":"The ISO 3 character currency code of the payment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The ID of the associated payment provider.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_collection_id","type":"`string`","description":"The ID of the associated payment collection.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_amount","type":"[BigNumberValue](../../../../../payment/types/payment.BigNumberValue/page.mdx)","description":"The raw amount of the payment.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../../../payment/types/payment.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"authorized_amount","type":"[BigNumberValue](../../../../../payment/types/payment.BigNumberValue/page.mdx)","description":"The authorized amount of the payment.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../../../payment/types/payment.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"raw_authorized_amount","type":"[BigNumberValue](../../../../../payment/types/payment.BigNumberValue/page.mdx)","description":"The raw authorized amount of the payment.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../../../payment/types/payment.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"cart_id","type":"`string`","description":"The ID of the associated cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order_id","type":"`string`","description":"The ID of the associated order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order_edit_id","type":"`string`","description":"The ID of the associated order edit.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`string`","description":"The ID of the associated customer.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>`","description":"The data relevant for the payment provider to process the payment.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the payment was cLine truncated
@@ -0,0 +1,24 @@
---
slug: /references/medusa-workflows/refundPaymentWorkflow
sidebar_label: refundPaymentWorkflow
---
import { TypeList, WorkflowDiagram } from "docs-ui"
# refundPaymentWorkflow - Medusa Workflows API Reference
This documentation provides a reference to the `refundPaymentWorkflow`. It belongs to the `@medusajs/core-flows` package.
This workflow refunds a payment.
## Steps
<WorkflowDiagram workflow={{"name":"refundPaymentWorkflow","steps":[{"type":"step","name":"refundPaymentStep","description":"This step refunds a payment.","link":"../../../../core_flows.Steps_Payment/page.mdx#refundpaymentstep","depth":1},{"type":"step","name":"useRemoteQueryStep","description":"This step fetches data across modules using the remote query.\n\nLearn more in the [Remote Query documentation](https://docs.medusajs.com/v2/advanced-development/modules/remote-query).\n\n","link":"../../../../core_flows.Steps_Common/page.mdx#useremotequerystep","depth":2},{"type":"when","condition":"{\n return !!orderPayment?.order?.id\n }","depth":"3","steps":[{"type":"step","name":"addOrderTransactionStep","description":"This step creates an order transaction.","link":"../../../../core_flows.Steps_Order/page.mdx#addordertransactionstep","depth":3}]},{"type":"step","name":"emitEventStep","description":"Emit an event.\n\n","link":"../../../../core_flows.Steps_Common/page.mdx#emiteventstep","depth":4}]}} />
## Input
<TypeList types={[{"name":"payment_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberInput](../../../../../types/types/types.BigNumberInput/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../../../types/types/types.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="refundPaymentWorkflow"/>
## Output
<TypeList types={[{"name":"PaymentDTO","type":"[PaymentDTO](../../../../../payment/interfaces/payment.PaymentDTO/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the payment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberValue](../../../../../payment/types/payment.BigNumberValue/page.mdx)","description":"The payment's total amount.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../../../payment/types/payment.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"currency_code","type":"`string`","description":"The ISO 3 character currency code of the payment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The ID of the associated payment provider.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_collection_id","type":"`string`","description":"The ID of the associated payment collection.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_amount","type":"[BigNumberValue](../../../../../payment/types/payment.BigNumberValue/page.mdx)","description":"The raw amount of the payment.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../../../payment/types/payment.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"authorized_amount","type":"[BigNumberValue](../../../../../payment/types/payment.BigNumberValue/page.mdx)","description":"The authorized amount of the payment.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../../../payment/types/payment.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"raw_authorized_amount","type":"[BigNumberValue](../../../../../payment/types/payment.BigNumberValue/page.mdx)","description":"The raw authorized amount of the payment.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../../../payment/types/payment.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"cart_id","type":"`string`","description":"The ID of the associated cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order_id","type":"`string`","description":"The ID of the associated order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order_edit_id","type":"`string`","description":"The ID of the associated order edit.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`string`","description":"The ID of the associated customer.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>`","description":"The data relevant for the payment provider to process the payment.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the payment was cLine truncated
@@ -0,0 +1,5 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# capturePaymentWorkflowId
`Const` **capturePaymentWorkflowId**: `"capture-payment-workflow"`
@@ -0,0 +1,5 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# refundPaymentWorkflowId
`Const` **refundPaymentWorkflowId**: `"refund-payment-workflow"`
@@ -0,0 +1,53 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# Steps\_Payment
## authorizePaymentSessionStep
This step authorizes a payment session.
### Input
<TypeList types={[{"name":"AuthorizePaymentSessionStepInput","type":"[AuthorizePaymentSessionStepInput](../../types/core_flows.AuthorizePaymentSessionStepInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"`Record<string, unknown>`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="authorizePaymentSessionStep"/>
### Output
<TypeList types={[{"name":"PaymentDTO","type":"[PaymentDTO](../../../payment/interfaces/payment.PaymentDTO/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the payment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberValue](../../../payment/types/payment.BigNumberValue/page.mdx)","description":"The payment's total amount.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../payment/types/payment.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"currency_code","type":"`string`","description":"The ISO 3 character currency code of the payment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The ID of the associated payment provider.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_collection_id","type":"`string`","description":"The ID of the associated payment collection.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_amount","type":"[BigNumberValue](../../../payment/types/payment.BigNumberValue/page.mdx)","description":"The raw amount of the payment.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../payment/types/payment.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"authorized_amount","type":"[BigNumberValue](../../../payment/types/payment.BigNumberValue/page.mdx)","description":"The authorized amount of the payment.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../payment/types/payment.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"raw_authorized_amount","type":"[BigNumberValue](../../../payment/types/payment.BigNumberValue/page.mdx)","description":"The raw authorized amount of the payment.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../payment/types/payment.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"cart_id","type":"`string`","description":"The ID of the associated cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order_id","type":"`string`","description":"The ID of the associated order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order_edit_id","type":"`string`","description":"The ID of the associated order edit.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`string`","description":"The ID of the associated customer.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>`","description":"The data relevant for the payment provider to process the payment.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the payment was created.","optional":true,"defaultValue":"","expandableLine truncated
___
## cancelPaymentStep
This step cancels one or more payments.
### Input
<TypeList types={[{"name":"CancelPaymentStepInput","type":"[CancelPaymentStepInput](../../types/core_flows.CancelPaymentStepInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"paymentIds","type":"`string` \\| `string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="cancelPaymentStep"/>
___
## capturePaymentStep
This step captures a payment.
### Input
<TypeList types={[{"name":"CapturePaymentStepInput","type":"[CapturePaymentStepInput](../../types/core_flows.CapturePaymentStepInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"payment_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"captured_by","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberInput](../../../types/types/types.BigNumberInput/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../types/types/types.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="capturePaymentStep"/>
### Output
<TypeList types={[{"name":"PaymentDTO","type":"[PaymentDTO](../../../payment/interfaces/payment.PaymentDTO/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the payment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberValue](../../../payment/types/payment.BigNumberValue/page.mdx)","description":"The payment's total amount.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../payment/types/payment.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"currency_code","type":"`string`","description":"The ISO 3 character currency code of the payment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The ID of the associated payment provider.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_collection_id","type":"`string`","description":"The ID of the associated payment collection.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_amount","type":"[BigNumberValue](../../../payment/types/payment.BigNumberValue/page.mdx)","description":"The raw amount of the payment.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../payment/types/payment.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"authorized_amount","type":"[BigNumberValue](../../../payment/types/payment.BigNumberValue/page.mdx)","description":"The authorized amount of the payment.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../payment/types/payment.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"raw_authorized_amount","type":"[BigNumberValue](../../../payment/types/payment.BigNumberValue/page.mdx)","description":"The raw authorized amount of the payment.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../payment/types/payment.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"cart_id","type":"`string`","description":"The ID of the associated cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order_id","type":"`string`","description":"The ID of the associated order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order_edit_id","type":"`string`","description":"The ID of the associated order edit.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`string`","description":"The ID of the associated customer.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>`","description":"The data relevant for the payment provider to process the payment.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the payment was created.","optional":true,"defaultValue":"","expandableLine truncated
___
## refundPaymentStep
This step refunds a payment.
### Input
<TypeList types={[{"name":"RefundPaymentStepInput","type":"[RefundPaymentStepInput](../../types/core_flows.RefundPaymentStepInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"payment_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberInput](../../../types/types/types.BigNumberInput/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../types/types/types.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="refundPaymentStep"/>
### Output
<TypeList types={[{"name":"PaymentDTO","type":"[PaymentDTO](../../../payment/interfaces/payment.PaymentDTO/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the payment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberValue](../../../payment/types/payment.BigNumberValue/page.mdx)","description":"The payment's total amount.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../payment/types/payment.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"currency_code","type":"`string`","description":"The ISO 3 character currency code of the payment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The ID of the associated payment provider.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_collection_id","type":"`string`","description":"The ID of the associated payment collection.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_amount","type":"[BigNumberValue](../../../payment/types/payment.BigNumberValue/page.mdx)","description":"The raw amount of the payment.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../payment/types/payment.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"authorized_amount","type":"[BigNumberValue](../../../payment/types/payment.BigNumberValue/page.mdx)","description":"The authorized amount of the payment.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../payment/types/payment.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"raw_authorized_amount","type":"[BigNumberValue](../../../payment/types/payment.BigNumberValue/page.mdx)","description":"The raw authorized amount of the payment.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../payment/types/payment.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"cart_id","type":"`string`","description":"The ID of the associated cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order_id","type":"`string`","description":"The ID of the associated order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order_edit_id","type":"`string`","description":"The ID of the associated order edit.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`string`","description":"The ID of the associated customer.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>`","description":"The data relevant for the payment provider to process the payment.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the payment was created.","optional":true,"defaultValue":"","expandableLine truncated
@@ -0,0 +1,37 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# Workflows\_Payment
## capturePaymentWorkflow
This workflow captures a payment.
### Steps
<WorkflowDiagram workflow={{"name":"capturePaymentWorkflow","steps":[{"type":"step","name":"capturePaymentStep","description":"This step captures a payment.","link":"../../core_flows.Steps_Payment/page.mdx#capturepaymentstep","depth":1},{"type":"step","name":"useRemoteQueryStep","description":"This step fetches data across modules using the remote query.\n\nLearn more in the [Remote Query documentation](https://docs.medusajs.com/v2/advanced-development/modules/remote-query).\n\n","link":"../../core_flows.Steps_Common/page.mdx#useremotequerystep","depth":2},{"type":"when","condition":"{\n return !!orderPayment?.order?.id\n }","depth":"3","steps":[{"type":"step","name":"addOrderTransactionStep","description":"This step creates an order transaction.","link":"../../core_flows.Steps_Order/page.mdx#addordertransactionstep","depth":3}]},{"type":"step","name":"emitEventStep","description":"Emit an event.\n\n","link":"../../core_flows.Steps_Common/page.mdx#emiteventstep","depth":4}]}} />
### Input
<TypeList types={[{"name":"payment_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"captured_by","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberInput](../../../types/types/types.BigNumberInput/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../types/types/types.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="capturePaymentWorkflow"/>
### Output
<TypeList types={[{"name":"PaymentDTO","type":"[PaymentDTO](../../../payment/interfaces/payment.PaymentDTO/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the payment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberValue](../../../payment/types/payment.BigNumberValue/page.mdx)","description":"The payment's total amount.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../payment/types/payment.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"currency_code","type":"`string`","description":"The ISO 3 character currency code of the payment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The ID of the associated payment provider.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_collection_id","type":"`string`","description":"The ID of the associated payment collection.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_amount","type":"[BigNumberValue](../../../payment/types/payment.BigNumberValue/page.mdx)","description":"The raw amount of the payment.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../payment/types/payment.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"authorized_amount","type":"[BigNumberValue](../../../payment/types/payment.BigNumberValue/page.mdx)","description":"The authorized amount of the payment.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../payment/types/payment.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"raw_authorized_amount","type":"[BigNumberValue](../../../payment/types/payment.BigNumberValue/page.mdx)","description":"The raw authorized amount of the payment.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../payment/types/payment.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"cart_id","type":"`string`","description":"The ID of the associated cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order_id","type":"`string`","description":"The ID of the associated order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order_edit_id","type":"`string`","description":"The ID of the associated order edit.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`string`","description":"The ID of the associated customer.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>`","description":"The data relevant for the payment provider to process the payment.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the payment was created.","optional":true,"defaultValue":"","expandableLine truncated
___
## refundPaymentWorkflow
This workflow refunds a payment.
### Steps
<WorkflowDiagram workflow={{"name":"refundPaymentWorkflow","steps":[{"type":"step","name":"refundPaymentStep","description":"This step refunds a payment.","link":"../../core_flows.Steps_Payment/page.mdx#refundpaymentstep","depth":1},{"type":"step","name":"useRemoteQueryStep","description":"This step fetches data across modules using the remote query.\n\nLearn more in the [Remote Query documentation](https://docs.medusajs.com/v2/advanced-development/modules/remote-query).\n\n","link":"../../core_flows.Steps_Common/page.mdx#useremotequerystep","depth":2},{"type":"when","condition":"{\n return !!orderPayment?.order?.id\n }","depth":"3","steps":[{"type":"step","name":"addOrderTransactionStep","description":"This step creates an order transaction.","link":"../../core_flows.Steps_Order/page.mdx#addordertransactionstep","depth":3}]},{"type":"step","name":"emitEventStep","description":"Emit an event.\n\n","link":"../../core_flows.Steps_Common/page.mdx#emiteventstep","depth":4}]}} />
### Input
<TypeList types={[{"name":"payment_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberInput](../../../types/types/types.BigNumberInput/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../types/types/types.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="refundPaymentWorkflow"/>
### Output
<TypeList types={[{"name":"PaymentDTO","type":"[PaymentDTO](../../../payment/interfaces/payment.PaymentDTO/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the payment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberValue](../../../payment/types/payment.BigNumberValue/page.mdx)","description":"The payment's total amount.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../payment/types/payment.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"currency_code","type":"`string`","description":"The ISO 3 character currency code of the payment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The ID of the associated payment provider.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_collection_id","type":"`string`","description":"The ID of the associated payment collection.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw_amount","type":"[BigNumberValue](../../../payment/types/payment.BigNumberValue/page.mdx)","description":"The raw amount of the payment.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../payment/types/payment.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"authorized_amount","type":"[BigNumberValue](../../../payment/types/payment.BigNumberValue/page.mdx)","description":"The authorized amount of the payment.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../payment/types/payment.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"raw_authorized_amount","type":"[BigNumberValue](../../../payment/types/payment.BigNumberValue/page.mdx)","description":"The raw authorized amount of the payment.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../payment/types/payment.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"cart_id","type":"`string`","description":"The ID of the associated cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order_id","type":"`string`","description":"The ID of the associated order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order_edit_id","type":"`string`","description":"The ID of the associated order edit.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`string`","description":"The ID of the associated customer.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>`","description":"The data relevant for the payment provider to process the payment.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the payment was created.","optional":true,"defaultValue":"","expandableLine truncated
@@ -0,0 +1,20 @@
---
slug: /references/medusa-workflows/steps/createPaymentSessionStep
sidebar_label: createPaymentSessionStep
---
import { TypeList, WorkflowDiagram } from "docs-ui"
# createPaymentSessionStep - Medusa Workflows API Reference
This documentation provides a reference to the `createPaymentSessionStep`. It belongs to the `@medusajs/core-flows` package.
This step creates a payment session.
## Input
<TypeList types={[{"name":"CreatePaymentSessionStepInput","type":"[CreatePaymentSessionStepInput](../../../../interfaces/core_flows.CreatePaymentSessionStepInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"payment_collection_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberInput](../../../../../types/types/types.BigNumberInput/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../../../types/types/types.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"currency_code","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[PaymentProviderContext](../../../../../payment/interfaces/payment.PaymentProviderContext/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"billing_address","type":"Partial&#60;[AddressDTO](../../../../../payment/types/payment.AddressDTO/page.mdx)&#62;","description":"The payment's billing address.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"address_1","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string` \\| `null`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string` \\| `null`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string` \\| `null`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string` \\| `null`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`string` \\| `null`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`string` \\| `null`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>` \\| `null`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`string` \\| `Date` \\| `null`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"email","type":"`string`","description":"The associated customer's email.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"session_id","type":"`string`","description":"The ID of payment session the provider payment is associated with.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"customer","type":"Partial&#60;[CustomerDTO](../../../../../payment/interfaces/payment.CustomerDTO/page.mdx)&#62;","description":"The customer associated with this payment.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`string`","description":"The email of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"has_account","type":"`boolean`","description":"A flag indicating if customer has an account or not.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"default_billing_address_id","type":"`null` \\| `string`","description":"The associated default billing address's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"default_shipping_address_id","typeLine truncated
## Output
<TypeList types={[{"name":"PaymentSessionDTO","type":"[PaymentSessionDTO](../../../../../payment/interfaces/payment.PaymentSessionDTO/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the payment session.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberValue](../../../../../payment/types/payment.BigNumberValue/page.mdx)","description":"The amount to authorize.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../../../payment/types/payment.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"currency_code","type":"`string`","description":"The 3 character currency code of the payment session.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The ID of the associated payment provider.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>`","description":"The data necessary for the payment provider to process the payment session.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[PaymentSessionStatus](../../../../../payment/types/payment.PaymentSessionStatus/page.mdx)","description":"The status of the payment session.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_collection_id","type":"`string`","description":"The ID of the associated payment collection.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"`Record<string, unknown>`","description":"The context necessary for the payment provider.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"authorized_at","type":"`Date`","description":"When the payment session was authorized.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_collection","type":"[PaymentCollectionDTO](../../../../../payment/interfaces/payment.PaymentCollectionDTO/page.mdx)","description":"The payment collection the session is associated with.","optional":true,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The ID of the payment collection.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The ISO 3 character currency code of the payment sessions and payments associated with payment collection.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`string`","description":"The id of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberValue](../../../../../payment/types/payment.BigNumberValue/page.mdx)","description":"The total amount to be authorized and captured.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../../../payment/types/payment.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"status","type":"[PaymentCollectionStatus](../../../../../payment/types/payment.PaymentCollectionStatus/page.mdx)","description":"The status of the payment collection.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_providers","type":"[PaymentProviderDTO](../../../../../payment/interfaces/payment.PaymentProviderDTO/page.mdx)[]","description":"The payment provider used to process the associated payment sessions and payments.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The ID of the payment provider.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_enabled","type":"`string`","description":"Whether the payment provider is enabled.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"authorized_amount","type":"[BigNumberValue](../../../../../payment/types/payment.BigNumberValue/page.mdx)","description":"The amount authorized within the assLine truncated
@@ -0,0 +1,20 @@
---
slug: /references/medusa-workflows/steps/createRefundReasonStep
sidebar_label: createRefundReasonStep
---
import { TypeList, WorkflowDiagram } from "docs-ui"
# createRefundReasonStep - Medusa Workflows API Reference
This documentation provides a reference to the `createRefundReasonStep`. It belongs to the `@medusajs/core-flows` package.
This step creates one or more refund reasons.
## Input
<TypeList types={[{"name":"CreateRefundReasonDTO[]","type":"[CreateRefundReasonDTO](../../../../../payment/interfaces/payment.CreateRefundReasonDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"CreateRefundReasonDTO","type":"[CreateRefundReasonDTO](../../../../../payment/interfaces/payment.CreateRefundReasonDTO/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"label","type":"`string`","description":"The label of the refund reason","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the refund reason","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"The metadata of the refund reason","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createRefundReasonStep"/>
## Output
<TypeList types={[{"name":"RefundReasonDTO[]","type":"[RefundReasonDTO](../../../../../payment/interfaces/payment.RefundReasonDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"RefundReasonDTO","type":"[RefundReasonDTO](../../../../../payment/interfaces/payment.RefundReasonDTO/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the refund reason","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"label","type":"`string`","description":"The label of the refund reason","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"The metadata of the refund reason","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the refund reason was created","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"When the refund reason was updated","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the refund reason","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createRefundReasonStep"/>
@@ -0,0 +1,23 @@
---
slug: /references/medusa-workflows/steps/deletePaymentSessionsStep
sidebar_label: deletePaymentSessionsStep
---
import { TypeList, WorkflowDiagram } from "docs-ui"
# deletePaymentSessionsStep - Medusa Workflows API Reference
This documentation provides a reference to the `deletePaymentSessionsStep`. It belongs to the `@medusajs/core-flows` package.
This step deletes one or more payment sessions.
Note: This step should not be used alone as it doesn't consider a revert
Use deletePaymentSessionsWorkflow instead that uses this step
## Input
<TypeList types={[{"name":"DeletePaymentSessionStepInput","type":"[DeletePaymentSessionStepInput](../../../../interfaces/core_flows.DeletePaymentSessionStepInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"ids","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deletePaymentSessionsStep"/>
## Output
<TypeList types={[{"name":"string[]","type":"`string`[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"string","type":"`string`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deletePaymentSessionsStep"/>
@@ -0,0 +1,16 @@
---
slug: /references/medusa-workflows/steps/deleteRefundReasonsStep
sidebar_label: deleteRefundReasonsStep
---
import { TypeList, WorkflowDiagram } from "docs-ui"
# deleteRefundReasonsStep - Medusa Workflows API Reference
This documentation provides a reference to the `deleteRefundReasonsStep`. It belongs to the `@medusajs/core-flows` package.
This step deletes one or more refund reasons.
## Input
<TypeList types={[{"name":"string[]","type":"`string`[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"string","type":"`string`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deleteRefundReasonsStep"/>
@@ -0,0 +1,20 @@
---
slug: /references/medusa-workflows/steps/updatePaymentCollectionStep
sidebar_label: updatePaymentCollectionStep
---
import { TypeList, WorkflowDiagram } from "docs-ui"
# updatePaymentCollectionStep - Medusa Workflows API Reference
This documentation provides a reference to the `updatePaymentCollectionStep`. It belongs to the `@medusajs/core-flows` package.
This step updates payment collections matching the specified filters.
## Input
<TypeList types={[{"name":"UpdatePaymentCollectionStepInput","type":"[UpdatePaymentCollectionStepInput](../../../../interfaces/core_flows.UpdatePaymentCollectionStepInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"selector","type":"[FilterablePaymentCollectionProps](../../../../../payment/interfaces/payment.FilterablePaymentCollectionProps/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([PaymentCollectionDTO](../../../../../payment/interfaces/payment.PaymentCollectionDTO/page.mdx) \\| [BaseFilterable](../../../../../payment/interfaces/payment.BaseFilterable/page.mdx)&#60;[PaymentCollectionDTO](../../../../../payment/interfaces/payment.PaymentCollectionDTO/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the payment collection.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The ISO 3 character currency code of the payment sessions and payments associated with payment collection.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`string`","description":"The id of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberValue](../../../../../payment/types/payment.BigNumberValue/page.mdx)","description":"The total amount to be authorized and captured.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[PaymentCollectionStatus](../../../../../payment/types/payment.PaymentCollectionStatus/page.mdx)","description":"The status of the payment collection.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_providers","type":"[PaymentProviderDTO](../../../../../payment/interfaces/payment.PaymentProviderDTO/page.mdx)[]","description":"The payment provider used to process the associated payment sessions and payments.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"authorized_amount","type":"[BigNumberValue](../../../../../payment/types/payment.BigNumberValue/page.mdx)","description":"The amount authorized within the associated payment sessions.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"refunded_amount","type":"[BigNumberValue](../../../../../payment/types/payment.BigNumberValue/page.mdx)","description":"The amount refunded within the associated payments.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"captured_amount","type":"[BigNumberValue](../../../../../payment/types/payment.BigNumberValue/page.mdx)","description":"The amount captured within the associated payments.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"completed_at","type":"`string` \\| `Date`","description":"When the payment collection was completed.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the payment collection was created.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"When the payment collection was updated.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_sessions","type":"[PaymentSessionDTO](../../../../../payment/interfaces/payment.PaymentSessionDTO/page.mdx)[]","description":"The associated payment sessions.","optional":true,"defaultValue":"","expandable":true,"children":[]},{"name":"payments","type":"[PaymentDTO](../../../../../payment/interfaces/payment.PaymentDTO/page.mdx)[]","description":"The associated payments.","optional":true,"defaultValue":"","expandable":true,"children":[]},{"name":"$and","type":"([BaseFilterable](../../../../../payment/interfaces/payment.BaseFilterable/page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseFilterable](../../../../../payment/interfaces/payment.BaseFilterable/page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"$or","type":"([PaymentCollectionDTO](../../../../../payment/interfaces/payment.PaymentCollectLine truncated
## Output
<TypeList types={[{"name":"PaymentCollectionDTO[]","type":"[PaymentCollectionDTO](../../../../../payment/interfaces/payment.PaymentCollectionDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"PaymentCollectionDTO","type":"[PaymentCollectionDTO](../../../../../payment/interfaces/payment.PaymentCollectionDTO/page.mdx)","optional":false,"defaultValue":"","description":"The payment collection details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the payment collection.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The ISO 3 character currency code of the payment sessions and payments associated with payment collection.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`string`","description":"The id of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberValue](../../../../../payment/types/payment.BigNumberValue/page.mdx)","description":"The total amount to be authorized and captured.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../../../payment/types/payment.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"status","type":"[PaymentCollectionStatus](../../../../../payment/types/payment.PaymentCollectionStatus/page.mdx)","description":"The status of the payment collection.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_providers","type":"[PaymentProviderDTO](../../../../../payment/interfaces/payment.PaymentProviderDTO/page.mdx)[]","description":"The payment provider used to process the associated payment sessions and payments.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The ID of the payment provider.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_enabled","type":"`string`","description":"Whether the payment provider is enabled.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"authorized_amount","type":"[BigNumberValue](../../../../../payment/types/payment.BigNumberValue/page.mdx)","description":"The amount authorized within the associated payment sessions.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../../../payment/types/payment.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"refunded_amount","type":"[BigNumberValue](../../../../../payment/types/payment.BigNumberValue/page.mdx)","description":"The amount refunded within the associated payments.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../../../payment/types/payment.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"captured_amount","type":"[BigNumberValue](../../../../../payment/types/payment.BigNumberValue/page.mdx)","description":"The amount captured within the associated payments.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../../../payment/types/payment.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"completed_at","type":"`string` \\| `Date`","description":"When the payment collection was completed.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the payment collection was created.","optional":true,"defaultValue":"","expandable":false,"children":[]Line truncated
@@ -0,0 +1,20 @@
---
slug: /references/medusa-workflows/steps/updateRefundReasonsStep
sidebar_label: updateRefundReasonsStep
---
import { TypeList, WorkflowDiagram } from "docs-ui"
# updateRefundReasonsStep - Medusa Workflows API Reference
This documentation provides a reference to the `updateRefundReasonsStep`. It belongs to the `@medusajs/core-flows` package.
This step updates one or more refund reasons.
## Input
<TypeList types={[{"name":"UpdateRefundReasonDTO[]","type":"[UpdateRefundReasonDTO](../../../../../payment/interfaces/payment.UpdateRefundReasonDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"UpdateRefundReasonDTO","type":"[UpdateRefundReasonDTO](../../../../../payment/interfaces/payment.UpdateRefundReasonDTO/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The id of the refund reason","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"label","type":"`string`","description":"The label of the refund reason","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the refund reason","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"The metadata of the refund reason","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateRefundReasonsStep"/>
## Output
<TypeList types={[{"name":"RefundReasonDTO[]","type":"[RefundReasonDTO](../../../../../payment/interfaces/payment.RefundReasonDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"RefundReasonDTO","type":"[RefundReasonDTO](../../../../../payment/interfaces/payment.RefundReasonDTO/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the refund reason","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"label","type":"`string`","description":"The label of the refund reason","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"The metadata of the refund reason","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the refund reason was created","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"When the refund reason was updated","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the refund reason","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateRefundReasonsStep"/>
@@ -0,0 +1,16 @@
---
slug: /references/medusa-workflows/steps/validateDeletedPaymentSessionsStep
sidebar_label: validateDeletedPaymentSessionsStep
---
import { TypeList, WorkflowDiagram } from "docs-ui"
# validateDeletedPaymentSessionsStep - Medusa Workflows API Reference
This documentation provides a reference to the `validateDeletedPaymentSessionsStep`. It belongs to the `@medusajs/core-flows` package.
This step validates that the specified payment session IDs were deleted.
## Input
<TypeList types={[{"name":"ValidateDeletedPaymentSessionsStepInput","type":"[ValidateDeletedPaymentSessionsStepInput](../../../../interfaces/core_flows.ValidateDeletedPaymentSessionsStepInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"idsToDelete","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"idsDeleted","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="validateDeletedPaymentSessionsStep"/>
@@ -0,0 +1,5 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# createPaymentSessionStepId
`Const` **createPaymentSessionStepId**: `"create-payment-session"`
@@ -0,0 +1,5 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# createRefundReasonStepId
`Const` **createRefundReasonStepId**: `"create-refund-reason"`
@@ -0,0 +1,5 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# deletePaymentSessionsStepId
`Const` **deletePaymentSessionsStepId**: `"delete-payment-sessions"`
@@ -0,0 +1,5 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# deleteRefundReasonsStepId
`Const` **deleteRefundReasonsStepId**: `"delete-refund-reasons"`
@@ -0,0 +1,5 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# updatePaymentCollectionStepId
`Const` **updatePaymentCollectionStepId**: `"update-payment-collection"`
@@ -0,0 +1,5 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# updateRefundReasonStepId
`Const` **updateRefundReasonStepId**: `"update-refund-reasons"`
@@ -0,0 +1,5 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# validateDeletedPaymentSessionsStepId
`Const` **validateDeletedPaymentSessionsStepId**: `"validate-deleted-payment-sessions"`
@@ -0,0 +1,24 @@
---
slug: /references/medusa-workflows/createPaymentSessionsWorkflow
sidebar_label: createPaymentSessionsWorkflow
---
import { TypeList, WorkflowDiagram } from "docs-ui"
# createPaymentSessionsWorkflow - Medusa Workflows API Reference
This documentation provides a reference to the `createPaymentSessionsWorkflow`. It belongs to the `@medusajs/core-flows` package.
This workflow creates payment sessions.
## Steps
<WorkflowDiagram workflow={{"name":"createPaymentSessionsWorkflow","steps":[{"type":"step","name":"useRemoteQueryStep","description":"This step fetches data across modules using the remote query.\n\nLearn more in the [Remote Query documentation](https://docs.medusajs.com/v2/advanced-development/modules/remote-query).\n\n","link":"../../../../core_flows.Steps_Common/page.mdx#useremotequerystep","depth":1},{"type":"step","name":"createPaymentSessionStep","description":"This step creates a payment session.","link":"../../../../core_flows.Steps_Payment_Collection/page.mdx#createpaymentsessionstep","depth":2},{"type":"workflow","name":"deletePaymentSessionsWorkflow","description":"This workflow deletes one or more payment sessions.","link":"../../../../core_flows.Workflows_Payment_Collection/page.mdx#deletepaymentsessionsworkflow","depth":2}]}} />
## Input
<TypeList types={[{"name":"CreatePaymentSessionsWorkflowInput","type":"[CreatePaymentSessionsWorkflowInput](../../../../interfaces/core_flows.CreatePaymentSessionsWorkflowInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"payment_collection_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[PaymentProviderContext](../../../../../payment/interfaces/payment.PaymentProviderContext/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"billing_address","type":"Partial&#60;[AddressDTO](../../../../../payment/types/payment.AddressDTO/page.mdx)&#62;","description":"The payment's billing address.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"address_1","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string` \\| `null`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string` \\| `null`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string` \\| `null`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string` \\| `null`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`string` \\| `null`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`string` \\| `null`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>` \\| `null`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`string` \\| `Date` \\| `null`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"email","type":"`string`","description":"The associated customer's email.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"session_id","type":"`string`","description":"The ID of payment session the provider payment is associated with.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"customer","type":"Partial&#60;[CustomerDTO](../../../../../payment/interfaces/payment.CustomerDTO/page.mdx)&#62;","description":"The customer associated with this payment.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`string`","description":"The email of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"has_account","type":"`boolean`","description":"A flag indicating if customer has an account or not.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"default_billing_address_id","type":"`null` \\| `string`","description":"The associated default billing address's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"default_shipping_address_id","type":"`null` \\| `string`","description":"The associated default shipping address's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"company_name","type":"`null` \\| `string`","description":"The company name of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`null` \\| `string`","description":"The first name of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`null` \\| `string`","description":"The last name of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"addresses","type":"[CustomerAddressDTO](../../../../../payment/interfaces/payment.CustomerAddressDTO/page.mdx)[]","description":"The addresses of the customer.","optional":false,"defaultValue":"","exLine truncated
## Output
<TypeList types={[{"name":"PaymentSessionDTO","type":"[PaymentSessionDTO](../../../../../payment/interfaces/payment.PaymentSessionDTO/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the payment session.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberValue](../../../../../payment/types/payment.BigNumberValue/page.mdx)","description":"The amount to authorize.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../../../payment/types/payment.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"currency_code","type":"`string`","description":"The 3 character currency code of the payment session.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The ID of the associated payment provider.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>`","description":"The data necessary for the payment provider to process the payment session.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[PaymentSessionStatus](../../../../../payment/types/payment.PaymentSessionStatus/page.mdx)","description":"The status of the payment session.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_collection_id","type":"`string`","description":"The ID of the associated payment collection.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"`Record<string, unknown>`","description":"The context necessary for the payment provider.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"authorized_at","type":"`Date`","description":"When the payment session was authorized.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_collection","type":"[PaymentCollectionDTO](../../../../../payment/interfaces/payment.PaymentCollectionDTO/page.mdx)","description":"The payment collection the session is associated with.","optional":true,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The ID of the payment collection.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The ISO 3 character currency code of the payment sessions and payments associated with payment collection.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`string`","description":"The id of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberValue](../../../../../payment/types/payment.BigNumberValue/page.mdx)","description":"The total amount to be authorized and captured.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../../../payment/types/payment.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"status","type":"[PaymentCollectionStatus](../../../../../payment/types/payment.PaymentCollectionStatus/page.mdx)","description":"The status of the payment collection.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_providers","type":"[PaymentProviderDTO](../../../../../payment/interfaces/payment.PaymentProviderDTO/page.mdx)[]","description":"The payment provider used to process the associated payment sessions and payments.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The ID of the payment provider.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_enabled","type":"`string`","description":"Whether the payment provider is enabled.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"authorized_amount","type":"[BigNumberValue](../../../../../payment/types/payment.BigNumberValue/page.mdx)","description":"The amount authorized within the assLine truncated
@@ -0,0 +1,24 @@
---
slug: /references/medusa-workflows/createRefundReasonsWorkflow
sidebar_label: createRefundReasonsWorkflow
---
import { TypeList, WorkflowDiagram } from "docs-ui"
# createRefundReasonsWorkflow - Medusa Workflows API Reference
This documentation provides a reference to the `createRefundReasonsWorkflow`. It belongs to the `@medusajs/core-flows` package.
This workflow creates one or more refund reasons.
## Steps
<WorkflowDiagram workflow={{"name":"createRefundReasonsWorkflow","steps":[{"type":"step","name":"createRefundReasonStep","description":"This step creates one or more refund reasons.","link":"../../../../core_flows.Steps_Payment_Collection/page.mdx#createrefundreasonstep","depth":1}]}} />
## Input
<TypeList types={[{"name":"data","type":"[CreateRefundReasonDTO](../../../../../payment/interfaces/payment.CreateRefundReasonDTO/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"label","type":"`string`","description":"The label of the refund reason","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the refund reason","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"The metadata of the refund reason","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createRefundReasonsWorkflow"/>
## Output
<TypeList types={[{"name":"RefundReasonDTO[]","type":"[RefundReasonDTO](../../../../../payment/interfaces/payment.RefundReasonDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"RefundReasonDTO","type":"[RefundReasonDTO](../../../../../payment/interfaces/payment.RefundReasonDTO/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the refund reason","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"label","type":"`string`","description":"The label of the refund reason","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"The metadata of the refund reason","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the refund reason was created","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"When the refund reason was updated","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the refund reason","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createRefundReasonsWorkflow"/>
@@ -0,0 +1,24 @@
---
slug: /references/medusa-workflows/deletePaymentSessionsWorkflow
sidebar_label: deletePaymentSessionsWorkflow
---
import { TypeList, WorkflowDiagram } from "docs-ui"
# deletePaymentSessionsWorkflow - Medusa Workflows API Reference
This documentation provides a reference to the `deletePaymentSessionsWorkflow`. It belongs to the `@medusajs/core-flows` package.
This workflow deletes one or more payment sessions.
## Steps
<WorkflowDiagram workflow={{"name":"deletePaymentSessionsWorkflow","steps":[{"type":"step","name":"deletePaymentSessionsStep","description":"This step deletes one or more payment sessions.\n\nNote: This step should not be used alone as it doesn't consider a revert\nUse deletePaymentSessionsWorkflow instead that uses this step","link":"../../../../core_flows.Steps_Payment_Collection/page.mdx#deletepaymentsessionsstep","depth":1},{"type":"step","name":"validateDeletedPaymentSessionsStep","description":"This step validates that the specified payment session IDs were deleted.","link":"../../../../core_flows.Steps_Payment_Collection/page.mdx#validatedeletedpaymentsessionsstep","depth":2}]}} />
## Input
<TypeList types={[{"name":"DeletePaymentSessionsWorkflowInput","type":"[DeletePaymentSessionsWorkflowInput](../../../../interfaces/core_flows.DeletePaymentSessionsWorkflowInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"ids","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deletePaymentSessionsWorkflow"/>
## Output
<TypeList types={[{"name":"string[]","type":"`string`[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"string","type":"`string`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deletePaymentSessionsWorkflow"/>
@@ -0,0 +1,24 @@
---
slug: /references/medusa-workflows/updateRefundReasonsWorkflow
sidebar_label: updateRefundReasonsWorkflow
---
import { TypeList, WorkflowDiagram } from "docs-ui"
# updateRefundReasonsWorkflow - Medusa Workflows API Reference
This documentation provides a reference to the `updateRefundReasonsWorkflow`. It belongs to the `@medusajs/core-flows` package.
This workflow updates one or more refund reasons.
## Steps
<WorkflowDiagram workflow={{"name":"updateRefundReasonsWorkflow","steps":[{"type":"step","name":"updateRefundReasonsStep","description":"This step updates one or more refund reasons.","link":"../../../../core_flows.Steps_Payment_Collection/page.mdx#updaterefundreasonsstep","depth":1}]}} />
## Input
<TypeList types={[{"name":"UpdateRefundReasonDTO[]","type":"[UpdateRefundReasonDTO](../../../../../payment/interfaces/payment.UpdateRefundReasonDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"UpdateRefundReasonDTO","type":"[UpdateRefundReasonDTO](../../../../../payment/interfaces/payment.UpdateRefundReasonDTO/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The id of the refund reason","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"label","type":"`string`","description":"The label of the refund reason","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the refund reason","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"The metadata of the refund reason","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateRefundReasonsWorkflow"/>
## Output
<TypeList types={[{"name":"RefundReasonDTO[]","type":"[RefundReasonDTO](../../../../../payment/interfaces/payment.RefundReasonDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"RefundReasonDTO","type":"[RefundReasonDTO](../../../../../payment/interfaces/payment.RefundReasonDTO/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the refund reason","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"label","type":"`string`","description":"The label of the refund reason","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"The metadata of the refund reason","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the refund reason was created","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"When the refund reason was updated","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the refund reason","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateRefundReasonsWorkflow"/>
@@ -0,0 +1,5 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# createPaymentSessionsWorkflowId
`Const` **createPaymentSessionsWorkflowId**: `"create-payment-sessions"`
@@ -0,0 +1,5 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# createRefundReasonsWorkflowId
`Const` **createRefundReasonsWorkflowId**: `"create-refund-reasons-workflow"`
@@ -0,0 +1,5 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# deletePaymentSessionsWorkflowId
`Const` **deletePaymentSessionsWorkflowId**: `"delete-payment-sessions"`
@@ -0,0 +1,5 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# updateRefundReasonsWorkflowId
`Const` **updateRefundReasonsWorkflowId**: `"update-refund-reasons"`
@@ -0,0 +1,94 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# Steps\_Payment Collection
## createPaymentSessionStep
This step creates a payment session.
### Input
<TypeList types={[{"name":"CreatePaymentSessionStepInput","type":"[CreatePaymentSessionStepInput](../../interfaces/core_flows.CreatePaymentSessionStepInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"payment_collection_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberInput](../../../types/types/types.BigNumberInput/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../types/types/types.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"currency_code","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[PaymentProviderContext](../../../payment/interfaces/payment.PaymentProviderContext/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"billing_address","type":"Partial&#60;[AddressDTO](../../../payment/types/payment.AddressDTO/page.mdx)&#62;","description":"The payment's billing address.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"address_1","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string` \\| `null`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string` \\| `null`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string` \\| `null`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string` \\| `null`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`string` \\| `null`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`string` \\| `null`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>` \\| `null`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`string` \\| `Date` \\| `null`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"email","type":"`string`","description":"The associated customer's email.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"session_id","type":"`string`","description":"The ID of payment session the provider payment is associated with.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"customer","type":"Partial&#60;[CustomerDTO](../../../payment/interfaces/payment.CustomerDTO/page.mdx)&#62;","description":"The customer associated with this payment.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`string`","description":"The email of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"has_account","type":"`boolean`","description":"A flag indicating if customer has an account or not.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"default_billing_address_id","type":"`null` \\| `string`","description":"The associated default billing address's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"default_shipping_address_id","type":"`null` \\| `string`","descriptionLine truncated
### Output
<TypeList types={[{"name":"PaymentSessionDTO","type":"[PaymentSessionDTO](../../../payment/interfaces/payment.PaymentSessionDTO/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the payment session.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberValue](../../../payment/types/payment.BigNumberValue/page.mdx)","description":"The amount to authorize.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../payment/types/payment.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"currency_code","type":"`string`","description":"The 3 character currency code of the payment session.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The ID of the associated payment provider.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>`","description":"The data necessary for the payment provider to process the payment session.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[PaymentSessionStatus](../../../payment/types/payment.PaymentSessionStatus/page.mdx)","description":"The status of the payment session.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_collection_id","type":"`string`","description":"The ID of the associated payment collection.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"`Record<string, unknown>`","description":"The context necessary for the payment provider.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"authorized_at","type":"`Date`","description":"When the payment session was authorized.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_collection","type":"[PaymentCollectionDTO](../../../payment/interfaces/payment.PaymentCollectionDTO/page.mdx)","description":"The payment collection the session is associated with.","optional":true,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The ID of the payment collection.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The ISO 3 character currency code of the payment sessions and payments associated with payment collection.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`string`","description":"The id of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberValue](../../../payment/types/payment.BigNumberValue/page.mdx)","description":"The total amount to be authorized and captured.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../payment/types/payment.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"status","type":"[PaymentCollectionStatus](../../../payment/types/payment.PaymentCollectionStatus/page.mdx)","description":"The status of the payment collection.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_providers","type":"[PaymentProviderDTO](../../../payment/interfaces/payment.PaymentProviderDTO/page.mdx)[]","description":"The payment provider used to process the associated payment sessions and payments.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The ID of the payment provider.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_enabled","type":"`string`","description":"Whether the payment provider is enabled.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"authorized_amount","type":"[BigNumberValue](../../../payment/types/payment.BigNumberValue/page.mdx)","description":"The amount authorized within the associated payment sessions.","optional":true,"defaultValue":""Line truncated
___
## createRefundReasonStep
This step creates one or more refund reasons.
### Input
<TypeList types={[{"name":"CreateRefundReasonDTO[]","type":"[CreateRefundReasonDTO](../../../payment/interfaces/payment.CreateRefundReasonDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"CreateRefundReasonDTO","type":"[CreateRefundReasonDTO](../../../payment/interfaces/payment.CreateRefundReasonDTO/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"label","type":"`string`","description":"The label of the refund reason","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the refund reason","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"The metadata of the refund reason","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createRefundReasonStep"/>
### Output
<TypeList types={[{"name":"RefundReasonDTO[]","type":"[RefundReasonDTO](../../../payment/interfaces/payment.RefundReasonDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"RefundReasonDTO","type":"[RefundReasonDTO](../../../payment/interfaces/payment.RefundReasonDTO/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the refund reason","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"label","type":"`string`","description":"The label of the refund reason","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"The metadata of the refund reason","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the refund reason was created","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"When the refund reason was updated","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the refund reason","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createRefundReasonStep"/>
___
## deletePaymentSessionsStep
This step deletes one or more payment sessions.
Note: This step should not be used alone as it doesn't consider a revert
Use deletePaymentSessionsWorkflow instead that uses this step
### Input
<TypeList types={[{"name":"DeletePaymentSessionStepInput","type":"[DeletePaymentSessionStepInput](../../interfaces/core_flows.DeletePaymentSessionStepInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"ids","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deletePaymentSessionsStep"/>
### Output
<TypeList types={[{"name":"string[]","type":"`string`[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"string","type":"`string`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deletePaymentSessionsStep"/>
___
## deleteRefundReasonsStep
This step deletes one or more refund reasons.
### Input
<TypeList types={[{"name":"string[]","type":"`string`[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"string","type":"`string`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deleteRefundReasonsStep"/>
___
## updatePaymentCollectionStep
This step updates payment collections matching the specified filters.
### Input
<TypeList types={[{"name":"UpdatePaymentCollectionStepInput","type":"[UpdatePaymentCollectionStepInput](../../interfaces/core_flows.UpdatePaymentCollectionStepInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"selector","type":"[FilterablePaymentCollectionProps](../../../payment/interfaces/payment.FilterablePaymentCollectionProps/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([PaymentCollectionDTO](../../../payment/interfaces/payment.PaymentCollectionDTO/page.mdx) \\| [BaseFilterable](../../../payment/interfaces/payment.BaseFilterable/page.mdx)&#60;[PaymentCollectionDTO](../../../payment/interfaces/payment.PaymentCollectionDTO/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the payment collection.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The ISO 3 character currency code of the payment sessions and payments associated with payment collection.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`string`","description":"The id of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberValue](../../../payment/types/payment.BigNumberValue/page.mdx)","description":"The total amount to be authorized and captured.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[PaymentCollectionStatus](../../../payment/types/payment.PaymentCollectionStatus/page.mdx)","description":"The status of the payment collection.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_providers","type":"[PaymentProviderDTO](../../../payment/interfaces/payment.PaymentProviderDTO/page.mdx)[]","description":"The payment provider used to process the associated payment sessions and payments.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"authorized_amount","type":"[BigNumberValue](../../../payment/types/payment.BigNumberValue/page.mdx)","description":"The amount authorized within the associated payment sessions.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"refunded_amount","type":"[BigNumberValue](../../../payment/types/payment.BigNumberValue/page.mdx)","description":"The amount refunded within the associated payments.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"captured_amount","type":"[BigNumberValue](../../../payment/types/payment.BigNumberValue/page.mdx)","description":"The amount captured within the associated payments.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"completed_at","type":"`string` \\| `Date`","description":"When the payment collection was completed.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the payment collection was created.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"When the payment collection was updated.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_sessions","type":"[PaymentSessionDTO](../../../payment/interfaces/payment.PaymentSessionDTO/page.mdx)[]","description":"The associated payment sessions.","optional":true,"defaultValue":"","expandable":true,"children":[]},{"name":"payments","type":"[PaymentDTO](../../../payment/interfaces/payment.PaymentDTO/page.mdx)[]","description":"The associated payments.","optional":true,"defaultValue":"","expandable":true,"children":[]},{"name":"$and","type":"([BaseFilterable](../../../payment/interfaces/payment.BaseFilterable/page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseFilterable](../../../payment/interfaces/payment.BaseFilterable/page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"$or","type":"([PaymentCollectionDTO](../../../payment/interfaces/payment.PaymentCollectionDTO/page.mdx) \\| [BaseFilterable](../../../payment/interfaces/payment.BaseFilterable/page.mdLine truncated
### Output
<TypeList types={[{"name":"PaymentCollectionDTO[]","type":"[PaymentCollectionDTO](../../../payment/interfaces/payment.PaymentCollectionDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"PaymentCollectionDTO","type":"[PaymentCollectionDTO](../../../payment/interfaces/payment.PaymentCollectionDTO/page.mdx)","optional":false,"defaultValue":"","description":"The payment collection details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the payment collection.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The ISO 3 character currency code of the payment sessions and payments associated with payment collection.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`string`","description":"The id of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberValue](../../../payment/types/payment.BigNumberValue/page.mdx)","description":"The total amount to be authorized and captured.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../payment/types/payment.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"status","type":"[PaymentCollectionStatus](../../../payment/types/payment.PaymentCollectionStatus/page.mdx)","description":"The status of the payment collection.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_providers","type":"[PaymentProviderDTO](../../../payment/interfaces/payment.PaymentProviderDTO/page.mdx)[]","description":"The payment provider used to process the associated payment sessions and payments.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The ID of the payment provider.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_enabled","type":"`string`","description":"Whether the payment provider is enabled.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"authorized_amount","type":"[BigNumberValue](../../../payment/types/payment.BigNumberValue/page.mdx)","description":"The amount authorized within the associated payment sessions.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../payment/types/payment.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"refunded_amount","type":"[BigNumberValue](../../../payment/types/payment.BigNumberValue/page.mdx)","description":"The amount refunded within the associated payments.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../payment/types/payment.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"captured_amount","type":"[BigNumberValue](../../../payment/types/payment.BigNumberValue/page.mdx)","description":"The amount captured within the associated payments.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../payment/types/payment.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"completed_at","type":"`string` \\| `Date`","description":"When the payment collection was completed.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the payment collection was created.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"When Line truncated
___
## updateRefundReasonsStep
This step updates one or more refund reasons.
### Input
<TypeList types={[{"name":"UpdateRefundReasonDTO[]","type":"[UpdateRefundReasonDTO](../../../payment/interfaces/payment.UpdateRefundReasonDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"UpdateRefundReasonDTO","type":"[UpdateRefundReasonDTO](../../../payment/interfaces/payment.UpdateRefundReasonDTO/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The id of the refund reason","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"label","type":"`string`","description":"The label of the refund reason","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the refund reason","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"The metadata of the refund reason","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateRefundReasonsStep"/>
### Output
<TypeList types={[{"name":"RefundReasonDTO[]","type":"[RefundReasonDTO](../../../payment/interfaces/payment.RefundReasonDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"RefundReasonDTO","type":"[RefundReasonDTO](../../../payment/interfaces/payment.RefundReasonDTO/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the refund reason","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"label","type":"`string`","description":"The label of the refund reason","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"The metadata of the refund reason","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the refund reason was created","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"When the refund reason was updated","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the refund reason","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateRefundReasonsStep"/>
___
## validateDeletedPaymentSessionsStep
This step validates that the specified payment session IDs were deleted.
### Input
<TypeList types={[{"name":"ValidateDeletedPaymentSessionsStepInput","type":"[ValidateDeletedPaymentSessionsStepInput](../../interfaces/core_flows.ValidateDeletedPaymentSessionsStepInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"idsToDelete","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"idsDeleted","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="validateDeletedPaymentSessionsStep"/>
@@ -0,0 +1,73 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# Workflows\_Payment Collection
## createPaymentSessionsWorkflow
This workflow creates payment sessions.
### Steps
<WorkflowDiagram workflow={{"name":"createPaymentSessionsWorkflow","steps":[{"type":"step","name":"useRemoteQueryStep","description":"This step fetches data across modules using the remote query.\n\nLearn more in the [Remote Query documentation](https://docs.medusajs.com/v2/advanced-development/modules/remote-query).\n\n","link":"../../core_flows.Steps_Common/page.mdx#useremotequerystep","depth":1},{"type":"step","name":"createPaymentSessionStep","description":"This step creates a payment session.","link":"../../core_flows.Steps_Payment_Collection/page.mdx#createpaymentsessionstep","depth":2},{"type":"workflow","name":"deletePaymentSessionsWorkflow","description":"This workflow deletes one or more payment sessions.","link":"../../core_flows.Workflows_Payment_Collection/page.mdx#deletepaymentsessionsworkflow","depth":2}]}} />
### Input
<TypeList types={[{"name":"CreatePaymentSessionsWorkflowInput","type":"[CreatePaymentSessionsWorkflowInput](../../interfaces/core_flows.CreatePaymentSessionsWorkflowInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"payment_collection_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[PaymentProviderContext](../../../payment/interfaces/payment.PaymentProviderContext/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"billing_address","type":"Partial&#60;[AddressDTO](../../../payment/types/payment.AddressDTO/page.mdx)&#62;","description":"The payment's billing address.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"address_1","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string` \\| `null`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string` \\| `null`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string` \\| `null`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string` \\| `null`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`string` \\| `null`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`string` \\| `null`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>` \\| `null`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`string` \\| `Date` \\| `null`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"email","type":"`string`","description":"The associated customer's email.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"session_id","type":"`string`","description":"The ID of payment session the provider payment is associated with.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"customer","type":"Partial&#60;[CustomerDTO](../../../payment/interfaces/payment.CustomerDTO/page.mdx)&#62;","description":"The customer associated with this payment.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`string`","description":"The email of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"has_account","type":"`boolean`","description":"A flag indicating if customer has an account or not.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"default_billing_address_id","type":"`null` \\| `string`","description":"The associated default billing address's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"default_shipping_address_id","type":"`null` \\| `string`","description":"The associated default shipping address's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"company_name","type":"`null` \\| `string`","description":"The company name of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`null` \\| `string`","description":"The first name of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`null` \\| `string`","description":"The last name of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"addresses","type":"[CustomerAddressDTO](../../../payment/interfaces/payment.CustomerAddressDTO/page.mdx)[]","description":"The addresses of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]}Line truncated
### Output
<TypeList types={[{"name":"PaymentSessionDTO","type":"[PaymentSessionDTO](../../../payment/interfaces/payment.PaymentSessionDTO/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the payment session.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberValue](../../../payment/types/payment.BigNumberValue/page.mdx)","description":"The amount to authorize.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../payment/types/payment.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"currency_code","type":"`string`","description":"The 3 character currency code of the payment session.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The ID of the associated payment provider.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>`","description":"The data necessary for the payment provider to process the payment session.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[PaymentSessionStatus](../../../payment/types/payment.PaymentSessionStatus/page.mdx)","description":"The status of the payment session.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_collection_id","type":"`string`","description":"The ID of the associated payment collection.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"`Record<string, unknown>`","description":"The context necessary for the payment provider.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"authorized_at","type":"`Date`","description":"When the payment session was authorized.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_collection","type":"[PaymentCollectionDTO](../../../payment/interfaces/payment.PaymentCollectionDTO/page.mdx)","description":"The payment collection the session is associated with.","optional":true,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The ID of the payment collection.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The ISO 3 character currency code of the payment sessions and payments associated with payment collection.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`string`","description":"The id of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberValue](../../../payment/types/payment.BigNumberValue/page.mdx)","description":"The total amount to be authorized and captured.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../payment/types/payment.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"status","type":"[PaymentCollectionStatus](../../../payment/types/payment.PaymentCollectionStatus/page.mdx)","description":"The status of the payment collection.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_providers","type":"[PaymentProviderDTO](../../../payment/interfaces/payment.PaymentProviderDTO/page.mdx)[]","description":"The payment provider used to process the associated payment sessions and payments.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"`string`","description":"The ID of the payment provider.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_enabled","type":"`string`","description":"Whether the payment provider is enabled.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"authorized_amount","type":"[BigNumberValue](../../../payment/types/payment.BigNumberValue/page.mdx)","description":"The amount authorized within the associated payment sessions.","optional":true,"defaultValue":""Line truncated
___
## createRefundReasonsWorkflow
This workflow creates one or more refund reasons.
### Steps
<WorkflowDiagram workflow={{"name":"createRefundReasonsWorkflow","steps":[{"type":"step","name":"createRefundReasonStep","description":"This step creates one or more refund reasons.","link":"../../core_flows.Steps_Payment_Collection/page.mdx#createrefundreasonstep","depth":1}]}} />
### Input
<TypeList types={[{"name":"data","type":"[CreateRefundReasonDTO](../../../payment/interfaces/payment.CreateRefundReasonDTO/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"label","type":"`string`","description":"The label of the refund reason","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the refund reason","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"The metadata of the refund reason","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createRefundReasonsWorkflow"/>
### Output
<TypeList types={[{"name":"RefundReasonDTO[]","type":"[RefundReasonDTO](../../../payment/interfaces/payment.RefundReasonDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"RefundReasonDTO","type":"[RefundReasonDTO](../../../payment/interfaces/payment.RefundReasonDTO/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the refund reason","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"label","type":"`string`","description":"The label of the refund reason","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"The metadata of the refund reason","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the refund reason was created","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"When the refund reason was updated","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the refund reason","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createRefundReasonsWorkflow"/>
___
## deletePaymentSessionsWorkflow
This workflow deletes one or more payment sessions.
### Steps
<WorkflowDiagram workflow={{"name":"deletePaymentSessionsWorkflow","steps":[{"type":"step","name":"deletePaymentSessionsStep","description":"This step deletes one or more payment sessions.\n\nNote: This step should not be used alone as it doesn't consider a revert\nUse deletePaymentSessionsWorkflow instead that uses this step","link":"../../core_flows.Steps_Payment_Collection/page.mdx#deletepaymentsessionsstep","depth":1},{"type":"step","name":"validateDeletedPaymentSessionsStep","description":"This step validates that the specified payment session IDs were deleted.","link":"../../core_flows.Steps_Payment_Collection/page.mdx#validatedeletedpaymentsessionsstep","depth":2}]}} />
### Input
<TypeList types={[{"name":"DeletePaymentSessionsWorkflowInput","type":"[DeletePaymentSessionsWorkflowInput](../../interfaces/core_flows.DeletePaymentSessionsWorkflowInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"ids","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deletePaymentSessionsWorkflow"/>
### Output
<TypeList types={[{"name":"string[]","type":"`string`[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"string","type":"`string`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deletePaymentSessionsWorkflow"/>
___
## updateRefundReasonsWorkflow
This workflow updates one or more refund reasons.
### Steps
<WorkflowDiagram workflow={{"name":"updateRefundReasonsWorkflow","steps":[{"type":"step","name":"updateRefundReasonsStep","description":"This step updates one or more refund reasons.","link":"../../core_flows.Steps_Payment_Collection/page.mdx#updaterefundreasonsstep","depth":1}]}} />
### Input
<TypeList types={[{"name":"UpdateRefundReasonDTO[]","type":"[UpdateRefundReasonDTO](../../../payment/interfaces/payment.UpdateRefundReasonDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"UpdateRefundReasonDTO","type":"[UpdateRefundReasonDTO](../../../payment/interfaces/payment.UpdateRefundReasonDTO/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The id of the refund reason","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"label","type":"`string`","description":"The label of the refund reason","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the refund reason","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"The metadata of the refund reason","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateRefundReasonsWorkflow"/>
### Output
<TypeList types={[{"name":"RefundReasonDTO[]","type":"[RefundReasonDTO](../../../payment/interfaces/payment.RefundReasonDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"RefundReasonDTO","type":"[RefundReasonDTO](../../../payment/interfaces/payment.RefundReasonDTO/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the refund reason","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"label","type":"`string`","description":"The label of the refund reason","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"The metadata of the refund reason","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the refund reason was created","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"When the refund reason was updated","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the refund reason","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateRefundReasonsWorkflow"/>
@@ -0,0 +1,20 @@
---
slug: /references/medusa-workflows/steps/createRegionsStep
sidebar_label: createRegionsStep
---
import { TypeList, WorkflowDiagram } from "docs-ui"
# createRegionsStep - Medusa Workflows API Reference
This documentation provides a reference to the `createRegionsStep`. It belongs to the `@medusajs/core-flows` package.
This step creates one or more regions.
## Input
<TypeList types={[{"name":"CreateRegionDTO[]","type":"[CreateRegionDTO](../../../../../region/interfaces/region.CreateRegionDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"CreateRegionDTO","type":"[CreateRegionDTO](../../../../../region/interfaces/region.CreateRegionDTO/page.mdx)","optional":false,"defaultValue":"","description":"The region to be created.","expandable":false,"children":[{"name":"name","type":"`string`","description":"The name of the region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The currency code of the region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"automatic_taxes","type":"`boolean`","description":"Setting to indicate whether taxes need to be applied automatically","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"countries","type":"`string`[]","description":"The region's countries.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_providers","type":"`string`[]","description":"The region's payment providers.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"[MetadataType](../../../../../region/types/region.MetadataType/page.mdx)","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createRegionsStep"/>
## Output
<TypeList types={[{"name":"RegionDTO[]","type":"[RegionDTO](../../../../../region/interfaces/region.RegionDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"RegionDTO","type":"[RegionDTO](../../../../../region/interfaces/region.RegionDTO/page.mdx)","optional":false,"defaultValue":"","description":"The region details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The currency code of the region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"automatic_taxes","type":"`boolean`","description":"Setting to indicate whether taxes need to be applied automatically","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"countries","type":"[RegionCountryDTO](../../../../../region/interfaces/region.RegionCountryDTO/page.mdx)[]","description":"The countries of the region.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the country.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"iso_2","type":"`string`","description":"The ISO 2 code of the country.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"iso_3","type":"`string`","description":"The ISO 3 code of the country.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"num_code","type":"`string`","description":"The country's code number.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the country.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"display_name","type":"`string`","description":"The display name of the country.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"payment_providers","type":"[PaymentProviderDTO](../../../../../region/interfaces/region.PaymentProviderDTO/page.mdx)[]","description":"Payment providers available in the region","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the payment provider.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_enabled","type":"`string`","description":"Whether the payment provider is enabled.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"created_at","type":"`string`","description":"The date the region was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"The date the region was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, any>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createRegionsStep"/>
@@ -0,0 +1,16 @@
---
slug: /references/medusa-workflows/steps/deleteRegionsStep
sidebar_label: deleteRegionsStep
---
import { TypeList, WorkflowDiagram } from "docs-ui"
# deleteRegionsStep - Medusa Workflows API Reference
This documentation provides a reference to the `deleteRegionsStep`. It belongs to the `@medusajs/core-flows` package.
This step deletes one or more regions.
## Input
<TypeList types={[{"name":"string[]","type":"`string`[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"string","type":"`string`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deleteRegionsStep"/>
@@ -0,0 +1,20 @@
---
slug: /references/medusa-workflows/steps/updateRegionsStep
sidebar_label: updateRegionsStep
---
import { TypeList, WorkflowDiagram } from "docs-ui"
# updateRegionsStep - Medusa Workflows API Reference
This documentation provides a reference to the `updateRegionsStep`. It belongs to the `@medusajs/core-flows` package.
This step updates regions matching the specified filters.
## Input
<TypeList types={[{"name":"UpdateRegionsStepInput","type":"[UpdateRegionsStepInput](../../../../types/core_flows.UpdateRegionsStepInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"selector","type":"[FilterableRegionProps](../../../../../region/interfaces/region.FilterableRegionProps/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterableRegionProps](../../../../../region/interfaces/region.FilterableRegionProps/page.mdx) \\| [BaseFilterable](../../../../../region/interfaces/region.BaseFilterable/page.mdx)&#60;[FilterableRegionProps](../../../../../region/interfaces/region.FilterableRegionProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterableRegionProps](../../../../../region/interfaces/region.FilterableRegionProps/page.mdx) \\| [BaseFilterable](../../../../../region/interfaces/region.BaseFilterable/page.mdx)&#60;[FilterableRegionProps](../../../../../region/interfaces/region.FilterableRegionProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterableRegionProps](../../../../../region/interfaces/region.FilterableRegionProps/page.mdx) \\| [BaseFilterable](../../../../../region/interfaces/region.BaseFilterable/page.mdx)&#60;[FilterableRegionProps](../../../../../region/interfaces/region.FilterableRegionProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"q","type":"`string`","description":"Find regions by name through this search term","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string` \\| `string`[] \\| [OperatorMap](../../../../../region/types/region.OperatorMap/page.mdx)&#60;string \\| string[]&#62;","description":"The IDs to filter the regions by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string` \\| [OperatorMap](../../../../../region/types/region.OperatorMap/page.mdx)&#60;string&#62;","description":"Filter regions by their name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string` \\| [OperatorMap](../../../../../region/types/region.OperatorMap/page.mdx)&#60;string&#62;","description":"Filter regions by their currency code.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>` \\| [OperatorMap](../../../../../region/types/region.OperatorMap/page.mdx)&#60;Record&#60;string, unknown&#62;&#62;","description":"Filter regions by their metadata.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"[OperatorMap](../../../../../region/types/region.OperatorMap/page.mdx)&#60;string&#62;","description":"Filter regions by their creation date.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"[OperatorMap](../../../../../region/types/region.OperatorMap/page.mdx)&#60;string&#62;","description":"Filter regions by their update date.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([BaseFilterable](../../../../../region/interfaces/region.BaseFilterable/page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseFilterable](../../../../../region/interfaces/region.BaseFilterable/page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"$or","type":"([FilterableRegionProps](../../../../../region/interfaces/region.FilterableRegionProps/page.mdx) \\| [BaseFilterable](../../../../../region/interfaces/region.BaseFilterable/page.mdx)&#60;[FilterableRegionProps](../../../../../region/interfaces/region.FilterableRegionProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterableRegionProps](../../../../../region/interfaces/region.FilterableRegionProps/page.mdx) \\| [BaseFilterable](../../../../../region/interfaces/region.BaseFilterable/page.mdx)&Line truncated
## Output
<TypeList types={[{"name":"RegionDTO[]","type":"[RegionDTO](../../../../../region/interfaces/region.RegionDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"RegionDTO","type":"[RegionDTO](../../../../../region/interfaces/region.RegionDTO/page.mdx)","optional":false,"defaultValue":"","description":"The region details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The currency code of the region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"automatic_taxes","type":"`boolean`","description":"Setting to indicate whether taxes need to be applied automatically","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"countries","type":"[RegionCountryDTO](../../../../../region/interfaces/region.RegionCountryDTO/page.mdx)[]","description":"The countries of the region.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the country.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"iso_2","type":"`string`","description":"The ISO 2 code of the country.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"iso_3","type":"`string`","description":"The ISO 3 code of the country.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"num_code","type":"`string`","description":"The country's code number.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the country.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"display_name","type":"`string`","description":"The display name of the country.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"payment_providers","type":"[PaymentProviderDTO](../../../../../region/interfaces/region.PaymentProviderDTO/page.mdx)[]","description":"Payment providers available in the region","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the payment provider.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_enabled","type":"`string`","description":"Whether the payment provider is enabled.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"created_at","type":"`string`","description":"The date the region was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"The date the region was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, any>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateRegionsStep"/>
@@ -0,0 +1,5 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# createRegionsStepId
`Const` **createRegionsStepId**: `"create-regions"`
@@ -0,0 +1,5 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# deleteRegionsStepId
`Const` **deleteRegionsStepId**: `"delete-regions"`
@@ -0,0 +1,5 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# updateRegionsStepId
`Const` **updateRegionsStepId**: `"update-region"`
@@ -0,0 +1,24 @@
---
slug: /references/medusa-workflows/createRegionsWorkflow
sidebar_label: createRegionsWorkflow
---
import { TypeList, WorkflowDiagram } from "docs-ui"
# createRegionsWorkflow - Medusa Workflows API Reference
This documentation provides a reference to the `createRegionsWorkflow`. It belongs to the `@medusajs/core-flows` package.
This workflow creates one or more regions.
## Steps
<WorkflowDiagram workflow={{"name":"createRegionsWorkflow","steps":[{"type":"step","name":"createRegionsStep","description":"This step creates one or more regions.","link":"../../../../core_flows.Steps_Region/page.mdx#createregionsstep","depth":1},{"type":"workflow","name":"createPricePreferencesWorkflow","description":"This workflow creates one or more price preferences.","link":"../../../../core_flows.Workflows_Pricing/page.mdx#createpricepreferencesworkflow","depth":2}]}} />
## Input
<TypeList types={[{"name":"CreateRegionsWorkflowInput","type":"`CreateRegionsWorkflowInput`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createRegionsWorkflow"/>
## Output
<TypeList types={[{"name":"CreateRegionsWorkflowOutput","type":"`CreateRegionsWorkflowOutput`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createRegionsWorkflow"/>
@@ -0,0 +1,20 @@
---
slug: /references/medusa-workflows/deleteRegionsWorkflow
sidebar_label: deleteRegionsWorkflow
---
import { TypeList, WorkflowDiagram } from "docs-ui"
# deleteRegionsWorkflow - Medusa Workflows API Reference
This documentation provides a reference to the `deleteRegionsWorkflow`. It belongs to the `@medusajs/core-flows` package.
This workflow deletes one or more regions.
## Steps
<WorkflowDiagram workflow={{"name":"deleteRegionsWorkflow","steps":[{"type":"step","name":"deleteRegionsStep","description":"This step deletes one or more regions.","link":"../../../../core_flows.Steps_Region/page.mdx#deleteregionsstep","depth":1}]}} />
## Input
<TypeList types={[{"name":"DeleteRegionsWorkflowInput","type":"[DeleteRegionsWorkflowInput](../../../../types/core_flows.DeleteRegionsWorkflowInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"ids","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deleteRegionsWorkflow"/>
@@ -0,0 +1,24 @@
---
slug: /references/medusa-workflows/updateRegionsWorkflow
sidebar_label: updateRegionsWorkflow
---
import { TypeList, WorkflowDiagram } from "docs-ui"
# updateRegionsWorkflow - Medusa Workflows API Reference
This documentation provides a reference to the `updateRegionsWorkflow`. It belongs to the `@medusajs/core-flows` package.
This workflow updates regions matching the specified filters.
## Steps
<WorkflowDiagram workflow={{"name":"updateRegionsWorkflow","steps":[{"type":"step","name":"updateRegionsStep","description":"This step updates regions matching the specified filters.","link":"../../../../core_flows.Steps_Region/page.mdx#updateregionsstep","depth":1},{"type":"when","condition":"{\n return data.normalizedInput.is_tax_inclusive !== undefined\n }","depth":"2","steps":[{"type":"workflow","name":"updatePricePreferencesWorkflow","description":"This workflow updates one or more price preferences.","link":"../../../../core_flows.Workflows_Pricing/page.mdx#updatepricepreferencesworkflow","depth":2}]}]}} />
## Input
<TypeList types={[{"name":"UpdateRegionsWorkflowInput","type":"`UpdateRegionsWorkflowInput`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateRegionsWorkflow"/>
## Output
<TypeList types={[{"name":"UpdateRegionsWorkflowOutput","type":"`UpdateRegionsWorkflowOutput`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateRegionsWorkflow"/>
@@ -0,0 +1,5 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# createRegionsWorkflowId
`Const` **createRegionsWorkflowId**: `"create-regions"`
@@ -0,0 +1,5 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# deleteRegionsWorkflowId
`Const` **deleteRegionsWorkflowId**: `"delete-regions"`
@@ -0,0 +1,5 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# updateRegionsWorkflowId
`Const` **updateRegionsWorkflowId**: `"update-regions"`
@@ -0,0 +1,39 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# Steps\_Region
## createRegionsStep
This step creates one or more regions.
### Input
<TypeList types={[{"name":"CreateRegionDTO[]","type":"[CreateRegionDTO](../../../region/interfaces/region.CreateRegionDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"CreateRegionDTO","type":"[CreateRegionDTO](../../../region/interfaces/region.CreateRegionDTO/page.mdx)","optional":false,"defaultValue":"","description":"The region to be created.","expandable":false,"children":[{"name":"name","type":"`string`","description":"The name of the region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The currency code of the region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"automatic_taxes","type":"`boolean`","description":"Setting to indicate whether taxes need to be applied automatically","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"countries","type":"`string`[]","description":"The region's countries.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_providers","type":"`string`[]","description":"The region's payment providers.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"[MetadataType](../../../region/types/region.MetadataType/page.mdx)","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createRegionsStep"/>
### Output
<TypeList types={[{"name":"RegionDTO[]","type":"[RegionDTO](../../../region/interfaces/region.RegionDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"RegionDTO","type":"[RegionDTO](../../../region/interfaces/region.RegionDTO/page.mdx)","optional":false,"defaultValue":"","description":"The region details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The currency code of the region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"automatic_taxes","type":"`boolean`","description":"Setting to indicate whether taxes need to be applied automatically","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"countries","type":"[RegionCountryDTO](../../../region/interfaces/region.RegionCountryDTO/page.mdx)[]","description":"The countries of the region.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the country.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"iso_2","type":"`string`","description":"The ISO 2 code of the country.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"iso_3","type":"`string`","description":"The ISO 3 code of the country.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"num_code","type":"`string`","description":"The country's code number.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the country.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"display_name","type":"`string`","description":"The display name of the country.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"payment_providers","type":"[PaymentProviderDTO](../../../region/interfaces/region.PaymentProviderDTO/page.mdx)[]","description":"Payment providers available in the region","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the payment provider.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_enabled","type":"`string`","description":"Whether the payment provider is enabled.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"created_at","type":"`string`","description":"The date the region was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"The date the region was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, any>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createRegionsStep"/>
___
## deleteRegionsStep
This step deletes one or more regions.
### Input
<TypeList types={[{"name":"string[]","type":"`string`[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"string","type":"`string`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deleteRegionsStep"/>
___
## updateRegionsStep
This step updates regions matching the specified filters.
### Input
<TypeList types={[{"name":"UpdateRegionsStepInput","type":"[UpdateRegionsStepInput](../../types/core_flows.UpdateRegionsStepInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"selector","type":"[FilterableRegionProps](../../../region/interfaces/region.FilterableRegionProps/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterableRegionProps](../../../region/interfaces/region.FilterableRegionProps/page.mdx) \\| [BaseFilterable](../../../region/interfaces/region.BaseFilterable/page.mdx)&#60;[FilterableRegionProps](../../../region/interfaces/region.FilterableRegionProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterableRegionProps](../../../region/interfaces/region.FilterableRegionProps/page.mdx) \\| [BaseFilterable](../../../region/interfaces/region.BaseFilterable/page.mdx)&#60;[FilterableRegionProps](../../../region/interfaces/region.FilterableRegionProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterableRegionProps](../../../region/interfaces/region.FilterableRegionProps/page.mdx) \\| [BaseFilterable](../../../region/interfaces/region.BaseFilterable/page.mdx)&#60;[FilterableRegionProps](../../../region/interfaces/region.FilterableRegionProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"q","type":"`string`","description":"Find regions by name through this search term","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string` \\| `string`[] \\| [OperatorMap](../../../region/types/region.OperatorMap/page.mdx)&#60;string \\| string[]&#62;","description":"The IDs to filter the regions by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string` \\| [OperatorMap](../../../region/types/region.OperatorMap/page.mdx)&#60;string&#62;","description":"Filter regions by their name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string` \\| [OperatorMap](../../../region/types/region.OperatorMap/page.mdx)&#60;string&#62;","description":"Filter regions by their currency code.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>` \\| [OperatorMap](../../../region/types/region.OperatorMap/page.mdx)&#60;Record&#60;string, unknown&#62;&#62;","description":"Filter regions by their metadata.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"[OperatorMap](../../../region/types/region.OperatorMap/page.mdx)&#60;string&#62;","description":"Filter regions by their creation date.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"[OperatorMap](../../../region/types/region.OperatorMap/page.mdx)&#60;string&#62;","description":"Filter regions by their update date.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([BaseFilterable](../../../region/interfaces/region.BaseFilterable/page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseFilterable](../../../region/interfaces/region.BaseFilterable/page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"$or","type":"([FilterableRegionProps](../../../region/interfaces/region.FilterableRegionProps/page.mdx) \\| [BaseFilterable](../../../region/interfaces/region.BaseFilterable/page.mdx)&#60;[FilterableRegionProps](../../../region/interfaces/region.FilterableRegionProps/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([FilterableRegionProps](../../../region/interfaces/region.FilterableRegionProps/page.mdx) \\| [BaseFilterable](../../../region/interfaces/region.BaseFilterable/page.mdx)&#60;[FilterableRegionProps](../../../region/interfaces/region.FilterableRegionProps/page.mdx)&#62;)[]","description":"An array of filters to appLine truncated
### Output
<TypeList types={[{"name":"RegionDTO[]","type":"[RegionDTO](../../../region/interfaces/region.RegionDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"RegionDTO","type":"[RegionDTO](../../../region/interfaces/region.RegionDTO/page.mdx)","optional":false,"defaultValue":"","description":"The region details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The currency code of the region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"automatic_taxes","type":"`boolean`","description":"Setting to indicate whether taxes need to be applied automatically","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"countries","type":"[RegionCountryDTO](../../../region/interfaces/region.RegionCountryDTO/page.mdx)[]","description":"The countries of the region.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the country.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"iso_2","type":"`string`","description":"The ISO 2 code of the country.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"iso_3","type":"`string`","description":"The ISO 3 code of the country.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"num_code","type":"`string`","description":"The country's code number.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the country.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"display_name","type":"`string`","description":"The display name of the country.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"payment_providers","type":"[PaymentProviderDTO](../../../region/interfaces/region.PaymentProviderDTO/page.mdx)[]","description":"Payment providers available in the region","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the payment provider.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_enabled","type":"`string`","description":"Whether the payment provider is enabled.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"created_at","type":"`string`","description":"The date the region was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"The date the region was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, any>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateRegionsStep"/>
@@ -0,0 +1,51 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# Workflows\_Region
## createRegionsWorkflow
This workflow creates one or more regions.
### Steps
<WorkflowDiagram workflow={{"name":"createRegionsWorkflow","steps":[{"type":"step","name":"createRegionsStep","description":"This step creates one or more regions.","link":"../../core_flows.Steps_Region/page.mdx#createregionsstep","depth":1},{"type":"workflow","name":"createPricePreferencesWorkflow","description":"This workflow creates one or more price preferences.","link":"../../core_flows.Workflows_Pricing/page.mdx#createpricepreferencesworkflow","depth":2}]}} />
### Input
<TypeList types={[{"name":"CreateRegionsWorkflowInput","type":"`CreateRegionsWorkflowInput`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createRegionsWorkflow"/>
### Output
<TypeList types={[{"name":"CreateRegionsWorkflowOutput","type":"`CreateRegionsWorkflowOutput`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createRegionsWorkflow"/>
___
## deleteRegionsWorkflow
This workflow deletes one or more regions.
### Steps
<WorkflowDiagram workflow={{"name":"deleteRegionsWorkflow","steps":[{"type":"step","name":"deleteRegionsStep","description":"This step deletes one or more regions.","link":"../../core_flows.Steps_Region/page.mdx#deleteregionsstep","depth":1}]}} />
### Input
<TypeList types={[{"name":"DeleteRegionsWorkflowInput","type":"[DeleteRegionsWorkflowInput](../../types/core_flows.DeleteRegionsWorkflowInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"ids","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deleteRegionsWorkflow"/>
___
## updateRegionsWorkflow
This workflow updates regions matching the specified filters.
### Steps
<WorkflowDiagram workflow={{"name":"updateRegionsWorkflow","steps":[{"type":"step","name":"updateRegionsStep","description":"This step updates regions matching the specified filters.","link":"../../core_flows.Steps_Region/page.mdx#updateregionsstep","depth":1},{"type":"when","condition":"{\n return data.normalizedInput.is_tax_inclusive !== undefined\n }","depth":"2","steps":[{"type":"workflow","name":"updatePricePreferencesWorkflow","description":"This workflow updates one or more price preferences.","link":"../../core_flows.Workflows_Pricing/page.mdx#updatepricepreferencesworkflow","depth":2}]}]}} />
### Input
<TypeList types={[{"name":"UpdateRegionsWorkflowInput","type":"`UpdateRegionsWorkflowInput`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateRegionsWorkflow"/>
### Output
<TypeList types={[{"name":"UpdateRegionsWorkflowOutput","type":"`UpdateRegionsWorkflowOutput`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateRegionsWorkflow"/>
@@ -0,0 +1,8 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# Line Item
## Namespaces
- [Steps\_Line Item](../core_flows.Steps_Line_Item/page.mdx)
- [Workflows\_Line Item](../core_flows.Workflows_Line_Item/page.mdx)
@@ -0,0 +1,7 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# Notification
## Namespaces
- [Steps\_Notification](../core_flows.Steps_Notification/page.mdx)
@@ -0,0 +1,8 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# Payment
## Namespaces
- [Steps\_Payment](../core_flows.Steps_Payment/page.mdx)
- [Workflows\_Payment](../core_flows.Workflows_Payment/page.mdx)
@@ -0,0 +1,8 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# Payment Collection
## Namespaces
- [Steps\_Payment Collection](../core_flows.Steps_Payment_Collection/page.mdx)
- [Workflows\_Payment Collection](../core_flows.Workflows_Payment_Collection/page.mdx)
@@ -0,0 +1,8 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# Region
## Namespaces
- [Steps\_Region](../core_flows.Steps_Region/page.mdx)
- [Workflows\_Region](../core_flows.Workflows_Region/page.mdx)