createAndCompleteReturnOrderWorkflow - Medusa Core Workflows Reference

This documentation provides a reference to the createAndCompleteReturnOrderWorkflow. It belongs to the @medusajs/medusa/core-flows package.

This workflow creates and completes a return from the storefront. The admin would receive the return and process it from the dashboard. This workflow is used by the Create Return Store API Route.

You can use this workflow within your customizations or your own custom workflows, allowing you to create a return for an order in your custom flow.

Source Code

Examples#

Steps#

Input#

CreateOrderReturnWorkflowInputCreateOrderReturnWorkflowInput
order_idstring
The ID of the order to return items from.
The items to return.
created_bynull | stringOptional
The ID of the customer that's creating the return
return_shippingobjectOptional
The shipping details of the returned items.
notenull | stringOptional
More details about the return.
receive_nowbooleanOptional
Whether to mark the return as received immediately.
refund_amountnumberOptional
The amount to refund the customer.
location_idnull | stringOptional
The ID of the location to return the items to. If not provided, the return shipping option's location is used.
Was this page helpful?
Ask Anything
FAQ
What is Medusa?
How can I create a module?
How can I create a data model?
How do I create a workflow?
How can I extend a data model in the Product Module?
Recipes
How do I build a marketplace with Medusa?
How do I build digital products with Medusa?
How do I build subscription-based purchases with Medusa?
What other recipes are available in the Medusa documentation?
Chat is cleared on refresh
Line break