> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mercurjs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# confirmReturnReceiveWorkflow

> Confirm a return receival, offer-aware restock included.

Mercur's offer-aware replacement for Medusa's confirm-return-receive flow. Applies the pending receive actions of the return's order change, updates return items' received/damaged quantities, marks the return `received` (or `partially_received`), restocks inventory — expanding offer bundle links by `required_quantity` — and refreshes the order payment collection. Throws when a bundle offer has no stock level at the return's location. Triggered by `POST /admin/returns/:id/receive/confirm` and `POST /vendor/returns/:id/receive/confirm`. Emits `order.return_received`.

## Usage

```ts theme={null}
import { confirmReturnReceiveWorkflow } from "@mercurjs/core/workflows"

const { result } = await confirmReturnReceiveWorkflow(container).run({
  input: { return_id: "return_123", confirmed_by: "user_123" },
})
```

## Input

<ParamField body="return_id" type="string" required>The return whose pending receival is confirmed.</ParamField>
<ParamField body="confirmed_by" type="string">Id of the user confirming the receival.</ParamField>

## Result

<ResponseField name="result" type="OrderPreviewDTO">Preview of the order with the confirmed changes applied.</ResponseField>
