Skip to content
Merged
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
31 changes: 31 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,36 @@
# Changelog

## 14.4.0 - 2026-02-25
This release changes the pinned API version to `2026-02-25.clover`.

* [#1737](https://github.com/stripe/stripe-python/pull/1737) Allow AIOHTTPClient to accept user-provided session or connector. Fixes [#1736](https://github.com/stripe/stripe-python/pull/1736)
* [#1732](https://github.com/stripe/stripe-python/pull/1732) Update generated code
* Add support for new resources `reserve.Hold`, `reserve.Plan`, and `reserve.Release`
* Add support for `location` and `reader` on `Charge.PaymentMethodDetail.CardPresent`, `Charge.PaymentMethodDetail.InteracPresent`, `ConfirmationToken.PaymentMethodPreview.Card.GeneratedFrom.PaymentMethodDetail.CardPresent`, `PaymentAttemptRecord.PaymentMethodDetail.CardPresent`, `PaymentAttemptRecord.PaymentMethodDetail.InteracPresent`, `PaymentMethod.Card.GeneratedFrom.PaymentMethodDetail.CardPresent`, `PaymentRecord.PaymentMethodDetail.CardPresent`, and `PaymentRecord.PaymentMethodDetail.InteracPresent`
* Add support for new value `lk_vat` 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 `lk_vat` on enums `CustomerCreateParamsTaxIdDatum.type`, `CustomerCreateTaxIdParams.type`, `InvoiceCreatePreviewParamsCustomerDetailTaxId.type`, `TaxIdCreateParams.type`, and `tax.CalculationCreateParamsCustomerDetailTaxId.type`
* Add support for new values `reserve.hold.created`, `reserve.hold.updated`, `reserve.plan.created`, `reserve.plan.disabled`, `reserve.plan.expired`, `reserve.plan.updated`, and `reserve.release.created` on enum `Event.type`
* Add support for new values `terminal_wifi_certificate` and `terminal_wifi_private_key` on enums `File.purpose` and `FileListParams.purpose`
* Add support for new values `terminal_wifi_certificate` and `terminal_wifi_private_key` on enum `FileCreateParams.purpose`
* Add support for new value `pay_by_bank` on enums `Invoice.PaymentSetting.payment_method_types`, `InvoiceCreateParamsPaymentSetting.payment_method_types`, `InvoiceModifyParamsPaymentSetting.payment_method_types`, `Subscription.PaymentSetting.payment_method_types`, `SubscriptionCreateParamsPaymentSetting.payment_method_types`, and `SubscriptionModifyParamsPaymentSetting.payment_method_types`
* Add support for `display_name` and `service_user_number` on `Mandate.PaymentMethodDetail.BacsDebit`
* Change type of `PaymentAttemptRecord.PaymentMethodDetail.Boleto.tax_id` and `PaymentRecord.PaymentMethodDetail.Boleto.tax_id` from `string` to `nullable(string)`
* Change type of `PaymentAttemptRecord.PaymentMethodDetail.UsBankAccount.expected_debit_date` and `PaymentRecord.PaymentMethodDetail.UsBankAccount.expected_debit_date` from `nullable(string)` to `string`
* Add support for `transaction_purpose` on `PaymentIntent.PaymentMethodOption.UsBankAccount`, `PaymentIntentConfirmParamsPaymentMethodOptionUsBankAccount`, `PaymentIntentCreateParamsPaymentMethodOptionUsBankAccount`, and `PaymentIntentModifyParamsPaymentMethodOptionUsBankAccount`
* Add support for `optional_items` on `PaymentLinkModifyParams`
* Remove support for unused `card_issuer_decline` on `Radar.PaymentEvaluation.Insight`
* Add support for `payment_behavior` on `SubscriptionItemDeleteParams`
* Add support for `lk` on `Tax.Registration.CountryOption` and `tax.RegistrationCreateParamsCountryOption`
* Add support for `cellular` and `stripe_s710` on `Terminal.Configuration`, `terminal.ConfigurationCreateParams`, and `terminal.ConfigurationModifyParams`
* Add support for new values `simulated_stripe_s710` and `stripe_s710` on enums `Terminal.Reader.device_type` and `terminal.ReaderListParams.device_type`
* Add support for new values `reserve.hold.created`, `reserve.hold.updated`, `reserve.plan.created`, `reserve.plan.disabled`, `reserve.plan.expired`, `reserve.plan.updated`, and `reserve.release.created` on enums `WebhookEndpointCreateParams.enabled_events` and `WebhookEndpointModifyParams.enabled_events`
* Add support for new value `2026-02-25.clover` on enum `WebhookEndpointCreateParams.api_version`
* Add support for snapshot events `reserve.hold.created` and `reserve.hold.updated` with resource `reserve.Hold`
* Add support for snapshot events `reserve.plan.created`, `reserve.plan.disabled`, `reserve.plan.expired`, and `reserve.plan.updated` with resource `reserve.Plan`
* Add support for snapshot event `reserve.release.created` with resource `reserve.Release`
* Add support for error codes `storer_capability_missing` and `storer_capability_not_active` on `Invoice.LastFinalizationError`, `PaymentIntent.LastPaymentError`, `SetupAttempt.SetupError`, `SetupIntent.LastSetupError`, and `StripeError`
* [#1731](https://github.com/stripe/stripe-python/pull/1731) Added instruction to update CA certificates in README.

## 14.4.0b1 - 2026-01-28
This release changes the pinned API version to `2026-01-28.preview`.

Expand Down
2 changes: 1 addition & 1 deletion CODEGEN_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
e65e48569f6dfad2d5f1b58018017856520c3ae6
e10daa4ed23a4fe87d6ea60836226446e042fdd3
37 changes: 24 additions & 13 deletions stripe/_http_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1401,6 +1401,8 @@ def __init__(
self,
timeout: Optional[Union[float, "AIOHTTPTimeout"]] = 80,
_lib=None, # used for internal unit testing
session=None,
connector=None,
**kwargs,
):
super(AIOHTTPClient, self).__init__(**kwargs)
Expand All @@ -1413,25 +1415,33 @@ def __init__(
self.aiohttp = _lib

self._timeout = timeout
self._user_session = session
self._user_connector = connector
self._internally_managed_session = session is None
self._cached_session = None

@property
def _session(self):
if self._cached_session is None:
kwargs = {}
if self._verify_ssl_certs:
ssl_context = ssl.create_default_context(
cafile=stripe.ca_bundle_path
)
kwargs["connector"] = self.aiohttp.TCPConnector(
ssl=ssl_context
)
if self._user_session:
self._cached_session = self._user_session
else:
kwargs["connector"] = self.aiohttp.TCPConnector(
verify_ssl=False
)
kwargs = {}
if self._user_connector:
kwargs["connector"] = self._user_connector
elif self._verify_ssl_certs:
ssl_context = ssl.create_default_context(
cafile=stripe.ca_bundle_path
)
kwargs["connector"] = self.aiohttp.TCPConnector(
ssl=ssl_context
)
else:
kwargs["connector"] = self.aiohttp.TCPConnector(
verify_ssl=False
)

self._cached_session = self.aiohttp.ClientSession(**kwargs)
self._cached_session = self.aiohttp.ClientSession(**kwargs)

return self._cached_session

Expand Down Expand Up @@ -1514,7 +1524,8 @@ def close(self):
pass

async def close_async(self):
await self._session.close()
if self._internally_managed_session:
await self._session.close()


class NoImportFoundAsyncClient(HTTPClient):
Expand Down