# Automatic Refund on Cancellation

When a subscription is cancelled, Limio can automatically trigger a refund in Zuora for any overpayment. This is controlled by the **"Automatically refund cancelled subscriptions"** setting.

## How it works

When a cancellation order is processed and this setting is enabled, Limio will:

1. Preview the cancellation in Zuora to calculate the amount owed or overpaid.
2. If the preview shows a negative amount (i.e. an overpayment by the customer), Limio adds refund processing options to the Zuora cancel order.
3. Zuora then creates a **Credit Memo** and processes the refund automatically as part of the cancellation.

If the preview amount is zero or positive (no overpayment), no refund is triggered — even with the setting enabled.

## Prerequisites

* The user or API client processing the cancellation must have the **`order:update_refund`** permission in Limio. Without this permission, the cancellation will fail with an error.

## Configuration

1. In Limio, go to **Settings > Zuora > Cancel**.
2. Enable **"Automatically refund cancelled subscriptions"**.

The setting is off by default.

{% hint style="warning" %}
**Future-dated cancellations:** Refunds are only triggered when the Zuora preview indicates an actual overpayment. A future-dated cancellation that extends beyond the current billing period will not trigger a refund unless an overpayment exists.
{% endhint %}

## Related

* [How Limio Events Update Zuora](/integrations/keeping-zuora-and-limio-in-sync/how-limio-events-updates-zuora-for-commerce.md) — overview of all customer journeys and how they update Zuora
* [Subflow: Refund](/integrations/using-limio-for-salesforce/manage-subscriptions-flow/subflow-refund.md) — manual refund flow in Limio for Salesforce
* [Recommended Custom Fields in Zuora](/integrations/zuora-integration/how-to-populate-custom-fields-in-zuora/recommended-custom-fields-to-set-up-in-zuora-to-receive-enriched-limio-data.md) — custom fields populated by Limio orders


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.limio.com/integrations/keeping-zuora-and-limio-in-sync/how-limio-events-updates-zuora-for-commerce/automatic-refund-on-cancellation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
