|
1
|
--- |
|
2
|
sidebar_position: 2 |
|
3
|
sidebar_label: "Manage Order Payments" |
|
4
|
tags: |
|
5
|
- user guide |
|
6
|
- order |
|
7
|
- payment |
|
8
|
products: |
|
9
|
- order |
|
10
|
- payment |
|
11
|
--- |
|
12
|
|
|
13
|
import { |
|
14
|
EllipsisHorizontal, |
|
15
|
} from "@medusajs/icons" |
|
16
|
import { Table } from "docs-ui" |
|
17
|
|
|
18
|
export const metadata = { |
|
19
|
title: `Manage Order Payments in Medusa Admin`, |
|
20
|
} |
|
21
|
|
|
22
|
# {metadata.title} |
|
23
|
|
|
24
|
In this guide, you’ll learn how to manage an order’s payment, including capturing and refunding the payment. |
|
25
|
|
|
26
|
## Overview |
|
27
|
|
|
28
|
When a customer places an order, their payment is authorized by the payment provider they've chosen. You can manage an order's payment by capturing it, refunding it, or handling outstanding amounts. |
|
29
|
|
|
30
|
### Order Payment Statuses |
|
31
|
|
|
32
|
At the top of the order details page, you can see the payment status of the order. The payment status can be one of the following: |
|
33
|
|
|
34
|
<Table> |
|
35
|
<Table.Header> |
|
36
|
<Table.Row> |
|
37
|
<Table.HeaderCell> |
|
38
|
Status |
|
39
|
</Table.HeaderCell> |
|
40
|
<Table.HeaderCell> |
|
41
|
Description |
|
42
|
</Table.HeaderCell> |
|
43
|
</Table.Row> |
|
44
|
</Table.Header> |
|
45
|
<Table.Body> |
|
46
|
<Table.Row> |
|
47
|
<Table.Cell>Authorized</Table.Cell> |
|
48
|
<Table.Cell>The default status when an order is placed, unless the payment provider is configured to automatically capture the payment.</Table.Cell> |
|
49
|
</Table.Row> |
|
50
|
<Table.Row> |
|
51
|
<Table.Cell>Partially Authorized</Table.Cell> |
|
52
|
<Table.Cell>Part of the payment is authorized, which happens if an order has changed. For example, if an order was edited and new payment is required.</Table.Cell> |
|
53
|
</Table.Row> |
|
54
|
<Table.Row> |
|
55
|
<Table.Cell>Captured</Table.Cell> |
|
56
|
<Table.Cell>The payment has been captured and processed with the payment provider.</Table.Cell> |
|
57
|
</Table.Row> |
|
58
|
<Table.Row> |
|
59
|
<Table.Cell>Partially Captured</Table.Cell> |
|
60
|
<Table.Cell>A part of the payment has been captured. This happens when an order's payment was previously captured, but a change to the status, such as an exchange, requires additional payment.</Table.Cell> |
|
61
|
</Table.Row> |
|
62
|
<Table.Row> |
|
63
|
<Table.Cell>Refunded</Table.Cell> |
|
64
|
<Table.Cell>The payment has been refunded to the customer.</Table.Cell> |
|
65
|
</Table.Row> |
|
66
|
<Table.Row> |
|
67
|
<Table.Cell>Partially Refunded</Table.Cell> |
|
68
|
<Table.Cell>A part of the payment has been refunded.</Table.Cell> |
|
69
|
</Table.Row> |
|
70
|
</Table.Body> |
|
71
|
</Table> |
|
72
|
|
|
73
|
--- |
|
74
|
|
|
75
|
## Capture Payment |
|
76
|
|
|
77
|
Unless the payment provider that the customer chose is configured to automatically capture an order's payment, you need to manually capture the payment. |
|
78
|
|
|
79
|
Capturing an order's payment triggers its processing with the chosen payment provider, such as Stripe. |
|
80
|
|
|
81
|
<Note> |
|
82
|
|
|
83
|
If you're unsure whether your payment provider is configured to automatically capture payments, please contact your technical team to debug the [integrated payment service](!resources!/commerce-modules/payment/payment-provider). |
|
84
|
|
|
85
|
</Note> |
|
86
|
|
|
87
|
To capture an order’s payment: |
|
88
|
|
|
89
|
1. Open the order's details page. |
|
90
|
2. Scroll to the Payments section. |
|
91
|
3. Click on the Capture Payment button. |
|
92
|
4. Confirm capturing the payment by clicking the "Confirm" button in the pop-up. |
|
93
|
|
|
94
|
 |
