# Adds created, updated, and failed events for all refund types

## What’s new

The following events now apply to all types of [refunds](https://docs.stripe.com/refunds.md), including those without a corresponding charge.

- [refund.created](https://docs.stripe.com/api/events/types.md?api-version=2024-10-28.acacia#event_types-refund.created)
- [refund.updated](https://docs.stripe.com/api/events/types.md?api-version=2024-10-28.acacia#event_types-refund.updated)
- [refund.failed](https://docs.stripe.com/api/events/types.md?api-version=2024-10-28.acacia#event_types-refund.failed)

Previously, these events were only sent for refunds without a corresponding charge.

## Impact

Previously, you couldn’t find refund details in the [charge.refunded](https://docs.stripe.com/api/events/types.md?api-version=2024-10-28.acacia#event_types-charge.refunded) event, which was sent after you [created a refund](https://docs.stripe.com/api/refunds/create.md?api-version=2024-10-28.acacia). You can now listen to the [refund.created](https://docs.stripe.com/api/events/types.md?api-version=2024-10-28.acacia#event_types-refund.created) event to get details about the refund, and don’t need to make an extra API call to get the refund ID.

This change also improves the consistency of [event types](https://docs.stripe.com/api/events/types.md?api-version=2024-10-28.acacia) created for all refunds. You don’t need to listen to separate [refund-related events](https://docs.stripe.com/refunds.md?dashboard-or-api=api#refund-events) (for example, [charge.refunded](https://docs.stripe.com/api/events/types.md?api-version=2024-10-28.acacia#event_types-charge.refunded)) depending on whether the refund has a charge or not.

## Changes

#### REST API

| Values | Change | Enums |
| --- | --- | --- |
| `refund.created`, `refund.updated`, `refund.failed` | Added | [Event.type](/api/events/object?api-version=2024-10-28.acacia#event_object-type), [WebhookEndpoint#create.enabled_events[]](/api/webhook_endpoints/create?api-version=2024-10-28.acacia#create_webhook_endpoint-enabled_events), [WebhookEndpoint#update.enabled_events[]](/api/webhook_endpoints/update?api-version=2024-10-28.acacia#update_webhook_endpoint-enabled_events) |

#### Ruby

This change does not affect the Ruby SDK.

#### Python

| Values | Change | Enums |
| --- | --- | --- |
| `refund.created`, `refund.updated`, `refund.failed` | Added | [stripe.Event.type](/api/events/object?api-version=2024-10-28.acacia#event_object-type), [stripe.WebhookEndpoint.CreateParams.enabled_events](/api/webhook_endpoints/create?api-version=2024-10-28.acacia#create_webhook_endpoint-enabled_events), [stripe.WebhookEndpoint.ModifyParams.enabled_events](/api/webhook_endpoints/update?api-version=2024-10-28.acacia#update_webhook_endpoint-enabled_events) |

#### PHP

| Values | Change | Enum |
| --- | --- | --- |
| `refund.created`, `refund.updated`, `refund.failed` | Added | [Event.type](/api/events/object?api-version=2024-10-28.acacia#event_object-type) |

#### Java

| Values | Change | Enums |
| --- | --- | --- |
| `refund.created`, `refund.updated`, `refund.failed` | Added | [WebhookEndpointCreateParams.enabled_events[]](/api/webhook_endpoints/create?api-version=2024-10-28.acacia#create_webhook_endpoint-enabled_events), [WebhookEndpointUpdateParams.enabled_events[]](/api/webhook_endpoints/update?api-version=2024-10-28.acacia#update_webhook_endpoint-enabled_events) |

#### Node.js

| Values | Change | Enums |
| --- | --- | --- |
| `refund.created`, `refund.updated`, `refund.failed` | Added | [Event.type](/api/events/object?api-version=2024-10-28.acacia#event_object-type), [WebhookEndpointCreateParams.enabled_events[]](/api/webhook_endpoints/create?api-version=2024-10-28.acacia#create_webhook_endpoint-enabled_events), [WebhookEndpointUpdateParams.enabled_events[]](/api/webhook_endpoints/update?api-version=2024-10-28.acacia#update_webhook_endpoint-enabled_events) |

#### Go

| Values | Change | Enum |
| --- | --- | --- |
| `refund.created`, `refund.updated`, `refund.failed` | Added | [EventType](/api/events/object?api-version=2024-10-28.acacia#event_object-type) |

#### .NET

This change does not affect the .NET SDK.

## Upgrade

#### REST API

1. [View your current API version](https://docs.stripe.com/upgrades.md#view-your-api-version-and-the-latest-available-upgrade-in-workbench) in Workbench.
2. If you use an SDK, upgrade to the corresponding SDK version for this API version.
   - If you don’t use an SDK, update your [API requests](https://docs.stripe.com/api/versioning.md) to include `Stripe-Version: 2024-10-28.acacia`
3. Upgrade the API version used for [webhook endpoints](https://docs.stripe.com/webhooks/versioning.md).
4. [Test your integration](https://docs.stripe.com/testing.md) against the new version.
5. If you use Connect, [test your Connect integration](https://docs.stripe.com/connect/testing.md).
6. In Workbench, [perform the upgrade](https://docs.stripe.com/upgrades.md#perform-the-upgrade). You can [roll back the version](https://docs.stripe.com/upgrades.md#roll-back-your-api-version) for 72 hours.

Learn more about [Stripe API upgrades](https://docs.stripe.com/upgrades.md).

#### Ruby

1. [View your current API version](https://docs.stripe.com/upgrades.md#view-your-api-version-and-the-latest-available-upgrade-in-workbench) in Workbench.
2. Upgrade your Ruby SDK to [v13.1.0](https://github.com/stripe/stripe-ruby/releases/tag/v13.1.0)
3. Upgrade the API version used for [webhook endpoints](https://docs.stripe.com/webhooks/versioning.md).
4. [Test your integration](https://docs.stripe.com/testing.md) against the new version.
5. If you use Connect, [test your Connect integration](https://docs.stripe.com/connect/testing.md).
6. In Workbench, [perform the upgrade](https://docs.stripe.com/upgrades.md#perform-the-upgrade). You can [roll back the version](https://docs.stripe.com/upgrades.md#roll-back-your-api-version) for 72 hours.

Learn more about [Stripe API upgrades](https://docs.stripe.com/upgrades.md).

#### Python

1. [View your current API version](https://docs.stripe.com/upgrades.md#view-your-api-version-and-the-latest-available-upgrade-in-workbench) in Workbench.
2. Upgrade your Python SDK to [v11.2.0](https://github.com/stripe/stripe-python/releases/tag/v11.2.0)
3. Upgrade the API version used for [webhook endpoints](https://docs.stripe.com/webhooks/versioning.md).
4. [Test your integration](https://docs.stripe.com/testing.md) against the new version.
5. If you use Connect, [test your Connect integration](https://docs.stripe.com/connect/testing.md).
6. In Workbench, [perform the upgrade](https://docs.stripe.com/upgrades.md#perform-the-upgrade). You can [roll back the version](https://docs.stripe.com/upgrades.md#roll-back-your-api-version) for 72 hours.

Learn more about [Stripe API upgrades](https://docs.stripe.com/upgrades.md).

#### PHP

1. [View your current API version](https://docs.stripe.com/upgrades.md#view-your-api-version-and-the-latest-available-upgrade-in-workbench) in Workbench.
2. Upgrade your PHP SDK to [v16.2.0](https://github.com/stripe/stripe-php/releases/tag/v16.2.0)
3. Upgrade the API version used for [webhook endpoints](https://docs.stripe.com/webhooks/versioning.md).
4. [Test your integration](https://docs.stripe.com/testing.md) against the new version.
5. If you use Connect, [test your Connect integration](https://docs.stripe.com/connect/testing.md).
6. In Workbench, [perform the upgrade](https://docs.stripe.com/upgrades.md#perform-the-upgrade). You can [roll back the version](https://docs.stripe.com/upgrades.md#roll-back-your-api-version) for 72 hours.

Learn more about [Stripe API upgrades](https://docs.stripe.com/upgrades.md).

#### Java

1. [View your current API version](https://docs.stripe.com/upgrades.md#view-your-api-version-and-the-latest-available-upgrade-in-workbench) in Workbench.
2. Upgrade your Java SDK to [v28.0.0](https://github.com/stripe/stripe-java/releases/tag/v28.0.0)
3. Upgrade the API version used for [webhook endpoints](https://docs.stripe.com/webhooks/versioning.md).
4. [Test your integration](https://docs.stripe.com/testing.md) against the new version.
5. If you use Connect, [test your Connect integration](https://docs.stripe.com/connect/testing.md).
6. In Workbench, [perform the upgrade](https://docs.stripe.com/upgrades.md#perform-the-upgrade). You can [roll back the version](https://docs.stripe.com/upgrades.md#roll-back-your-api-version) for 72 hours.

Learn more about [Stripe API upgrades](https://docs.stripe.com/upgrades.md).

#### Node.js

1. [View your current API version](https://docs.stripe.com/upgrades.md#view-your-api-version-and-the-latest-available-upgrade-in-workbench) in Workbench.
2. Upgrade your Node SDK to [v17.3.0](https://github.com/stripe/stripe-node/releases/tag/v17.3.0)
3. Upgrade the API version used for [webhook endpoints](https://docs.stripe.com/webhooks/versioning.md).
4. [Test your integration](https://docs.stripe.com/testing.md) against the new version.
5. If you use Connect, [test your Connect integration](https://docs.stripe.com/connect/testing.md).
6. In Workbench, [perform the upgrade](https://docs.stripe.com/upgrades.md#perform-the-upgrade). You can [roll back the version](https://docs.stripe.com/upgrades.md#roll-back-your-api-version) for 72 hours.

Learn more about [Stripe API upgrades](https://docs.stripe.com/upgrades.md).

#### Go

1. [View your current API version](https://docs.stripe.com/upgrades.md#view-your-api-version-and-the-latest-available-upgrade-in-workbench) in Workbench.
2. Upgrade your Go SDK to [v81.0.0](https://github.com/stripe/stripe-go/releases/tag/v81.0.0)
3. Upgrade the API version used for [webhook endpoints](https://docs.stripe.com/webhooks/versioning.md).
4. [Test your integration](https://docs.stripe.com/testing.md) against the new version.
5. If you use Connect, [test your Connect integration](https://docs.stripe.com/connect/testing.md).
6. In Workbench, [perform the upgrade](https://docs.stripe.com/upgrades.md#perform-the-upgrade). You can [roll back the version](https://docs.stripe.com/upgrades.md#roll-back-your-api-version) for 72 hours.

Learn more about [Stripe API upgrades](https://docs.stripe.com/upgrades.md).

#### .NET

1. [View your current API version](https://docs.stripe.com/upgrades.md#view-your-api-version-and-the-latest-available-upgrade-in-workbench) in Workbench.
2. Upgrade your .NET SDK to [v47.0.0](https://github.com/stripe/stripe-dotnet/releases/tag/v47.0.0)
3. Upgrade the API version used for [webhook endpoints](https://docs.stripe.com/webhooks/versioning.md).
4. [Test your integration](https://docs.stripe.com/testing.md) against the new version.
5. If you use Connect, [test your Connect integration](https://docs.stripe.com/connect/testing.md).
6. In Workbench, [perform the upgrade](https://docs.stripe.com/upgrades.md#perform-the-upgrade). You can [roll back the version](https://docs.stripe.com/upgrades.md#roll-back-your-api-version) for 72 hours.

Learn more about [Stripe API upgrades](https://docs.stripe.com/upgrades.md).
