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 all 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)
* [Configure Refunds](reference/payments/refund-configs.md)
* [Issue Refunds](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.
15 changes: 15 additions & 0 deletions 15/umbraco-commerce/reference/payments/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
description: Payment management in Umbraco Commerce.
---

# Payments

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

## Refunds

Umbraco Commerce supports issuing full and partial refunds directly from the backoffice for payment methods. This includes invoicing, Stripe, PayPal, and more.
- [Configure refunds](refund-configs.md)
- [Issue refunds](issue-a-refund.md)


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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
38 changes: 38 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,38 @@
---
description: This page guides you through the steps to issue a refund for a captured order using Umbraco Commerce.
---

# Issue Refunds

{% hint style="info" %}
You can issue a refund only if the payment method used supports refunds. Learn how to enable payment refunds [in the Configure Refunds](refund-configs.md) article.
{% endhint %}

To refund an order, follow the steps outlined below:

1. Go to **Settings** in the Umbraco backoffice.
2. Open the **Commerce** section.
3. Select your store from the **Stores** section.
4. Go to **Orders**.

![Order list](images/order_list.png)

5. Select the order that you want to refund.
6. Click **Refund Payment** on the Order Details page.

![Refund Payment button](images/refund_payment_button.png)

7. Fill in the fields in the Order Refund modal:
- **Order Lines section** (*only available if partial refunds are enabled*): 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 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.

![Order refund modal](images/order_refund_modal.png)

8. Click on the **Refund** button to refund the desired amount or the **Refund All** button to refund the full refundable amount (*only available if partial refunds are enabled*).

Find the refund history by clicking on the information icon at the top-right corner of the Payment Details section.

![Payment Details button](images/payment_details_button.png)
23 changes: 23 additions & 0 deletions 15/umbraco-commerce/reference/payments/refund-configs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
description: This page will guide you on how to enable the refund feature for a payment method.
---

# Configure Refunds

To enable the refund feature for a payment method, follow the steps outlined below:

1. Go to **Settings** in the Umbraco backoffice.
2. Select your store from the **Stores** section.
3. Go to **Payment Methods**.

![Payment Methods](images/payment_methods_list.png)

4. Select the payment method you want to configure. The **Invoicing** payment method is used as an example in this guide.

5. Toggle **Refund Payments** and **Partially Refund Payments** if needed.

![Refund settings](images/payment_method_refund_section.png)

6. Click **Save**.

Once refunds are enabled, you can issue refunds for a captured order. Learn how refunds are issued in the [Issue Refunds](issue-a-refund.md) article.