Skip to content

Commerce 15.3.0: Refund and partial refund #7037

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 17 commits into from
Apr 29, 2025
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions 15/umbraco-commerce/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@
* [Fixed Rate Shipping](reference/shipping/fixed-rate-shipping.md)
* [Dynamic Rate Shipping](reference/shipping/dynamic-rate-shipping.md)
* [Realtime Rate Shipping](reference/shipping/realtime-rate-shipping.md)
* [Payments](reference/payments/README.md)
* [Refund Configurations](reference/payments/refund-configs.md)
* [Refund Payments](reference/payments/issue-a-refund.md)
* [Taxes](reference/taxes/README.md)
* [Fixed Tax Rates](reference/taxes/fixed-tax-rates.md)
* [Calculated Tax Rates](reference/taxes/calculated-tax-rates.md)
Expand Down
5 changes: 3 additions & 2 deletions 15/umbraco-commerce/key-concepts/payment-providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,15 @@ The implementable management methods are:
* **FetchPaymentStatusAsync** - The `FetchPaymentStatusAsync` method communicates with the 3rd party payment gateway in order to fetch the current status of the given transaction.
* **CapturePaymentAsync** - The `CapturePaymentAsync` method communicates with the 3rd party payment gateway to capture a previously authorized payment associated with the given transaction.
* **CancelPaymentAsync** - The `CancelPaymentAsync` method communicates with the 3rd party payment gateway to cancel a previously authorized payment associated with the given transaction.
* **RefundPaymentAsync** - The `RefundPaymentAsync` method communicates with the 3rd party payment gateway to refund a previously captured payment associated with the given transaction.
* **RefundPaymentAsync** - The `RefundPaymentAsync` method communicates with the 3rd party payment gateway to refund a previously captured payment associated with the given transaction. The implementation of this method sends a refund request to the 3rd party payment gateway. This will allow Umbraco Commerce to update the payment details, or throw an exception to indicate that the refund action should be ignored. The method supports both full and partial refunds.

For each implemented method above, developers should also implement a corresponding boolean property returning a `true` value. This is to let Umbraco Commerce know that the given feature is supported by the Payment Provider.

* **CanFetchPaymentStatus**
* **CanCapturePayments**
* **CanCancelPayments**
* **CanRefundPayments**
* **CanPartiallyRefundPayments** (*available from version 15.3.0*)

## Payment Provider Meta Data

Expand Down Expand Up @@ -124,4 +125,4 @@ Umbraco Commerce will automatically look for the following entries:
| `ucPaymentProviders_{providerAlias}MetaData{metaDataAlias}Label` | A label for a provider transaction metadata item |
| `ucPaymentProviders_{providerAlias}MetaData{metaDataAlias}Description` | A description of a provider transaction metadata item |

Here `{providerAlias}` is the alias of the provider, `{settingAlias}` is the alias of a setting, and `{metaDataAlias}` is the alias of a transaction meta data item.
Here `{providerAlias}` is the alias of the provider, `{settingAlias}` is the alias of a setting, and `{metaDataAlias}` is the alias of a transaction meta data item.
Binary file added 15/umbraco-commerce/media/order_list.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 15/umbraco-commerce/media/order_refund_modal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions 15/umbraco-commerce/reference/payments/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
description: Payment management in Umbraco Commerce.
---

# Payments

Umbraco Commerce offers a user-friendly interface within the backoffice to efficiently manage order payments.

## [Refund](refund-configs.md)

Umbraco Commerce supports issuing full and partial refunds directly from the backoffice for payment methods. This includes invoicing, Stripe, PayPal, and more.


29 changes: 29 additions & 0 deletions 15/umbraco-commerce/reference/payments/issue-a-refund.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
description: This page guides you through the steps to issue a refund for a captured order using Umbraco Commerce.
---

## Refund Order
{% hint style="info" %}
You can issue a refund only if the payment method used supports refunds. Learn how to enable payment refunds [here](./refund-configs.md).
{% endhint %}

To refund an order, follow these steps:

1. Go to **Settings**.
2. Open the **Commerce** section.
3. Select your store from the **Stores** section.
4. Go to **Orders**.
5. Click on the order that you want to refund.
![Select the order that you want to refund](../../media/order_list.png)
6. On the order details page, you can click the **Refund Payment** button to open the refund modal.
![Refund Payment button](../../media/refund_payment_button.png)
7. Fill in information in the Order Refund modal:
- **Order Lines section** (*only available if partial refunds are enabled*): In this section, you can enter the quantity you want to refund from each order line.
- **Restock Products toggle**: This is a flag that tells Umbraco Commerce to restock the refunded products.
- **Refund Amount textbox**: Displays the amount that will be refunded. Its value is auto-populated but you can enter any positive number as long as it's smaller than the refundable amount.
- **Refund button**: Clicking on this button will issue a refund with the **Refund Amount** above.
- **Refund All button**: Clicking on this button will issue a refund for the remaining refundable amount of the order.
![Refund Modal](../../media/order_refund_modal.png)
8. If partial refunds is enabled, you can click on the **Refund** button to refund the desired amount or click on the **Refund All** button to refund the full refundable amount.
9. The refund history along with other transaction history can be found by clicking on the information icon at the top right corner of the Payment Details section:
![Payment Details button](../../media/payment_details_button.png)
21 changes: 21 additions & 0 deletions 15/umbraco-commerce/reference/payments/refund-configs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
description: This page will guide you on how to enable the refund feature for a payment method.
---

## Configuring Refund for a payment method

To enable the refund feature, follow these steps:

1. Go to **Settings**.
2. Select your store from the **Stores** section.
3. Go to **Payment Methods**.
![Payment Methods](../../media/payment_methods_list.png)

4. Click to the payment method that you want to configure. In this example, we'll enable refund for the **Invoicing** payment method.

5. Toggle on **Refund Payments** and **Partially Refund Payments**, if desired.
![Refund settings](../../media/payment_method_refund_section.png)

6. Click **Save**.

Once refunds are enabled, you can issue refunds for a captured order. See the details on how to do that [here](./issue-a-refund.md).