diff --git a/CHANGELOG.md b/CHANGELOG.md index 52eabea75..75d3b65c9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,6 +36,31 @@ This release changes the pinned API version to `2026-01-28.preview`. * Add support for error code `limit_payout_method` on `QuotaExceededError` * [#1701](https://github.com/stripe/stripe-python/pull/1701) Add EventNotificationHandler example +## 14.3.0 - 2026-01-28 +This release changes the pinned API version to `2026-01-28.clover`. + +* [#1725](https://github.com/stripe/stripe-python/pull/1725) Update generated code + * Add support for new resource `radar.PaymentEvaluation` + * Add support for `create` method on resource `radar.PaymentEvaluation` + * Add support for `adjustable_quantity` on `LineItem` + * Add support for new value `risk_reserved` on enum `BalanceTransaction.balance_type` + * Add support for new values `reserve_hold` and `reserve_release` on enum `BalanceTransaction.type` + * Add support for new values `2.3.0` and `2.3.1` on enums `Charge.PaymentMethodDetail.Card.ThreeDSecure.version`, `PaymentIntentConfirmParamsPaymentMethodOptionCardThreeDSecure.version`, `PaymentIntentCreateParamsPaymentMethodOptionCardThreeDSecure.version`, `PaymentIntentModifyParamsPaymentMethodOptionCardThreeDSecure.version`, `SetupAttempt.PaymentMethodDetail.Card.ThreeDSecure.version`, `SetupIntentConfirmParamsPaymentMethodOptionCardThreeDSecure.version`, `SetupIntentCreateParamsPaymentMethodOptionCardThreeDSecure.version`, and `SetupIntentModifyParamsPaymentMethodOptionCardThreeDSecure.version` + * Add support for new value `adyen` on enums `Charge.PaymentMethodDetail.Ideal.bank`, `ConfirmationToken.PaymentMethodPreview.Ideal.bank`, `ConfirmationTokenCreateParamsPaymentMethodDatumIdeal.bank`, `PaymentAttemptRecord.PaymentMethodDetail.Ideal.bank`, `PaymentIntentConfirmParamsPaymentMethodDatumIdeal.bank`, `PaymentIntentCreateParamsPaymentMethodDatumIdeal.bank`, `PaymentIntentModifyParamsPaymentMethodDatumIdeal.bank`, `PaymentMethod.Ideal.bank`, `PaymentMethodCreateParamsIdeal.bank`, `PaymentRecord.PaymentMethodDetail.Ideal.bank`, `SetupAttempt.PaymentMethodDetail.Ideal.bank`, `SetupIntentConfirmParamsPaymentMethodDatumIdeal.bank`, `SetupIntentCreateParamsPaymentMethodDatumIdeal.bank`, and `SetupIntentModifyParamsPaymentMethodDatumIdeal.bank` + * Add support for new value `ADYBNL2A` on enums `Charge.PaymentMethodDetail.Ideal.bic`, `ConfirmationToken.PaymentMethodPreview.Ideal.bic`, `PaymentAttemptRecord.PaymentMethodDetail.Ideal.bic`, `PaymentMethod.Ideal.bic`, `PaymentRecord.PaymentMethodDetail.Ideal.bic`, and `SetupAttempt.PaymentMethodDetail.Ideal.bic` + * Add support for new value `pl_nip` on enums `Checkout.Session.CustomerDetail.TaxId.type`, `Invoice.CustomerTaxId.type`, `Tax.Calculation.CustomerDetail.TaxId.type`, `Tax.Transaction.CustomerDetail.TaxId.type`, and `TaxId.type` + * Add support for new value `pl_nip` on enums `CustomerCreateParamsTaxIdDatum.type`, `CustomerCreateTaxIdParams.type`, `InvoiceCreatePreviewParamsCustomerDetailTaxId.type`, `TaxIdCreateParams.type`, and `tax.CalculationCreateParamsCustomerDetailTaxId.type` + * Change `Invoice.PaymentSetting.PaymentMethodOption.payto` and `Subscription.PaymentSetting.PaymentMethodOption.payto` to be required + * Add support for `enforce_arithmetic_validation` on `PaymentIntentCaptureParamsAmountDetail`, `PaymentIntentConfirmParamsAmountDetail`, `PaymentIntentCreateParamsAmountDetail`, `PaymentIntentIncrementAuthorizationParamsAmountDetail`, and `PaymentIntentModifyParamsAmountDetail` + * Add support for `error` on `PaymentIntent.AmountDetail` + * Remove support for `bgn` on `Terminal.Configuration.Tipping`, `terminal.ConfigurationCreateParamsTipping`, and `terminal.ConfigurationModifyParamsTipping` + * Add support for `topup` on `Treasury.ReceivedDebit.LinkedFlow` + * Add support for `contact_phone` on `V2.Core.Account`, `v2.core.AccountCreateParams`, `v2.core.AccountModifyParams`, and `v2.core.AccountTokenCreateParams` + * Add support for `registration_date` on `V2.Core.Account.Identity.BusinessDetail`, `v2.core.AccountCreateParamsIdentityBusinessDetail`, `v2.core.AccountModifyParamsIdentityBusinessDetail`, and `v2.core.AccountTokenCreateParamsIdentityBusinessDetail` + * Add support for new value `gb_vat` on enums `V2.Core.Account.Identity.BusinessDetail.IdNumber.type`, `v2.core.AccountCreateParamsIdentityBusinessDetailIdNumber.type`, `v2.core.AccountModifyParamsIdentityBusinessDetailIdNumber.type`, and `v2.core.AccountTokenCreateParamsIdentityBusinessDetailIdNumber.type` + * Add support for error code `request_blocked` on `Invoice.LastFinalizationError`, `PaymentIntent.LastPaymentError`, `SetupAttempt.SetupError`, `SetupIntent.LastSetupError`, and `StripeError` +* [#1722](https://github.com/stripe/stripe-python/pull/1722) Add documentation for undocumented API parameters + ## 14.2.0 - 2026-01-16 * [#1720](https://github.com/stripe/stripe-python/pull/1720) Update generated code * Add support for event notifications `V2CoreAccountClosedEvent`, `V2CoreAccountCreatedEvent`, `V2CoreAccountIncludingConfigurationCustomerCapabilityStatusUpdatedEvent`, `V2CoreAccountIncludingConfigurationCustomerUpdatedEvent`, `V2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEvent`, `V2CoreAccountIncludingConfigurationMerchantUpdatedEvent`, `V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEvent`, `V2CoreAccountIncludingConfigurationRecipientUpdatedEvent`, `V2CoreAccountIncludingDefaultsUpdatedEvent`, `V2CoreAccountIncludingFutureRequirementsUpdatedEvent`, `V2CoreAccountIncludingIdentityUpdatedEvent`, `V2CoreAccountIncludingRequirementsUpdatedEvent`, and `V2CoreAccountUpdatedEvent` with related object `v2.core.Account` diff --git a/CODEGEN_VERSION b/CODEGEN_VERSION index aa8c1d239..49cddf8d8 100644 --- a/CODEGEN_VERSION +++ b/CODEGEN_VERSION @@ -1 +1 @@ -529796460735eb8ef64a29787291f1b4d4b29f1c \ No newline at end of file +fce63eb87846dfb612efc9be0e529a67d81b4525 \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 469687e75..f8ca2f439 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2160 \ No newline at end of file +v2169 \ No newline at end of file diff --git a/README.md b/README.md index 6c40d685d..75b2f0fd9 100644 --- a/README.md +++ b/README.md @@ -415,6 +415,12 @@ just format # or: venv/bin/ruff format . --quiet ``` +Update bundled CA certificates from the [Mozilla cURL release][curl]: + +```sh +just update-certs +``` + [api-keys]: https://dashboard.stripe.com/account/apikeys [ruff]: https://github.com/astral-sh/ruff [connect]: https://stripe.com/connect diff --git a/stripe/_coupon.py b/stripe/_coupon.py index 7bf7e6a19..86c5a9fbb 100644 --- a/stripe/_coupon.py +++ b/stripe/_coupon.py @@ -7,7 +7,7 @@ from stripe._stripe_object import StripeObject from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import class_method_variant, sanitize_id -from typing import ClassVar, Dict, List, Optional, cast, overload +from typing import Any, ClassVar, Dict, List, Optional, cast, overload from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -16,7 +16,6 @@ from stripe.params._coupon_list_params import CouponListParams from stripe.params._coupon_modify_params import CouponModifyParams from stripe.params._coupon_retrieve_params import CouponRetrieveParams - from typing import Any class Coupon( @@ -46,7 +45,7 @@ class CurrencyOptions(StripeObject): """ class Script(StripeObject): - configuration: Dict[str, "Any"] + configuration: Dict[str, Any] """ The configuration values of the script. The keys and values are specific to the script implementation. """ diff --git a/stripe/_event.py b/stripe/_event.py index bc6549553..72b22d6d5 100644 --- a/stripe/_event.py +++ b/stripe/_event.py @@ -3,13 +3,12 @@ from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource from stripe._stripe_object import StripeObject -from typing import ClassVar, Dict, Optional +from typing import Any, ClassVar, Dict, Optional from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: from stripe.params._event_list_params import EventListParams from stripe.params._event_retrieve_params import EventRetrieveParams - from typing import Any class Event(ListableAPIResource["Event"]): @@ -37,11 +36,11 @@ class Event(ListableAPIResource["Event"]): OBJECT_NAME: ClassVar[Literal["event"]] = "event" class Data(StripeObject): - object: Dict[str, "Any"] + object: Dict[str, Any] """ Object containing the API resource relevant to the event. For example, an `invoice.created` event will have a full [invoice object](https://api.stripe.com#invoice_object) as the value of the object key. """ - previous_attributes: Optional[Dict[str, "Any"]] + previous_attributes: Optional[Dict[str, Any]] """ Object containing the names of the updated attributes and their values prior to the event (only included in events of type `*.updated`). If an array attribute has any updated elements, this object contains the entire array. In Stripe API versions 2017-04-06 or earlier, an updated array attribute in this object includes only the updated array elements. """ diff --git a/stripe/_payment_intent.py b/stripe/_payment_intent.py index f8ce7deda..c61dd47f8 100644 --- a/stripe/_payment_intent.py +++ b/stripe/_payment_intent.py @@ -11,6 +11,7 @@ from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import class_method_variant, sanitize_id from typing import ( + Any, AsyncIterator, ClassVar, Dict, @@ -79,7 +80,6 @@ from stripe.params._payment_intent_verify_microdeposits_params import ( PaymentIntentVerifyMicrodepositsParams, ) - from typing import Any @nested_resource_class_methods("amount_details_line_item") @@ -1437,7 +1437,7 @@ class WechatPayRedirectToIosApp(StripeObject): """ Type of the next action to perform. Refer to the other child attributes under `next_action` for available values. Examples include: `redirect_to_url`, `use_stripe_sdk`, `alipay_handle_redirect`, `oxxo_display_details`, or `verify_with_microdeposits`. """ - use_stripe_sdk: Optional[Dict[str, "Any"]] + use_stripe_sdk: Optional[Dict[str, Any]] """ When confirming a PaymentIntent with Stripe.js, Stripe.js depends on the contents of this dictionary to invoke authentication flows. The shape of the contents is subject to change and is only intended to be used by Stripe.js. """ diff --git a/stripe/_setup_intent.py b/stripe/_setup_intent.py index 3e2d4f62a..dbdc01eac 100644 --- a/stripe/_setup_intent.py +++ b/stripe/_setup_intent.py @@ -7,7 +7,7 @@ from stripe._stripe_object import StripeObject from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import class_method_variant, sanitize_id -from typing import ClassVar, Dict, List, Optional, Union, cast, overload +from typing import Any, ClassVar, Dict, List, Optional, Union, cast, overload from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: @@ -40,7 +40,6 @@ from stripe.params._setup_intent_verify_microdeposits_params import ( SetupIntentVerifyMicrodepositsParams, ) - from typing import Any class SetupIntent( @@ -463,7 +462,7 @@ class VerifyWithMicrodeposits(StripeObject): """ Type of the next action to perform. Refer to the other child attributes under `next_action` for available values. Examples include: `redirect_to_url`, `use_stripe_sdk`, `alipay_handle_redirect`, `oxxo_display_details`, or `verify_with_microdeposits`. """ - use_stripe_sdk: Optional[Dict[str, "Any"]] + use_stripe_sdk: Optional[Dict[str, Any]] """ When confirming a SetupIntent with Stripe.js, Stripe.js depends on the contents of this dictionary to invoke authentication flows. The shape of the contents is subject to change and is only intended to be used by Stripe.js. """ diff --git a/stripe/params/_coupon_create_params.py b/stripe/params/_coupon_create_params.py index d32f104f5..cb99c9e36 100644 --- a/stripe/params/_coupon_create_params.py +++ b/stripe/params/_coupon_create_params.py @@ -81,7 +81,7 @@ class CouponCreateParamsCurrencyOptions(TypedDict): class CouponCreateParamsScript(TypedDict): - configuration: Dict[str, "Any"] + configuration: Dict[str, Any] """ The configuration values of the script. The keys and values are specific to the script implementation. """ diff --git a/stripe/params/_file_create_params.py b/stripe/params/_file_create_params.py index a65648464..d61c852f6 100644 --- a/stripe/params/_file_create_params.py +++ b/stripe/params/_file_create_params.py @@ -10,7 +10,7 @@ class FileCreateParams(RequestOptions): """ Specifies which fields in the response should be expanded. """ - file: "Any" + file: Any """ A file to upload. Make sure that the specifications follow RFC 2388, which defines file transfers for the `multipart/form-data` protocol. """ diff --git a/stripe/params/v2/billing/_collection_setting_create_params.py b/stripe/params/v2/billing/_collection_setting_create_params.py index f7d19546a..e6447117b 100644 --- a/stripe/params/v2/billing/_collection_setting_create_params.py +++ b/stripe/params/v2/billing/_collection_setting_create_params.py @@ -81,11 +81,11 @@ class CollectionSettingCreateParamsPaymentMethodOptions(TypedDict): """ This sub-hash contains details about the Bank transfer payment method options. """ - konbini: NotRequired[Dict[str, "Any"]] + konbini: NotRequired[Dict[str, Any]] """ This sub-hash contains details about the Konbini payment method options. """ - sepa_debit: NotRequired[Dict[str, "Any"]] + sepa_debit: NotRequired[Dict[str, Any]] """ This sub-hash contains details about the SEPA Direct Debit payment method options. """ diff --git a/stripe/params/v2/billing/_collection_setting_update_params.py b/stripe/params/v2/billing/_collection_setting_update_params.py index 5478565c5..0d9b2adf8 100644 --- a/stripe/params/v2/billing/_collection_setting_update_params.py +++ b/stripe/params/v2/billing/_collection_setting_update_params.py @@ -87,11 +87,11 @@ class CollectionSettingUpdateParamsPaymentMethodOptions(TypedDict): """ This sub-hash contains details about the Bank transfer payment method options. """ - konbini: NotRequired[Dict[str, "Any"]] + konbini: NotRequired[Dict[str, Any]] """ This sub-hash contains details about the Konbini payment method options. """ - sepa_debit: NotRequired[Dict[str, "Any"]] + sepa_debit: NotRequired[Dict[str, Any]] """ This sub-hash contains details about the SEPA Direct Debit payment method options. """ diff --git a/stripe/v2/billing/_cadence.py b/stripe/v2/billing/_cadence.py index a3b49e83c..34e9ae5da 100644 --- a/stripe/v2/billing/_cadence.py +++ b/stripe/v2/billing/_cadence.py @@ -1,11 +1,8 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import StripeObject -from typing import ClassVar, Dict, List, Optional -from typing_extensions import Literal, TYPE_CHECKING - -if TYPE_CHECKING: - from typing import Any +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Literal class Cadence(StripeObject): @@ -449,11 +446,11 @@ class Filters(StripeObject): """ This sub-hash contains details about the Bank transfer payment method options. """ - konbini: Optional[Dict[str, "Any"]] + konbini: Optional[Dict[str, Any]] """ This sub-hash contains details about the Konbini payment method options. """ - sepa_debit: Optional[Dict[str, "Any"]] + sepa_debit: Optional[Dict[str, Any]] """ This sub-hash contains details about the SEPA Direct Debit payment method options. """ diff --git a/stripe/v2/billing/_collection_setting.py b/stripe/v2/billing/_collection_setting.py index dba839329..3a9a369f7 100644 --- a/stripe/v2/billing/_collection_setting.py +++ b/stripe/v2/billing/_collection_setting.py @@ -1,11 +1,8 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import StripeObject -from typing import ClassVar, Dict, List, Optional -from typing_extensions import Literal, TYPE_CHECKING - -if TYPE_CHECKING: - from typing import Any +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Literal class CollectionSetting(StripeObject): @@ -191,11 +188,11 @@ class Filters(StripeObject): """ This sub-hash contains details about the Bank transfer payment method options. """ - konbini: Optional[Dict[str, "Any"]] + konbini: Optional[Dict[str, Any]] """ This sub-hash contains details about the Konbini payment method options. """ - sepa_debit: Optional[Dict[str, "Any"]] + sepa_debit: Optional[Dict[str, Any]] """ This sub-hash contains details about the SEPA Direct Debit payment method options. """ diff --git a/stripe/v2/billing/_collection_setting_version.py b/stripe/v2/billing/_collection_setting_version.py index 0827e5e2a..663ff02cc 100644 --- a/stripe/v2/billing/_collection_setting_version.py +++ b/stripe/v2/billing/_collection_setting_version.py @@ -1,11 +1,8 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import StripeObject -from typing import ClassVar, Dict, List, Optional -from typing_extensions import Literal, TYPE_CHECKING - -if TYPE_CHECKING: - from typing import Any +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Literal class CollectionSettingVersion(StripeObject): @@ -187,11 +184,11 @@ class Filters(StripeObject): """ This sub-hash contains details about the Bank transfer payment method options. """ - konbini: Optional[Dict[str, "Any"]] + konbini: Optional[Dict[str, Any]] """ This sub-hash contains details about the Konbini payment method options. """ - sepa_debit: Optional[Dict[str, "Any"]] + sepa_debit: Optional[Dict[str, Any]] """ This sub-hash contains details about the SEPA Direct Debit payment method options. """ diff --git a/stripe/v2/core/_event.py b/stripe/v2/core/_event.py index cb7ad021b..1a6610d10 100644 --- a/stripe/v2/core/_event.py +++ b/stripe/v2/core/_event.py @@ -42,7 +42,7 @@ class Request(StripeObject): """ _inner_class_types = {"request": Request} - changes: Optional[Dict[str, "Any"]] + changes: Optional[Dict[str, Any]] """ Before and after changes for the primary related object. """ diff --git a/stripe/v2/money_management/_inbound_transfer.py b/stripe/v2/money_management/_inbound_transfer.py index 46f80f32e..9029213f4 100644 --- a/stripe/v2/money_management/_inbound_transfer.py +++ b/stripe/v2/money_management/_inbound_transfer.py @@ -1,11 +1,8 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._stripe_object import StripeObject -from typing import ClassVar, Dict, List, Optional -from typing_extensions import Literal, TYPE_CHECKING - -if TYPE_CHECKING: - from typing import Any +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Literal class InboundTransfer(StripeObject): @@ -112,11 +109,11 @@ class BankDebitReturned(StripeObject): """ The history entry for a failed InboundTransfer. """ - bank_debit_processing: Optional[Dict[str, "Any"]] + bank_debit_processing: Optional[Dict[str, Any]] """ The history entry for a processing InboundTransfer. """ - bank_debit_queued: Optional[Dict[str, "Any"]] + bank_debit_queued: Optional[Dict[str, Any]] """ The history entry for a queued InboundTransfer. """ @@ -124,7 +121,7 @@ class BankDebitReturned(StripeObject): """ The history entry for a returned InboundTransfer. """ - bank_debit_succeeded: Optional[Dict[str, "Any"]] + bank_debit_succeeded: Optional[Dict[str, Any]] """ The history entry for a succeeded InboundTransfer. """