# Renames the allowed_source_types field for sources to payment_method_types

## What’s new

Renames `allowed_source_types` to `payment_method_types`.

## Impact

Update your code to use the new parameter name when specifying acceptable payment methods for a transaction. This modification provides more consistent terminology aligned with the broader concept of payment methods.

## Changes

#### REST API

| Parameters | Change | Resources or endpoints |
| --- | --- | --- |
| `allowed_source_types` | Removed | [Checkout.Session#create](/api/checkout/sessions/create?api-version=2024-06-20), [PaymentIntent](/api/payment_intents/object?api-version=2024-06-20), [PaymentIntent#confirm](/api/payment_intents/confirm?api-version=2024-06-20), [PaymentIntent#create](/api/payment_intents/create?api-version=2024-06-20), [PaymentIntent#update](/api/payment_intents/update?api-version=2024-06-20) |
| `payment_method_types` | Added | [PaymentIntent](/api/payment_intents/object?api-version=2024-06-20#payment_intent_object-payment_method_types) |

#### Ruby

| Parameters | Change | Resources or methods |
| --- | --- | --- |
| `allowed_source_types` | Removed | [Checkout::SessionCreateParams](/api/checkout/sessions/create?api-version=2024-06-20), [PaymentIntent](/api/payment_intents/object?api-version=2024-06-20), [PaymentIntentConfirmParams](/api/payment_intents/confirm?api-version=2024-06-20), [PaymentIntentCreateParams](/api/payment_intents/create?api-version=2024-06-20), [PaymentIntentUpdateParams](/api/payment_intents/update?api-version=2024-06-20) |
| `payment_method_types` | Added | [PaymentIntent](/api/payment_intents/object?api-version=2024-06-20#payment_intent_object-payment_method_types) |

#### Python

| Parameters | Change | Resources or methods |
| --- | --- | --- |
| `allowed_source_types` | Removed | [PaymentIntent](/api/payment_intents/object?api-version=2024-06-20), [PaymentIntentConfirmParams](/api/payment_intents/confirm?api-version=2024-06-20), [PaymentIntentCreateParams](/api/payment_intents/create?api-version=2024-06-20), [PaymentIntentModifyParams](/api/payment_intents/update?api-version=2024-06-20), [checkout.SessionCreateParams](/api/checkout/sessions/create?api-version=2024-06-20) |
| `payment_method_types` | Added | [PaymentIntent](/api/payment_intents/object?api-version=2024-06-20#payment_intent_object-payment_method_types) |

#### PHP

| Parameters | Change | Resources or methods |
| --- | --- | --- |
| `allowed_source_types` | Removed | [Checkout\Session.create().$params](/api/checkout/sessions/create?api-version=2024-06-20), [PaymentIntent](/api/payment_intents/object?api-version=2024-06-20), [PaymentIntent.confirm().$params](/api/payment_intents/confirm?api-version=2024-06-20), [PaymentIntent.create().$params](/api/payment_intents/create?api-version=2024-06-20), [PaymentIntent.update().$params](/api/payment_intents/update?api-version=2024-06-20) |
| `payment_method_types` | Added | [PaymentIntent](/api/payment_intents/object?api-version=2024-06-20#payment_intent_object-payment_method_types) |

#### Java

| Parameters | Change | Resources or methods |
| --- | --- | --- |
| `allowedSourceTypes` | Removed | [PaymentIntent](/api/payment_intents/object?api-version=2024-06-20), [PaymentIntentConfirmParams](/api/payment_intents/confirm?api-version=2024-06-20), [PaymentIntentCreateParams](/api/payment_intents/create?api-version=2024-06-20), [PaymentIntentUpdateParams](/api/payment_intents/update?api-version=2024-06-20), [checkout.SessionCreateParams](/api/checkout/sessions/create?api-version=2024-06-20) |
| `paymentMethodTypes` | Added | [PaymentIntent](/api/payment_intents/object?api-version=2024-06-20#payment_intent_object-payment_method_types) |

#### Node.js

| Parameters | Change | Resources or methods |
| --- | --- | --- |
| `allowed_source_types` | Removed | [Checkout.SessionCreateParams](/api/checkout/sessions/create?api-version=2024-06-20), [PaymentIntent](/api/payment_intents/object?api-version=2024-06-20), [PaymentIntentConfirmParams](/api/payment_intents/confirm?api-version=2024-06-20), [PaymentIntentCreateParams](/api/payment_intents/create?api-version=2024-06-20), [PaymentIntentUpdateParams](/api/payment_intents/update?api-version=2024-06-20) |
| `payment_method_types` | Added | [PaymentIntent](/api/payment_intents/object?api-version=2024-06-20#payment_intent_object-payment_method_types) |

#### Go

| Parameters | Change | Resources or methods |
| --- | --- | --- |
| `AllowedSourceTypes` | Removed | [CheckoutSessionParams](/api/checkout/sessions/create?api-version=2024-06-20), [PaymentIntent](/api/payment_intents/object?api-version=2024-06-20), [PaymentIntentConfirmParams](/api/payment_intents/confirm?api-version=2024-06-20), [PaymentIntentParams](/api/payment_intents/create?api-version=2024-06-20) |
| `PaymentMethodTypes` | Added | [PaymentIntent](/api/payment_intents/object?api-version=2024-06-20#payment_intent_object-payment_method_types) |

#### .NET

| Parameters | Change | Resources or methods |
| --- | --- | --- |
| `AllowedSourceTypes` | Removed | [Checkout.SessionCreateOptions](/api/checkout/sessions/create?api-version=2024-06-20), [PaymentIntent](/api/payment_intents/object?api-version=2024-06-20), [PaymentIntentConfirmOptions](/api/payment_intents/confirm?api-version=2024-06-20), [PaymentIntentCreateOptions](/api/payment_intents/create?api-version=2024-06-20), [PaymentIntentUpdateOptions](/api/payment_intents/update?api-version=2024-06-20) |
| `PaymentMethodTypes` | Added | [PaymentIntent](/api/payment_intents/object?api-version=2024-06-20#payment_intent_object-payment_method_types) |

## 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: 2019-02-11`
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 the latest version.
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 the latest version.
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 the latest version.
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 the latest version.
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 the latest version.
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 the latest version.
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 the latest version.
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).
