|
1
|
import { Table } from "docs-ui" |
|
2
|
|
|
3
|
export const metadata = { |
|
4
|
title: `Order Exchange`, |
|
5
|
} |
|
6
|
|
|
7
|
# {metadata.title} |
|
8
|
|
|
9
|
In this guide, you’ll learn about order exchanges. |
|
10
|
|
|
11
|
<Note title="Looking for no-code docs?"> |
|
12
|
|
|
13
|
Refer to this [Medusa Admin User Guide](!user-guide!/orders/exchanges) to learn how to manage an order's exchanges using the dashboard. |
|
14
|
|
|
15
|
</Note> |
|
16
|
|
|
17
|
## What is an Exchange? |
|
18
|
|
|
19
|
An exchange is the replacement of an item that the customer ordered with another item. |
|
20
|
|
|
21
|
A merchant creates the exchange, specifying which items to return and which new items to send. |
|
22
|
|
|
23
|
The [OrderExchange data model](/references/order/models/OrderExchange) represents an exchange. |
|
24
|
|
|
25
|
--- |
|
26
|
|
|
27
|
## Returned and New Items |
|
28
|
|
|
29
|
When an exchange is created, a return, represented by the [Return data model](/references/order/models/Return), is also created to handle receiving the items back from the customer. |
|
30
|
|
|
31
|
<Note> |
|
32
|
|
|
33
|
Refer to the [Returns guide](../return/page.mdx) to learn more about returns and how they work. |
|
34
|
|
|
35
|
</Note> |
|
36
|
|
|
37
|
The [OrderExchangeItem data model](/references/order/models/OrderExchangeItem) represents the new items to be sent to the customer. It's associated with the `OrderExchange` data model. |
|
38
|
|
|
39
|
--- |
|
40
|
|
|
41
|
## Exchange Shipping Methods |
|
42
|
|
|
43
|
An exchange has shipping methods used to send the new items to the customer. They’re represented by the [OrderShippingMethod data model](/references/order/models/OrderShippingMethod). |
|
44
|
|
|
45
|
The shipping methods for the returned items are associated with the exchange's return, as explained in the [Returns guide](../return/page.mdx#return-shipping-methods). |
|
46
|
|
|
47
|
--- |
|
48
|
|
|
49
|
## Exchange Payment |
|
50
|
|
|
51
|
The `OrderExchange` data model has a `difference_due` property that stores the outstanding amount. |
|
52
|
|
|
53
|
<Table> |
|
54
|
<Table.Header> |
|
55
|
<Table.Row> |
|
56
|
<Table.HeaderCell> |
|
57
|
Condition |
|
58
|
</Table.HeaderCell> |
|
59
|
<Table.HeaderCell> |
|
60
|
Result |
|
61
|
</Table.HeaderCell> |
|
62
|
</Table.Row> |
|
63
|
</Table.Header> |
|
64
|
<Table.Body> |
|
65
|
<Table.Row> |
|
66
|
<Table.Cell> |
|
67
|
|
|
68
|
`difference_due < 0` |
|
69
|
|
|
70
|
</Table.Cell> |
|
71
|
<Table.Cell> |
|
72
|
|
|
73
|
The merchant owes the customer a refund of the `difference_due` amount. |
|
74
|
|
|
75
|
</Table.Cell> |
|
76
|
</Table.Row> |
|
77
|
<Table.Row> |
|
78
|
<Table.Cell> |
|
79
|
|
|
80
|
`difference_due > 0` |
|
81
|
|
|
82
|
</Table.Cell> |
|
83
|
<Table.Cell> |
|
84
|
|
|
85
|
The merchant requires additional payment from the customer of the `difference_due` amount. |
|
86
|
|
|
87
|
</Table.Cell> |
|
88
|
</Table.Row> |
|
89
|
<Table.Row> |
|
90
|
<Table.Cell> |
|
91
|
|
|
92
|
`difference_due = 0` |
|
93
|
|
|
94
|
</Table.Cell> |
|
95
|
<Table.Cell> |
|
96
|
|
|
97
|
No payment processing is required. |
|
98
|
|
|
99
|
</Table.Cell> |
|
100
|
</Table.Row> |
|
101
|
</Table.Body> |
|
102
|
</Table> |
|
103
|
|
|
104
|
Any payments or refunds made are stored in the [OrderTransaction data model](/references/order/models/OrderTransaction). |
|
105
|
|
|
106
|
--- |
|
107
|
|
|
108
|
## How Exchanges Impact an Order’s Version |
|
109
|
|
|
110
|
When an exchange is confirmed, the order’s [version](../order-versioning/page.mdx) is incremented. |