Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ This release changes the pinned API version to `2026-03-25.preview`. It is built
* [#1745](https://github.com/stripe/stripe-python/pull/1745) Merge to beta
* [#1713](https://github.com/stripe/stripe-python/pull/1713) Delete API_VERSION file as it is no longer needed

## 15.0.1 - 2026-04-01
* [#1786](https://github.com/stripe/stripe-python/pull/1786) Fix encoding two-dimensional array request params
* [#1785](https://github.com/stripe/stripe-python/pull/1785) Improve types for `metadata` and other dict-like types
* [#1780](https://github.com/stripe/stripe-python/pull/1780) Fix `str` / `repr` for `StripeObjects` with decimals & add support for plain dicts

## 15.0.0 - 2026-03-25

This release changes the pinned API version to `2026-03-25.dahlia` and contains breaking changes (prefixed with ⚠️ below). There's also a [detailed migration guide](https://github.com/stripe/stripe-python/wiki/Migration-guide-for-v15) to simplify your upgrade process.
Expand Down
2 changes: 1 addition & 1 deletion CODEGEN_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
25e6bd225852aa44d783e9fb3b9895af39479331
4cd98860940da75ae8dfe7384cea405859800e9c
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2206
v2240
4 changes: 2 additions & 2 deletions stripe/params/_account_create_external_account_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ class AccountCreateExternalAccountParamsCard(TypedDict):
cvc: NotRequired[str]
exp_month: int
exp_year: int
name: NotRequired[str]
number: str
metadata: NotRequired["Dict[str, str]|UntypedStripeObject[str]"]
"""
Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
"""
name: NotRequired[str]
number: str


class AccountCreateExternalAccountParamsBankAccount(TypedDict):
Expand Down
6 changes: 3 additions & 3 deletions stripe/params/_account_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -1688,15 +1688,15 @@ class AccountCreateParamsCard(TypedDict):
address_zip: NotRequired[str]
currency: NotRequired[str]
cvc: NotRequired[str]
default_for_currency: NotRequired[bool]
exp_month: int
exp_year: int
name: NotRequired[str]
number: str
metadata: NotRequired["Dict[str, str]|UntypedStripeObject[str]"]
"""
Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
"""
default_for_currency: NotRequired[bool]
name: NotRequired[str]
number: str


class AccountCreateParamsCardToken(TypedDict):
Expand Down
4 changes: 2 additions & 2 deletions stripe/params/_account_external_account_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ class AccountExternalAccountCreateParamsCard(TypedDict):
cvc: NotRequired[str]
exp_month: int
exp_year: int
name: NotRequired[str]
number: str
metadata: NotRequired["Dict[str, str]|UntypedStripeObject[str]"]
"""
Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
"""
name: NotRequired[str]
number: str


class AccountExternalAccountCreateParamsBankAccount(TypedDict):
Expand Down
6 changes: 3 additions & 3 deletions stripe/params/_account_update_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -1600,15 +1600,15 @@ class AccountUpdateParamsCard(TypedDict):
address_zip: NotRequired[str]
currency: NotRequired[str]
cvc: NotRequired[str]
default_for_currency: NotRequired[bool]
exp_month: int
exp_year: int
name: NotRequired[str]
number: str
metadata: NotRequired["Dict[str, str]|UntypedStripeObject[str]"]
"""
Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
"""
default_for_currency: NotRequired[bool]
name: NotRequired[str]
number: str


class AccountUpdateParamsCardToken(TypedDict):
Expand Down
4 changes: 2 additions & 2 deletions stripe/params/_external_account_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ class ExternalAccountCreateParamsCard(TypedDict):
cvc: NotRequired[str]
exp_month: int
exp_year: int
name: NotRequired[str]
number: str
metadata: NotRequired["Dict[str, str]|UntypedStripeObject[str]"]
"""
Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
"""
name: NotRequired[str]
number: str


class ExternalAccountCreateParamsBankAccount(TypedDict):
Expand Down
16 changes: 8 additions & 8 deletions stripe/params/v2/billing/_cadence_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,24 +29,24 @@ class CadenceCreateParams(TypedDict):


class CadenceCreateParamsBillingCycle(TypedDict):
day: NotRequired["CadenceCreateParamsBillingCycleDay"]
"""
Specific configuration for determining billing dates when type=day.
"""
interval_count: NotRequired[int]
"""
The number of intervals (specified in the interval attribute) between
cadence billings. For example, type=month and interval_count=3 bills every
3 months. If this is not provided, it will default to 1.
"""
type: Literal["day", "month", "week", "year"]
"""
The frequency at which a cadence bills.
"""
day: NotRequired["CadenceCreateParamsBillingCycleDay"]
"""
Specific configuration for determining billing dates when type=day.
"""
month: NotRequired["CadenceCreateParamsBillingCycleMonth"]
"""
Specific configuration for determining billing dates when type=month.
"""
type: Literal["day", "month", "week", "year"]
"""
The frequency at which a cadence bills.
"""
week: NotRequired["CadenceCreateParamsBillingCycleWeek"]
"""
Specific configuration for determining billing dates when type=week.
Expand Down
8 changes: 4 additions & 4 deletions stripe/params/v2/core/_account_link_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ class AccountLinkCreateParams(TypedDict):


class AccountLinkCreateParamsUseCase(TypedDict):
type: Literal["account_onboarding", "account_update"]
"""
Open Enum. The type of Account Link the user is requesting.
"""
account_onboarding: NotRequired[
"AccountLinkCreateParamsUseCaseAccountOnboarding"
]
Expand All @@ -30,6 +26,10 @@ class AccountLinkCreateParamsUseCase(TypedDict):
"""
Hash containing configuration options for an Account Link that updates an existing account.
"""
type: Literal["account_onboarding", "account_update"]
"""
Open Enum. The type of Account Link the user is requesting.
"""


class AccountLinkCreateParamsUseCaseAccountOnboarding(TypedDict):
Expand Down
20 changes: 10 additions & 10 deletions stripe/params/v2/core/_event_destination_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@


class EventDestinationCreateParams(TypedDict):
amazon_eventbridge: NotRequired[
"EventDestinationCreateParamsAmazonEventbridge"
]
"""
Amazon EventBridge configuration.
"""
azure_event_grid: NotRequired["EventDestinationCreateParamsAzureEventGrid"]
"""
Azure Event Grid configuration.
"""
description: NotRequired[str]
"""
An optional description of what the event destination is used for.
Expand Down Expand Up @@ -50,16 +60,6 @@ class EventDestinationCreateParams(TypedDict):
"""
Event destination type.
"""
amazon_eventbridge: NotRequired[
"EventDestinationCreateParamsAmazonEventbridge"
]
"""
Amazon EventBridge configuration.
"""
azure_event_grid: NotRequired["EventDestinationCreateParamsAzureEventGrid"]
"""
Azure Event Grid configuration.
"""
webhook_endpoint: NotRequired[
"EventDestinationCreateParamsWebhookEndpoint"
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@ class OutboundSetupIntentCreateParams(TypedDict):


class OutboundSetupIntentCreateParamsPayoutMethodData(TypedDict):
type: Literal["bank_account", "card", "crypto_wallet"]
"""
Closed Enum. The type of payout method to be created.
"""
bank_account: NotRequired[
"OutboundSetupIntentCreateParamsPayoutMethodDataBankAccount"
]
Expand All @@ -38,6 +34,10 @@ class OutboundSetupIntentCreateParamsPayoutMethodData(TypedDict):
"""
The type specific details of the card payout method.
"""
type: Literal["bank_account", "card", "crypto_wallet"]
"""
Closed Enum. The type of payout method to be created.
"""


class OutboundSetupIntentCreateParamsPayoutMethodDataBankAccount(TypedDict):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ class OutboundSetupIntentUpdateParams(TypedDict):


class OutboundSetupIntentUpdateParamsPayoutMethodData(TypedDict):
type: Literal["bank_account", "card", "crypto_wallet"]
"""
Closed Enum. The type of payout method to be created/updated.
"""
bank_account: NotRequired[
"OutboundSetupIntentUpdateParamsPayoutMethodDataBankAccount"
]
Expand All @@ -32,6 +28,10 @@ class OutboundSetupIntentUpdateParamsPayoutMethodData(TypedDict):
"""
The type specific details of the card payout method.
"""
type: Literal["bank_account", "card", "crypto_wallet"]
"""
Closed Enum. The type of payout method to be created/updated.
"""


class OutboundSetupIntentUpdateParamsPayoutMethodDataBankAccount(TypedDict):
Expand Down
10 changes: 5 additions & 5 deletions tests/test_generated_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -43805,15 +43805,14 @@ def test_v2_billing_cadence_post_service(
client.v2.billing.cadences.create(
{
"billing_cycle": {
"interval_count": 797691627,
"type": "week",
"day": {
"time": {
"hour": 3208676,
"minute": 1074026988,
"second": 906279820,
},
},
"interval_count": 797691627,
"month": {
"day_of_month": 1361669285,
"month_of_year": 82933018,
Expand All @@ -43823,6 +43822,7 @@ def test_v2_billing_cadence_post_service(
"second": 906279820,
},
},
"type": "week",
"week": {
"day_of_week": 43636807,
"time": {
Expand All @@ -43849,7 +43849,7 @@ def test_v2_billing_cadence_post_service(
path="/v2/billing/cadences",
query_string="",
api_base="https://api.stripe.com",
post_data='{"billing_cycle":{"interval_count":797691627,"type":"week","day":{"time":{"hour":3208676,"minute":1074026988,"second":906279820}},"month":{"day_of_month":1361669285,"month_of_year":82933018,"time":{"hour":3208676,"minute":1074026988,"second":906279820}},"week":{"day_of_week":43636807,"time":{"hour":3208676,"minute":1074026988,"second":906279820}},"year":{"day_of_month":1361669285,"month_of_year":82933018,"time":{"hour":3208676,"minute":1074026988,"second":906279820}}},"payer":{"billing_profile":"billing_profile"}}',
post_data='{"billing_cycle":{"day":{"time":{"hour":3208676,"minute":1074026988,"second":906279820}},"interval_count":797691627,"month":{"day_of_month":1361669285,"month_of_year":82933018,"time":{"hour":3208676,"minute":1074026988,"second":906279820}},"type":"week","week":{"day_of_week":43636807,"time":{"hour":3208676,"minute":1074026988,"second":906279820}},"year":{"day_of_month":1361669285,"month_of_year":82933018,"time":{"hour":3208676,"minute":1074026988,"second":906279820}}},"payer":{"billing_profile":"billing_profile"}}',
is_json=True,
)

Expand Down Expand Up @@ -44521,7 +44521,6 @@ def test_v2_core_account_link_post_service(
{
"account": "account",
"use_case": {
"type": "account_onboarding",
"account_onboarding": {
"collection_options": {
"fields": "eventually_due",
Expand All @@ -44540,6 +44539,7 @@ def test_v2_core_account_link_post_service(
"refresh_url": "refresh_url",
"return_url": "return_url",
},
"type": "account_onboarding",
},
}
)
Expand All @@ -44548,7 +44548,7 @@ def test_v2_core_account_link_post_service(
path="/v2/core/account_links",
query_string="",
api_base="https://api.stripe.com",
post_data='{"account":"account","use_case":{"type":"account_onboarding","account_onboarding":{"collection_options":{"fields":"eventually_due","future_requirements":"include"},"configurations":["storer"],"refresh_url":"refresh_url","return_url":"return_url"},"account_update":{"collection_options":{"fields":"eventually_due","future_requirements":"include"},"configurations":["storer"],"refresh_url":"refresh_url","return_url":"return_url"}}}',
post_data='{"account":"account","use_case":{"account_onboarding":{"collection_options":{"fields":"eventually_due","future_requirements":"include"},"configurations":["storer"],"refresh_url":"refresh_url","return_url":"return_url"},"account_update":{"collection_options":{"fields":"eventually_due","future_requirements":"include"},"configurations":["storer"],"refresh_url":"refresh_url","return_url":"return_url"},"type":"account_onboarding"}}',
is_json=True,
)

Expand Down
Loading