Skip to content

Refunds

Christian Dangl edited this page Sep 29, 2022 · 13 revisions

Shopware Backend

If you want to start a refund from the Shopware Backend, please follow these steps:

Full/Partial Amount Refunds

You can easily refund a complete order as soon as it has been marked as "completed" or "shipped".

Open the orders list in the Shopware Backend. Orders that can be refunded will have an icon in the Mollie Actions column that says "Refund Order" when you hover it.

Confirm the refund by setting either the full or a partial amount and you're done.

Partial Item Refunds

The Shopware Backend allows you to do partial refunds only on payments that have an order in Mollie. If you only create transactions due to your plugin configuration, this might not be possible at the moment. However, Klarna should always work.

See the orders list in the Shopware Backend and open the details of the order you want to refund. In the window of the order, select the "positions" tab.

The line items that can be refunded will have a corresponding icon in the Mollie Actions column. After pressing this, you can adjust the number of quantities that will be returned.

Confirm the quantity and you're done.

Please note, once all items of a position are refunded, the icon will not be visible anymore.

CLI Command

If you want to add some automation to your workflows, you can use the provided CLI command to start refunds.

mollie:orders:refund orderNumber [amount]

Full Refunds

If you want to do a full refund on any order (transactions or orders in Mollie) just run the command and provide your Shopware order number like this:

mollie:orders:refund 200xxx

You should get immediate response if it worked, or what the problem was.

Partial Refunds

If you want to do a partial refund on any order (transactions or orders in Mollie) just run the command and provide your Shopware order number along with the custom amount to refund:

mollie:orders:refund 200xxx 19.99

You should get immediate response if it worked, or what the problem was.

Please keep in mind, Mollie does not allow partial refunds with custom amounts on specific line item. Thus, the Shopware plugin starts a refund of the underlying Mollie transaction, if paid and allowed to be refunded. This means that your Mollie order might not show a refund, but the connected transaction shows everything.

Shopware API

You can also trigger refunds by using the Shopware API.

Please configure a user in the backend with API access, which will then be used to authenticate.

Refunds can either be started as full refund or partial refund.

Full Refunds

Use this URL and provide the Shopware order number to start a full refund for this order.

https://my-shop.domain/api/mollie/refund/order?number=(swOrderNumber)

Partial Refunds

Use this URL and provide the Shopware order number to start a partial refund with the provided amount for this order.

https://my-shop.domain/api/mollie/refund/order?number=(swOrderNumber)&amount=20.5

Please keep in mind, Mollie does not allow partial refunds with custom amounts on specific line item. Thus, the Shopware plugin starts a refund of the underlying Mollie transaction, if paid and allowed to be refunded. This means that your Mollie order might not show a refund, but the connected transaction shows everything.

Logs

The Mollie Shopware pugin logs all actions on refunds. Whether if started from CLI or the Shopware Backend, everything is logged.

So if you ever wonder why something got refunded, you can easily scan your logs and see how it got triggered.

Troubleshooting

Order refunded but still paid

With one of the recent changes in Mollie, the process of a refund takes a bit. So if you start a refund, it's not automatically refunded and thus appears as "paid" in Shopware. Once the refund is complete, it will be automatically updated in Shopware using webhook notifications.

To verify that everything is correct from your side, please open the Transaction in your Mollie Dashboard and search for a pending refund process on that page.

Refund with Discounts and Promotions

Shopware creates a separate line item for cart discounts.

This means that your discount will not be considered if you do a partial refund only on a single product line item.

The amount to be refunded does also somehow depend on what you, as a merchant, prefer in that situation. So let's imagine "buy 3 same t-shirts and get 1 FREE". The customer then returns 1 item - what would you refund - 1 full price, 1/3rd price or NOTHING?

The only solution is to do a refund with a custom amount that you, as a merchant, can approve and use.

At the moment this can only be done with a CLI command or directly in the Mollie Dashboard.

Clone this wiki locally