> For the complete documentation index, see [llms.txt](https://docs.xorosoft.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.xorosoft.com/xoroerp-1/connected-apps/shopify/understanding-shopify-refunds-in-xoro.md).

# Understanding Shopify Refunds in Xoro

### Overview

When a Shopify order is successfully paid, a **Customer Deposit** is created in Xoro for the payment amount associated with the corresponding Sales Order.

When a refund is processed in Shopify, Xoro determines how to process the refund based on the **current status of the Sales Order**. Depending on whether the order is still in the fulfilment process or has already been shipped, the refund is processed through either the **Customer Deposit** or a **Credit Memo**.

* If the Sales Order is **Released / Unallocated** or **Released / Allocated**, the refund is processed against the existing **Customer Deposit**.
* If the Sales Order has already been **Shipped**, the Customer Deposit is not refunded. Instead, Xoro creates a **Credit Memo** for the applicable refund amount.

Xoro also updates the related **Sales Order** and **Wave**, when applicable, based on the order status and the quantity and amount being refunded.

### Workflow

#### **When an SO in Released/Allocated Status is refunded**

When a Sales Order is in **Released/ Allocated** status, the order has already been allocated for fulfilment and has a Wave associated with it. If the customer requests a refund before the order is marked as **Fulfilled/Shipped** in Shopify, the refund is processed against the **Customer Deposit** created for the Shopify order.

**Step 1:** Create a Sales Order in Shopify by adding the required product.

<figure><img src="https://3188343778-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fkf8DNCjEfcSm64PCPcmf%2Fuploads%2F0lrSu33NHN4ojIUAnOh6%2Fimage.png?alt=media&amp;token=1cb15bf1-a3e5-431a-b657-9d326bd6d5d0" alt=""><figcaption></figcaption></figure>

**Step 2:** In Xoro, go to the **Shopify Channel** and open the **Orders** tab. Click **Actions → Import by Order**, enter the Shopify **Order Number**, and click **Import** to import the order into Xoro.

<figure><img src="https://3188343778-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fkf8DNCjEfcSm64PCPcmf%2Fuploads%2FNml12JaOF6JwOF7uMIBd%2Fimage.png?alt=media&amp;token=9f98fc94-129d-473b-9ba3-21816980d252" alt=""><figcaption></figcaption></figure>

**Step 3:** After the order is imported, a corresponding Sales Order is created in Xoro in **Released/Allocated** status.&#x20;

<figure><img src="https://3188343778-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fkf8DNCjEfcSm64PCPcmf%2Fuploads%2FCgwUtAUreZOtZgQY1XK0%2Fimage.png?alt=media&amp;token=4ef98f84-7c09-45c0-a049-282b0f615c06" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
This status is determined by the **Auto release sales orders** and **Auto wave sales orders** settings enabled under the **Warehousing** section of the Shopify Channel's Orders tab. Since both settings are enabled, the Sales Order is automatically released and allocated.
{% endhint %}

**Step 4:** Go back to Shopify and open the same order. Click **Collect payment**, select **Mark as paid**, and select **Cash on Delivery** as the payment method. The order is then marked as **Paid** in Shopify.

<figure><img src="https://3188343778-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fkf8DNCjEfcSm64PCPcmf%2Fuploads%2FS0XzmKDSpUXngrphVZpu%2Fimage.png?alt=media&amp;token=c7886673-865b-4fe1-b677-62433f7b6293" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3188343778-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fkf8DNCjEfcSm64PCPcmf%2Fuploads%2FzjnpgWLA9JlDZm4T2QNe%2Fimage.png?alt=media&amp;token=e565c729-2dfb-47dd-9bd8-36dde575840b" alt=""><figcaption></figcaption></figure>

**Step 5:** After the payment is collected, the Sales Order in Xoro is updated with a **Customer Deposit** equivalent to the payment amount collected for the Shopify order.

<figure><img src="https://3188343778-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fkf8DNCjEfcSm64PCPcmf%2Fuploads%2FLT93rOpT0zxqkWKvwNK3%2Fimage.png?alt=media&amp;token=1e4619e5-2a77-4a49-89af-a7c3a49beda0" alt=""><figcaption></figcaption></figure>

**Step 6:** Go back to Shopify and open the paid order. Click **Refund** to open the refund screen.

<figure><img src="https://3188343778-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fkf8DNCjEfcSm64PCPcmf%2Fuploads%2FhcgQHCEowNl9bELru0g1%2Fimage.png?alt=media&amp;token=aec04baa-eef9-4353-a02e-e182d52d205c" alt=""><figcaption></figcaption></figure>

**Step 7:** On the **Create a refund** page, enter the item quantity, shipping amount to be refunded, and select the required **Refund reason**. Review the refund amount and other details, and click **Refund** to process the refund.

<figure><img src="https://3188343778-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fkf8DNCjEfcSm64PCPcmf%2Fuploads%2F5YOZ1codA8Ut4kszAWYn%2Fimage.png?alt=media&amp;token=813e0b64-7031-49c0-8d42-66ec37989bf9" alt=""><figcaption></figcaption></figure>

**Step 8:** After the refund is processed, the Shopify order is updated to **Refunded** when the entire order amount is refunded.

<figure><img src="https://3188343778-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fkf8DNCjEfcSm64PCPcmf%2Fuploads%2FQdNB0DjRDY51lPI5lZ3i%2Fimage.png?alt=media&amp;token=ecc5065a-6c1f-4cac-86f4-a896c79e18c2" alt=""><figcaption></figcaption></figure>

**Step 9:** Reimport the same Shopify order into Xoro from the **Orders** tab by selecting **Actions → Import by Order**, entering the Shopify Order Number, and clicking **Import**.

**Step 10:** After the order is reimported, Xoro processes the refund against the **Customer Deposit** associated with the Sales Order, and the Customer Deposit is marked as refunded.

<figure><img src="https://3188343778-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fkf8DNCjEfcSm64PCPcmf%2Fuploads%2FXf6KZfVxLt8bhjtvlNue%2Fimage.png?alt=media&amp;token=e8af3614-9f00-47c1-8c50-4334b387168f" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3188343778-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fkf8DNCjEfcSm64PCPcmf%2Fuploads%2Fg4smXQlEUZOhmpgEVTIF%2Fimage.png?alt=media&amp;token=c5b9b9fa-c7e5-4826-9629-73b8cf6c51ff" alt=""><figcaption></figcaption></figure>

**Step 11:** Since the complete quantity and amount of the unshipped order have been refunded, the Sales Order is **Cancelled/Unallocated** in Xoro. The associated Wave is also **Voided**.

<figure><img src="https://3188343778-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fkf8DNCjEfcSm64PCPcmf%2Fuploads%2FDQbeS7S8aimU6YGv3ZkT%2Fimage.png?alt=media&amp;token=174f2bd4-29bf-49a7-b67f-5b6b2a70494b" alt=""><figcaption></figcaption></figure>

**Step 12:** Click on the **Customer Refund number** to see the details of the **Customer Refund** record generated.

<figure><img src="https://3188343778-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fkf8DNCjEfcSm64PCPcmf%2Fuploads%2FZlsdgxZ34PhWL2JImEH0%2Fimage.png?alt=media&amp;token=b4d4f2ba-8ce5-4d76-aed9-88f67d89bc11" alt=""><figcaption></figcaption></figure>

#### **When an SO in Shipped Status is Refunded**

When a Sales Order has already been **shipped**, the refund is not processed against the **Customer Deposit**. Instead, when the Shopify refund is imported into Xoro, a **Credit Memo** is created for the applicable refund amount and marked as **Refunded**.

**Step 1:** In Shopify, open the required order and click **Mark as fulfilled**.

<figure><img src="https://3188343778-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fkf8DNCjEfcSm64PCPcmf%2Fuploads%2FA2GFabxS3qDLAI7xdbck%2Fimage.png?alt=media&amp;token=250bcf3c-3562-4c6c-81d3-f7acb3e07201" alt=""><figcaption></figcaption></figure>

**Step 2:** Enter the **Tracking number** and select the **Shipping carrier**. Click **Mark as fulfilled** to complete the fulfilment.

<figure><img src="https://3188343778-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fkf8DNCjEfcSm64PCPcmf%2Fuploads%2FiE0ap52TEM3IbrZxhPm4%2Fimage.png?alt=media&amp;token=7788d725-9040-457e-9168-54c62c4218ae" alt=""><figcaption></figcaption></figure>

**Step 3:** After the order is fulfilled, click **Collect payment** and select **Mark as paid**.

<figure><img src="https://3188343778-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fkf8DNCjEfcSm64PCPcmf%2Fuploads%2FpmD8qgADVnXLKhdaaRpE%2Fimage.png?alt=media&amp;token=6ef1f6f4-0ae8-484b-8949-0883297785d0" alt=""><figcaption></figcaption></figure>

**Step 4:** In the **Mark as paid** window, select **Cash on Delivery (COD)** as the payment method and click **Mark as paid**.

<figure><img src="https://3188343778-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fkf8DNCjEfcSm64PCPcmf%2Fuploads%2FY05AwYpFTvUkXaIZMhdH%2Fimage.png?alt=media&amp;token=5a8dadc7-1b25-4a05-86bc-23ec63a06b79" alt=""><figcaption></figcaption></figure>

**Step 5:** In Xoro, go to the **Shopify Channel** and open the **Orders** tab. Click **Actions → Import by Order**, enter the Shopify **Order Number**, and click **Import**.

<figure><img src="https://3188343778-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fkf8DNCjEfcSm64PCPcmf%2Fuploads%2Fap4NaMNacxFl6imcc929%2Fimage.png?alt=media&amp;token=12844385-56a5-4ce7-b5a9-59051452c2ef" alt=""><figcaption></figcaption></figure>

**Step 6:** After the order is imported, the corresponding Sales Order in Xoro is **created with Shipped status**. The **Customer Deposit** associated with the Sales Order is also applied to the order.

<figure><img src="https://3188343778-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fkf8DNCjEfcSm64PCPcmf%2Fuploads%2FgfOIwamoKqqab70tlyHB%2Fimage.png?alt=media&amp;token=82f47879-792a-45e9-b3a7-2e011b1b15d8" alt=""><figcaption></figcaption></figure>

**Step 7:** Go back to Shopify and open the respective **Sales Order**. Click **Refund**.

<figure><img src="https://3188343778-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fkf8DNCjEfcSm64PCPcmf%2Fuploads%2FJ2pmeJTDXrsgDwVdiF2s%2Fimage.png?alt=media&amp;token=4c4d7272-993f-4f92-b247-55e64aaf7a5e" alt=""><figcaption></figcaption></figure>

**Step 8:** On the **Refund** page, enter the quantity and shipping amount to be refunded. Review the **Refund amount** and click **Refund** to process the refund.

<figure><img src="https://3188343778-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fkf8DNCjEfcSm64PCPcmf%2Fuploads%2FmiBa4w7RMSMbhGe1pZTb%2Fimage.png?alt=media&amp;token=306089a6-3299-4d93-9832-6ac3315365d0" alt=""><figcaption></figcaption></figure>

**Step 9:** After the refund is processed, the Shopify order is updated to **Refunded**.

<figure><img src="https://3188343778-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fkf8DNCjEfcSm64PCPcmf%2Fuploads%2FUtpk8E6flwXFMgY8ECr5%2Fimage.png?alt=media&amp;token=4b00ef4f-4405-4962-be67-3232c60adff5" alt=""><figcaption></figcaption></figure>

**Step 10:** Reimport the same Shopify order into Xoro from the **Orders** tab by selecting **Actions → Import by Order**, entering the Shopify **Order Number**, and clicking **Import**.

**Step 11:** After the order is reimported, Xoro identifies that the Sales Order is already **Shipped**. Instead of refunding the Customer Deposit, Xoro creates a **Credit Memo** for the refunded amount.

**Step 12:** Open the Sales Order and select the **History** tab to verify the refund-related transactions. The history displays the **Credit Created** and **Credit Memo Refund** records with their respective amounts and **Refunded** status.

<figure><img src="https://3188343778-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fkf8DNCjEfcSm64PCPcmf%2Fuploads%2FOG9Sd93vqAe53aycfggn%2Fimage.png?alt=media&amp;token=087eebd0-94ca-4e5c-9e81-418afece290b" alt=""><figcaption></figcaption></figure>

**Step 13:** Go to the **Credit Memo Centre** and locate the corresponding Credit Memo.&#x20;

<figure><img src="https://3188343778-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fkf8DNCjEfcSm64PCPcmf%2Fuploads%2FXa8OXXtKNdAbHASqN71n%2Fimage.png?alt=media&amp;token=de622cde-6755-4a66-9cbb-356640914376" alt=""><figcaption></figcaption></figure>

**Step 14:** Open the Invoice Credit Memo to view its details. The **Refunded** amount is displayed, and the **Remaining Amount** is **0.00**, confirming that the refund has been fully processed.

<figure><img src="https://3188343778-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fkf8DNCjEfcSm64PCPcmf%2Fuploads%2F572Yy6JppdEZPsO9tGSN%2Fimage.png?alt=media&amp;token=2b174f77-5455-4029-a8df-584958ba1d8f" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.xorosoft.com/xoroerp-1/connected-apps/shopify/understanding-shopify-refunds-in-xoro.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
