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
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
2 changes: 1 addition & 1 deletion CODEGEN_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
529796460735eb8ef64a29787291f1b4d4b29f1c
fce63eb87846dfb612efc9be0e529a67d81b4525
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2160
v2169
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 2 additions & 3 deletions stripe/_coupon.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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(
Expand Down Expand Up @@ -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.
"""
Expand Down
7 changes: 3 additions & 4 deletions stripe/_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]):
Expand Down Expand Up @@ -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.
"""
Expand Down
4 changes: 2 additions & 2 deletions stripe/_payment_intent.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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")
Expand Down Expand Up @@ -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.
"""
Expand Down
5 changes: 2 additions & 3 deletions stripe/_setup_intent.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -40,7 +40,6 @@
from stripe.params._setup_intent_verify_microdeposits_params import (
SetupIntentVerifyMicrodepositsParams,
)
from typing import Any


class SetupIntent(
Expand Down Expand Up @@ -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.
"""
Expand Down
2 changes: 1 addition & 1 deletion stripe/params/_coupon_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
"""
Expand Down
2 changes: 1 addition & 1 deletion stripe/params/_file_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
"""
Expand Down
11 changes: 4 additions & 7 deletions stripe/v2/billing/_cadence.py
Original file line number Diff line number Diff line change
@@ -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):
Expand Down Expand Up @@ -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.
"""
Expand Down
11 changes: 4 additions & 7 deletions stripe/v2/billing/_collection_setting.py
Original file line number Diff line number Diff line change
@@ -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):
Expand Down Expand Up @@ -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.
"""
Expand Down
11 changes: 4 additions & 7 deletions stripe/v2/billing/_collection_setting_version.py
Original file line number Diff line number Diff line change
@@ -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):
Expand Down Expand Up @@ -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.
"""
Expand Down
2 changes: 1 addition & 1 deletion stripe/v2/core/_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
"""
Expand Down
13 changes: 5 additions & 8 deletions stripe/v2/money_management/_inbound_transfer.py
Original file line number Diff line number Diff line change
@@ -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):
Expand Down Expand Up @@ -112,19 +109,19 @@ 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.
"""
bank_debit_returned: Optional[BankDebitReturned]
"""
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.
"""
Expand Down