> ## 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.

# payment_refunded Event

> Track when a payment is refunded to the customer.

Fires when a payment is refunded to the customer. Use this event to track refund rates and understand customer satisfaction issues.

## JavaScript

```javascript theme={null}
window._upstack('track', 'payment_refunded', {
  accountId: 'acct_abc123',
  invoiceId: 'inv_ghi012',
  chargeId: 'ch_abc123',
  subscriptionId: 'sub_def456',
  amount: 9900,
  refundReason: 'customer_request',
  currency: 'USD',
  isPartialRefund: false
});
```

## Properties

| Property        | Type    | Required | Description                      |
| --------------- | ------- | -------- | -------------------------------- |
| accountId       | string  | Yes      | Account identifier               |
| amount          | number  | Yes      | Refunded amount in cents         |
| chargeId        | string  | No       | Original charge identifier       |
| invoiceId       | string  | No       | Invoice identifier               |
| subscriptionId  | string  | No       | Subscription identifier          |
| refundReason    | string  | No       | Reason for refund                |
| currency        | string  | No       | ISO 4217 currency code           |
| isPartialRefund | boolean | No       | Whether this is a partial refund |

## When to Fire

* When refund is processed
* When Stripe `charge.refunded` webhook fires
* When support issues refund

## Stripe Webhook

Maps to `charge.refunded`.
