From e3ee617f0507c69047f30f58c25754e0636ae7c2 Mon Sep 17 00:00:00 2001 From: Jesse Rosalia Date: Wed, 1 Apr 2026 16:48:14 -0700 Subject: [PATCH 1/2] Bump version to 15.0.1 --- CHANGELOG.md | 5 +++++ VERSION | 2 +- pyproject.toml | 2 +- stripe/_version.py | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index be2e2416d..ddbd17c9a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## 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. diff --git a/VERSION b/VERSION index 94188a748..2bbd2b4b4 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -15.0.0 +15.0.1 diff --git a/pyproject.toml b/pyproject.toml index b802b7286..87d22ca9c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "stripe" -version = "15.0.0" +version = "15.0.1" readme = "README.md" description = "Python bindings for the Stripe API" authors = [{ name = "Stripe", email = "support@stripe.com" }] diff --git a/stripe/_version.py b/stripe/_version.py index b18530e7d..f3c782860 100644 --- a/stripe/_version.py +++ b/stripe/_version.py @@ -1 +1 @@ -VERSION = "15.0.0" +VERSION = "15.0.1" From 1cf9e3814a25b50b6e99759a8d7963daaba3756d Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Mon, 13 Apr 2026 23:37:53 +0000 Subject: [PATCH 2/2] Update generated code for v2240 and --- CODEGEN_VERSION | 2 +- OPENAPI_VERSION | 2 +- ..._account_create_external_account_params.py | 4 ++-- stripe/params/_account_create_params.py | 6 +++--- ..._account_external_account_create_params.py | 4 ++-- stripe/params/_account_update_params.py | 6 +++--- .../params/_external_account_create_params.py | 4 ++-- .../v2/billing/_cadence_create_params.py | 16 +++++++-------- .../v2/core/_account_link_create_params.py | 8 ++++---- .../core/_event_destination_create_params.py | 20 +++++++++---------- .../_outbound_setup_intent_create_params.py | 8 ++++---- .../_outbound_setup_intent_update_params.py | 8 ++++---- tests/test_generated_examples.py | 10 +++++----- 13 files changed, 49 insertions(+), 49 deletions(-) diff --git a/CODEGEN_VERSION b/CODEGEN_VERSION index 474455e68..10cc84107 100644 --- a/CODEGEN_VERSION +++ b/CODEGEN_VERSION @@ -1 +1 @@ -07a637150db06f45fbad8d9919800dd9e5c58f87 \ No newline at end of file +4cd98860940da75ae8dfe7384cea405859800e9c \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 7073706ed..ccd8e578d 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2217 \ No newline at end of file +v2240 \ No newline at end of file diff --git a/stripe/params/_account_create_external_account_params.py b/stripe/params/_account_create_external_account_params.py index 6cf38179c..f6567a2b2 100644 --- a/stripe/params/_account_create_external_account_params.py +++ b/stripe/params/_account_create_external_account_params.py @@ -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): diff --git a/stripe/params/_account_create_params.py b/stripe/params/_account_create_params.py index 41fd2f3e4..ec14c0c28 100644 --- a/stripe/params/_account_create_params.py +++ b/stripe/params/_account_create_params.py @@ -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): diff --git a/stripe/params/_account_external_account_create_params.py b/stripe/params/_account_external_account_create_params.py index b4ccf6654..480e8a222 100644 --- a/stripe/params/_account_external_account_create_params.py +++ b/stripe/params/_account_external_account_create_params.py @@ -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): diff --git a/stripe/params/_account_update_params.py b/stripe/params/_account_update_params.py index b3dd6e48b..7748dc29b 100644 --- a/stripe/params/_account_update_params.py +++ b/stripe/params/_account_update_params.py @@ -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): diff --git a/stripe/params/_external_account_create_params.py b/stripe/params/_external_account_create_params.py index 44a37ef07..e4f2ddf1d 100644 --- a/stripe/params/_external_account_create_params.py +++ b/stripe/params/_external_account_create_params.py @@ -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): diff --git a/stripe/params/v2/billing/_cadence_create_params.py b/stripe/params/v2/billing/_cadence_create_params.py index f66f625c2..8a0038501 100644 --- a/stripe/params/v2/billing/_cadence_create_params.py +++ b/stripe/params/v2/billing/_cadence_create_params.py @@ -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. diff --git a/stripe/params/v2/core/_account_link_create_params.py b/stripe/params/v2/core/_account_link_create_params.py index c7d15ffef..88569189d 100644 --- a/stripe/params/v2/core/_account_link_create_params.py +++ b/stripe/params/v2/core/_account_link_create_params.py @@ -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" ] @@ -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): diff --git a/stripe/params/v2/core/_event_destination_create_params.py b/stripe/params/v2/core/_event_destination_create_params.py index eaceb2f4d..6ac47e438 100644 --- a/stripe/params/v2/core/_event_destination_create_params.py +++ b/stripe/params/v2/core/_event_destination_create_params.py @@ -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. @@ -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" ] diff --git a/stripe/params/v2/money_management/_outbound_setup_intent_create_params.py b/stripe/params/v2/money_management/_outbound_setup_intent_create_params.py index 4fac71174..2535e2cc1 100644 --- a/stripe/params/v2/money_management/_outbound_setup_intent_create_params.py +++ b/stripe/params/v2/money_management/_outbound_setup_intent_create_params.py @@ -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" ] @@ -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): diff --git a/stripe/params/v2/money_management/_outbound_setup_intent_update_params.py b/stripe/params/v2/money_management/_outbound_setup_intent_update_params.py index 395351972..860c21abf 100644 --- a/stripe/params/v2/money_management/_outbound_setup_intent_update_params.py +++ b/stripe/params/v2/money_management/_outbound_setup_intent_update_params.py @@ -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" ] @@ -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): diff --git a/tests/test_generated_examples.py b/tests/test_generated_examples.py index 9c431b8ab..760159d7e 100644 --- a/tests/test_generated_examples.py +++ b/tests/test_generated_examples.py @@ -43805,8 +43805,6 @@ def test_v2_billing_cadence_post_service( client.v2.billing.cadences.create( { "billing_cycle": { - "interval_count": 797691627, - "type": "week", "day": { "time": { "hour": 3208676, @@ -43814,6 +43812,7 @@ def test_v2_billing_cadence_post_service( "second": 906279820, }, }, + "interval_count": 797691627, "month": { "day_of_month": 1361669285, "month_of_year": 82933018, @@ -43823,6 +43822,7 @@ def test_v2_billing_cadence_post_service( "second": 906279820, }, }, + "type": "week", "week": { "day_of_week": 43636807, "time": { @@ -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, ) @@ -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", @@ -44540,6 +44539,7 @@ def test_v2_core_account_link_post_service( "refresh_url": "refresh_url", "return_url": "return_url", }, + "type": "account_onboarding", }, } ) @@ -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, )