> ## Documentation Index
> Fetch the complete documentation index at: https://docs.upstackdata.com/llms.txt
> Use this file to discover all available pages before exploring further.

# refund Event

> Track when an order is refunded

Fires when an order is refunded. This helps maintain accurate revenue reporting and adjusts conversion data for ad platforms that support refund events.

<Note>
  **Shopify:** Automatically tracked via the `refunds/create` webhook (server-side).
</Note>

## JavaScript

Full refund:

```javascript theme={null}
window._upstack('track', 'refund', {
  orderId: 'ORD_12345',
  value: 149.99,
  currency: 'USD'
});
```

Partial refund:

```javascript theme={null}
window._upstack('track', 'refund', {
  orderId: 'ORD_12345',
  value: 89.99,
  currency: 'USD',
  items: [
    { id: 'SKU_001', name: 'Blue Running Shoes', price: 89.99, quantity: 1 }
  ]
});
```

## Properties

| Property | Type   | Required | Description                             |
| -------- | ------ | -------- | --------------------------------------- |
| orderId  | string | Yes      | Original order identifier               |
| value    | number | Yes      | Refund amount                           |
| currency | string | No       | ISO 4217 currency code                  |
| items    | array  | No       | Products refunded (for partial refunds) |

## When to Fire

* Refund processed via Shopify admin
* `refunds/create` webhook (server-side)
* Customer service refund action

## Related Events

* [purchase](/pixel/events/purchase) — The original order event