|
95
|
|
|
96
|
--- |
|
97
|
|
|
98
|
## Refund Payment |
|
99
|
|
|
100
|
You can refund a payment either partially or in full. This can be done for various reasons, such as when a customer returns an item or if there was an error in the order. |
|
101
|
|
|
102
|
<Note> |
|
103
|
|
|
104
|
Prior to [Medusa v2.11.0](https://github.com/medusajs/medusa/releases/tag/v2.11.0), you were only able to refund a payment after creating a return or making an order change. From Medusa v2.11.0 onwards, you can refund a payment directly from the order details page without needing to create a return or make an order change. If you're unable to refund a payment, contact your technical team to [update your Medusa application](!docs!/learn/update). |
|
105
|
|
|
106
|
</Note> |
|
107
|
|
|
108
|
Refunding the payment triggers its processing with the chosen payment provider, such as Stripe. |
|
109
|
|
|
110
|
<Note type="warning"> |
|
111
|
|
|
112
|
Refunding payments is irreversible. |
|
113
|
|
|
114
|
</Note> |
|
115
|
|
|
116
|
To refund an order's captured payment: |
|
117
|
|
|
118
|
1. Open the order's details page. |
|
119
|
2. Scroll to the Payment section. |
|
120
|
3. Click on the <InlineIcon Icon={EllipsisHorizontal} alt="three-dots" /> icon at the end of the payment to refund. |
|
121
|
4. Choose "Refund" from the dropdown. |
|
122
|
5. In the side window that opens, fill out the following fields: |
|
123
|
- **Settlement type:** If you have the [Loyalty Plugin](!resources!/commerce-modules/loyalty#1-install-the-loyalty-plugin) installed, you can choose how to refund the payment: |
|
124
|
- **Payment method:** Refund the payment using the same payment method the customer used for the order. This is the default option. |
|
125
|
- **Store credit:** Refund the payment to the customer's [store credit account](../../loyalty/store-credits/page.mdx). The customer can then use the store credit balance for future purchases. You can only choose this option if the customer is a registered customer. |
|
126
|
- **Amount**: Enter the amount to refund. |
|
127
|
- **Refund Reason**: Select a reason for the refund from the dropdown. You can [manage refund reasons in the settings](../../settings/refund-reasons/page.mdx). |
|
128
|
- This field doesn't show if you selected to refund to store credit. |
|
129
|
- **Note**: Enter a note that the customer can see in the notification they receive. |
|
130
|
- This field doesn't show if you selected to refund to store credit. |
|
131
|
6. Once you’re done, click on the Save button. |
|
132
|
|
|
133
|
Once the payment is refunded, the customer will receive a notification about the refund and you can view the refund as part of the order's activity. |
|
134
|
|
|
135
|
 |
|
136
|
|
|
137
|
--- |
|
138
|
|
|
139
|
## Handling Positive Outstanding Amounts |
|
140
|
|
|
141
|
An order may have a positive outstanding amount either after making changes to it, or if it was created as a [draft order](../draft-orders/page.mdx). |
|
142
|
|
|
143
|
A positive outstanding amount indicates that the customer needs to pay an additional amount to complete the order. |
|
144
|
|
|
145
|
 |
|
146
|
|
|
147
|
You can handle it by either: |
|
148
|
|
|
149
|
1. [Marking the order as paid manually](#mark-outstanding-amount-as-paid); |
|
150
|
2. Or [copying a payment link](#copy-payment-link-for-additional-payment). |
|
151
|
|
|
152
|
### Mark Outstanding Amount as Paid |
|
153
|
|
|
154
|
By marking a positive outstanding amount as paid, you're capturing the payment without processing it through the associated payment provider. Instead, you handle capturing the payment outside of Medusa. |
|
155
|
|
|
156
|
To mark a positive outstanding amount as paid: |
|
157
|
|
|
158
|
1. Open the order's details page. |
|
159
|
2. In the Summary section, click on the "Mark as paid" button. |
|
160
|
3. Confirm marking the payment as paid by clicking the "Confirm" button in the pop-up. |
|
161
|
|
|
162
|
### Copy Payment Link for Additional Payment |
|
163
|
|
|
164
|
Another way you can handle a positive outstanding amount is by sharing a payment link with the customer to authorize the payment. The payment link is a link in the storefront that the customer can use to pay for the additional amount. |
|
165
|
|
|
166
|
To copy a payment link for the additional payment: |
|
167
|
|
|
168
|
1. Open the order's details page. |
|
169
|
2. In the Summary section, click on the "Copy payment link" button. |
|
170
|
|
|
171
|
The link is then copied and you can share it with the customer to authorize the payment. Once authorized, you can then [capture the payment](../payments/page.mdx#capture-payment). |
|
172
|
|
|
173
|
<Note title="Tip"> |
|
174
|
|
|
175
|
If the payment link doesn't start with a domain or has a domain that doesn't match your storefront, refer your technical team to [this guide](!docs!/learn/configurations/medusa-config#storefronturl) to set up the storefront domain. |
|
176
|
|
|
177
|
</Note> |