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
2 changes: 1 addition & 1 deletion API_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7f436e73385732b1c5502f408a6fe37f7b6b0612
368be7755d15d02a1038325c7d159703b01662b0
73 changes: 39 additions & 34 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,40 @@
# Changelog

## 14.1.0b1 - 2025-11-18
This release changes the pinned API version to `2025-11-17.preview`.

* [#1663](https://github.com/stripe/stripe-python/pull/1663) Update generated code for beta
* Add support for new resources `v2.core.AccountPersonToken` and `v2.core.AccountToken`
* Remove support for resource `v2.payments.OffSessionPayment`
* Add support for `create` and `retrieve` methods on resources `v2.core.AccountPersonToken` and `v2.core.AccountToken`
* Remove support for `cancel`, `capture`, `create`, `list`, and `retrieve` methods on resource `v2.payments.OffSessionPayment`
* Change `Tax.Association.tax_transaction_attempts` to be required
* Add support for `specified_commercial_transactions_act_url` on `Account.BusinessProfile`, `AccountCreateParamsBusinessProfile`, and `AccountModifyParamsBusinessProfile`
* Add support for `paypay_payments` on `Account.Setting`, `AccountCreateParamsSetting`, and `AccountModifyParamsSetting`
* Change type of `billing.analytics.MeterUsageRetrieveParamsMeter.dimension_filters` from `string` to `array(string)`
* Change type of `billing.analytics.MeterUsageRetrieveParamsMeter.tenant_filters` from `string` to `array(string)`
* Add support for `car_rental_data`, `flight_data`, and `lodging_data` on `ChargeCaptureParamsPaymentDetail`, `ChargeModifyParamsPaymentDetail`, `PaymentIntentCaptureParamsPaymentDetail`, `PaymentIntentConfirmParamsPaymentDetail`, `PaymentIntentCreateParamsPaymentDetail`, and `PaymentIntentModifyParamsPaymentDetail`
* Add support for `supplementary_purchase_data` on `OrderCreateParamsPaymentSettingPaymentMethodOptionKlarna`, `OrderModifyParamsPaymentSettingPaymentMethodOptionKlarna`, `PaymentIntentConfirmParamsPaymentMethodOptionKlarna`, `PaymentIntentCreateParamsPaymentMethodOptionKlarna`, and `PaymentIntentModifyParamsPaymentMethodOptionKlarna`
* Add support for `allow_redisplay` and `customer_account` on `PaymentMethodListParams`
* Add support for `future_requirements` on `V2.Core.Account`
* Add support for `konbini_payments` and `script_statement_descriptor` on `V2.Core.Account.Configuration.Merchant`, `v2.core.AccountCreateParamsConfigurationMerchant`, and `v2.core.AccountModifyParamsConfigurationMerchant`
* Add support for `eur` on `V2.Core.Account.Configuration.Storer.Capability.HoldsCurrency`, `v2.core.AccountCreateParamsConfigurationStorerCapabilityHoldsCurrency`, and `v2.core.AccountModifyParamsConfigurationStorerCapabilityHoldsCurrency`
* Add support for `requirements_collector` on `V2.Core.Account.Default.Responsibility`
* Add support for new value `ar_cuit` on enums `V2.Core.Account.Identity.BusinessDetail.IdNumber.type`, `v2.core.AccountCreateParamsIdentityBusinessDetailIdNumber.type`, and `v2.core.AccountModifyParamsIdentityBusinessDetailIdNumber.type`
* Add support for new value `ar_dni` on enums `V2.Core.Account.Identity.Individual.IdNumber.type`, `V2.Core.AccountPerson.IdNumber.type`, `v2.core.AccountCreateParamsIdentityIndividualIdNumber.type`, `v2.core.AccountModifyParamsIdentityIndividualIdNumber.type`, `v2.core.AccountPersonCreateParamsIdNumber.type`, and `v2.core.AccountPersonModifyParamsIdNumber.type`
* Remove support for `collector` on `V2.Core.Account.Requirement`
* Add support for new value `holds_currencies.eur` on enum `V2.Core.Account.Requirement.Entry.Impact.RestrictsCapability.capability`
* Add support for new values `payment_method` and `person` on enum `V2.Core.Account.Requirement.Entry.Reference.type`
* Remove support for value `resource` from enum `V2.Core.Account.Requirement.Entry.Reference.type`
* Remove support for value `future_requirements` from enum `V2.Core.Account.Requirement.Entry.RequestedReason.code`
* Add support for `changes` on `V2.Core.Event`
* Remove support for value `sepa_bank_account` from enums `V2.MoneyManagement.FinancialAddress.Credential.type` and `v2.money_management.FinancialAddressCreateParams.type`
* Add support for `account_token` on `v2.core.AccountCreateParams` and `v2.core.AccountModifyParams`
* Add support for new value `future_requirements` on enums `v2.core.AccountCreateParams.include`, `v2.core.AccountModifyParams.include`, and `v2.core.AccountRetrieveParams.include`
* Add support for `person_token` on `v2.core.AccountPersonCreateParams` and `v2.core.AccountPersonModifyParams`
* Add support for thin event `V2CoreHealthEventGenerationFailureResolvedEvent`
* Remove support for thin events `V2PaymentsOffSessionPaymentAuthorizationAttemptFailedEvent`, `V2PaymentsOffSessionPaymentAuthorizationAttemptStartedEvent`, `V2PaymentsOffSessionPaymentCanceledEvent`, `V2PaymentsOffSessionPaymentCreatedEvent`, `V2PaymentsOffSessionPaymentFailedEvent`, `V2PaymentsOffSessionPaymentRequiresCaptureEvent`, and `V2PaymentsOffSessionPaymentSucceededEvent` with related object `v2.payments.OffSessionPayment`

## 14.1.0a2 - 2025-11-20
This release changes the pinned API version to `2025-11-17.preview`.

Expand Down Expand Up @@ -147,40 +182,10 @@ This release changes the pinned API version to `2025-11-17.preview`.
* Add support for new value `2025-11-17.clover` on enum `WebhookEndpointCreateParams.api_version`
* Add support for snapshot events `financial_connections.account.account_numbers_updated` and `financial_connections.account.upcoming_account_number_expiry` with resource `financial_connections.Account`

## 14.1.0b1 - 2025-11-18
This release changes the pinned API version to `2025-11-17.preview`.

* [#1663](https://github.com/stripe/stripe-python/pull/1663) Update generated code for beta
* Add support for new resources `v2.core.AccountPersonToken` and `v2.core.AccountToken`
* Remove support for resource `v2.payments.OffSessionPayment`
* Add support for `create` and `retrieve` methods on resources `v2.core.AccountPersonToken` and `v2.core.AccountToken`
* Remove support for `cancel`, `capture`, `create`, `list`, and `retrieve` methods on resource `v2.payments.OffSessionPayment`
* Change `Tax.Association.tax_transaction_attempts` to be required
* Add support for `specified_commercial_transactions_act_url` on `Account.BusinessProfile`, `AccountCreateParamsBusinessProfile`, and `AccountModifyParamsBusinessProfile`
* Add support for `paypay_payments` on `Account.Setting`, `AccountCreateParamsSetting`, and `AccountModifyParamsSetting`
* Change type of `billing.analytics.MeterUsageRetrieveParamsMeter.dimension_filters` from `string` to `array(string)`
* Change type of `billing.analytics.MeterUsageRetrieveParamsMeter.tenant_filters` from `string` to `array(string)`
* Add support for `car_rental_data`, `flight_data`, and `lodging_data` on `ChargeCaptureParamsPaymentDetail`, `ChargeModifyParamsPaymentDetail`, `PaymentIntentCaptureParamsPaymentDetail`, `PaymentIntentConfirmParamsPaymentDetail`, `PaymentIntentCreateParamsPaymentDetail`, and `PaymentIntentModifyParamsPaymentDetail`
* Add support for `supplementary_purchase_data` on `OrderCreateParamsPaymentSettingPaymentMethodOptionKlarna`, `OrderModifyParamsPaymentSettingPaymentMethodOptionKlarna`, `PaymentIntentConfirmParamsPaymentMethodOptionKlarna`, `PaymentIntentCreateParamsPaymentMethodOptionKlarna`, and `PaymentIntentModifyParamsPaymentMethodOptionKlarna`
* Add support for `allow_redisplay` and `customer_account` on `PaymentMethodListParams`
* Add support for `future_requirements` on `V2.Core.Account`
* Add support for `konbini_payments` and `script_statement_descriptor` on `V2.Core.Account.Configuration.Merchant`, `v2.core.AccountCreateParamsConfigurationMerchant`, and `v2.core.AccountModifyParamsConfigurationMerchant`
* Add support for `eur` on `V2.Core.Account.Configuration.Storer.Capability.HoldsCurrency`, `v2.core.AccountCreateParamsConfigurationStorerCapabilityHoldsCurrency`, and `v2.core.AccountModifyParamsConfigurationStorerCapabilityHoldsCurrency`
* Add support for `requirements_collector` on `V2.Core.Account.Default.Responsibility`
* Add support for new value `ar_cuit` on enums `V2.Core.Account.Identity.BusinessDetail.IdNumber.type`, `v2.core.AccountCreateParamsIdentityBusinessDetailIdNumber.type`, and `v2.core.AccountModifyParamsIdentityBusinessDetailIdNumber.type`
* Add support for new value `ar_dni` on enums `V2.Core.Account.Identity.Individual.IdNumber.type`, `V2.Core.AccountPerson.IdNumber.type`, `v2.core.AccountCreateParamsIdentityIndividualIdNumber.type`, `v2.core.AccountModifyParamsIdentityIndividualIdNumber.type`, `v2.core.AccountPersonCreateParamsIdNumber.type`, and `v2.core.AccountPersonModifyParamsIdNumber.type`
* Remove support for `collector` on `V2.Core.Account.Requirement`
* Add support for new value `holds_currencies.eur` on enum `V2.Core.Account.Requirement.Entry.Impact.RestrictsCapability.capability`
* Add support for new values `payment_method` and `person` on enum `V2.Core.Account.Requirement.Entry.Reference.type`
* Remove support for value `resource` from enum `V2.Core.Account.Requirement.Entry.Reference.type`
* Remove support for value `future_requirements` from enum `V2.Core.Account.Requirement.Entry.RequestedReason.code`
* Add support for `changes` on `V2.Core.Event`
* Remove support for value `sepa_bank_account` from enums `V2.MoneyManagement.FinancialAddress.Credential.type` and `v2.money_management.FinancialAddressCreateParams.type`
* Add support for `account_token` on `v2.core.AccountCreateParams` and `v2.core.AccountModifyParams`
* Add support for new value `future_requirements` on enums `v2.core.AccountCreateParams.include`, `v2.core.AccountModifyParams.include`, and `v2.core.AccountRetrieveParams.include`
* Add support for `person_token` on `v2.core.AccountPersonCreateParams` and `v2.core.AccountPersonModifyParams`
* Add support for thin event `V2CoreHealthEventGenerationFailureResolvedEvent`
* Remove support for thin events `V2PaymentsOffSessionPaymentAuthorizationAttemptFailedEvent`, `V2PaymentsOffSessionPaymentAuthorizationAttemptStartedEvent`, `V2PaymentsOffSessionPaymentCanceledEvent`, `V2PaymentsOffSessionPaymentCreatedEvent`, `V2PaymentsOffSessionPaymentFailedEvent`, `V2PaymentsOffSessionPaymentRequiresCaptureEvent`, and `V2PaymentsOffSessionPaymentSucceededEvent` with related object `v2.payments.OffSessionPayment`
## 14.0.1 - 2025-11-21
* [#1684](https://github.com/stripe/stripe-python/pull/1684) Update generated code
* `stripe.error` module is now accessible globally. Fixes [#1682](https://github.com/stripe/stripe-python/issues/1682)
* [#1681](https://github.com/stripe/stripe-python/pull/1681) Throw a specific error when accessing `payment_intent` property on `Invoice` object to ease debugging.

## 14.0.0 - 2025-11-18
This release changes the pinned API version to `2025-11-17.clover`.
Expand Down
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2128
v2129
8 changes: 8 additions & 0 deletions stripe/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ def add_beta_version(

if TYPE_CHECKING:
from stripe import (
_error as error,
apps as apps,
billing as billing,
billing_portal as billing_portal,
Expand All @@ -158,6 +159,7 @@ def add_beta_version(
issuing as issuing,
params as params,
privacy as privacy,
product_catalog as product_catalog,
radar as radar,
reporting as reporting,
sigma as sigma,
Expand Down Expand Up @@ -483,6 +485,9 @@ def add_beta_version(
from stripe._price_service import PriceService as PriceService
from stripe._privacy_service import PrivacyService as PrivacyService
from stripe._product import Product as Product
from stripe._product_catalog_service import (
ProductCatalogService as ProductCatalogService,
)
from stripe._product_feature import ProductFeature as ProductFeature
from stripe._product_feature_service import (
ProductFeatureService as ProductFeatureService,
Expand Down Expand Up @@ -630,6 +635,7 @@ def add_beta_version(

# name -> (import_target, is_submodule)
_import_map = {
"error": ("stripe._error", True),
"apps": ("stripe.apps", True),
"billing": ("stripe.billing", True),
"billing_portal": ("stripe.billing_portal", True),
Expand All @@ -645,6 +651,7 @@ def add_beta_version(
"issuing": ("stripe.issuing", True),
"params": ("stripe.params", True),
"privacy": ("stripe.privacy", True),
"product_catalog": ("stripe.product_catalog", True),
"radar": ("stripe.radar", True),
"reporting": ("stripe.reporting", True),
"sigma": ("stripe.sigma", True),
Expand Down Expand Up @@ -903,6 +910,7 @@ def add_beta_version(
"PriceService": ("stripe._price_service", False),
"PrivacyService": ("stripe._privacy_service", False),
"Product": ("stripe._product", False),
"ProductCatalogService": ("stripe._product_catalog_service", False),
"ProductFeature": ("stripe._product_feature", False),
"ProductFeatureService": ("stripe._product_feature_service", False),
"ProductService": ("stripe._product_service", False),
Expand Down
4 changes: 4 additions & 0 deletions stripe/_object_classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,10 @@
"RedactionJobValidationError",
),
"product": ("stripe._product", "Product"),
"product_catalog.trial_offer": (
"stripe.product_catalog._trial_offer",
"TrialOffer",
),
"product_feature": ("stripe._product_feature", "ProductFeature"),
"promotion_code": ("stripe._promotion_code", "PromotionCode"),
"quote": ("stripe._quote", "Quote"),
Expand Down
11 changes: 11 additions & 0 deletions stripe/_payment_intent.py
Original file line number Diff line number Diff line change
Expand Up @@ -3308,6 +3308,12 @@ class Zip(StripeObject):
"zip": Zip,
}

class PaymentsOrchestration(StripeObject):
enabled: bool
"""
Whether this feature is enabled.
"""

class PresentmentDetails(StripeObject):
presentment_amount: int
"""
Expand Down Expand Up @@ -3613,6 +3619,10 @@ class TransferData(StripeObject):
"""
The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. A comprehensive list of valid payment method types can be found [here](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type).
"""
payments_orchestration: Optional[PaymentsOrchestration]
"""
When you enable this parameter, this PaymentIntent will route your payment to processors that you configure in the dashboard.
"""
presentment_details: Optional[PresentmentDetails]
processing: Optional[Processing]
"""
Expand Down Expand Up @@ -5441,6 +5451,7 @@ async def list_amount_details_line_items_async(
"payment_details": PaymentDetails,
"payment_method_configuration_details": PaymentMethodConfigurationDetails,
"payment_method_options": PaymentMethodOptions,
"payments_orchestration": PaymentsOrchestration,
"presentment_details": PresentmentDetails,
"processing": Processing,
"shipping": Shipping,
Expand Down
38 changes: 38 additions & 0 deletions stripe/_product_catalog_service.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# -*- coding: utf-8 -*-
# File generated from our OpenAPI spec
from stripe._stripe_service import StripeService
from importlib import import_module
from typing_extensions import TYPE_CHECKING

if TYPE_CHECKING:
from stripe.product_catalog._trial_offer_service import TrialOfferService

_subservices = {
"trial_offers": [
"stripe.product_catalog._trial_offer_service",
"TrialOfferService",
],
}


class ProductCatalogService(StripeService):
trial_offers: "TrialOfferService"

def __init__(self, requestor):
super().__init__(requestor)

def __getattr__(self, name):
try:
import_from, service = _subservices[name]
service_class = getattr(
import_module(import_from),
service,
)
setattr(
self,
name,
service_class(self._requestor),
)
return getattr(self, name)
except KeyError:
raise AttributeError()
12 changes: 12 additions & 0 deletions stripe/_stripe_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@
from stripe._price_service import PriceService
from stripe._privacy_service import PrivacyService
from stripe._product_service import ProductService
from stripe._product_catalog_service import ProductCatalogService
from stripe._promotion_code_service import PromotionCodeService
from stripe._quote_service import QuoteService
from stripe._radar_service import RadarService
Expand Down Expand Up @@ -947,6 +948,17 @@ def privacy(self) -> "PrivacyService":
def products(self) -> "ProductService":
return self.v1.products

@property
@deprecated(
"""
StripeClient.product_catalog is deprecated, use StripeClient.v1.product_catalog instead.
All functionality under it has been copied over to StripeClient.v1.product_catalog.
See [migration guide](https://github.com/stripe/stripe-python/wiki/v1-namespace-in-StripeClient) for more on this and tips on migrating to the new v1 namespace.
""",
)
def product_catalog(self) -> "ProductCatalogService":
return self.v1.product_catalog

@property
@deprecated(
"""
Expand Down
9 changes: 9 additions & 0 deletions stripe/_stripe_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,15 @@ def __getitem__(self, k: str) -> Any:
% (k, k, ", ".join(list(self.keys())))
)
else:
from stripe._invoice import Invoice

# super specific one-off case to help users debug this property disappearing
# see also: https://go/j/DEVSDK-2835
if isinstance(self, Invoice) and k == "payment_intent":
raise KeyError(
"The 'payment_intent' attribute is no longer available on Invoice objects. See the docs for more details: https://docs.stripe.com/changelog/basil/2025-03-31/add-support-for-multiple-partial-payments-on-invoices#why-is-this-a-breaking-change"
)

raise err

def __delitem__(self, k: str) -> None:
Expand Down
6 changes: 6 additions & 0 deletions stripe/_v1_services.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
from stripe._plan_service import PlanService
from stripe._price_service import PriceService
from stripe._privacy_service import PrivacyService
from stripe._product_catalog_service import ProductCatalogService
from stripe._product_service import ProductService
from stripe._promotion_code_service import PromotionCodeService
from stripe._quote_service import QuoteService
Expand Down Expand Up @@ -219,6 +220,10 @@
"prices": ["stripe._price_service", "PriceService"],
"privacy": ["stripe._privacy_service", "PrivacyService"],
"products": ["stripe._product_service", "ProductService"],
"product_catalog": [
"stripe._product_catalog_service",
"ProductCatalogService",
],
"promotion_codes": [
"stripe._promotion_code_service",
"PromotionCodeService",
Expand Down Expand Up @@ -316,6 +321,7 @@ class V1Services(StripeService):
prices: "PriceService"
privacy: "PrivacyService"
products: "ProductService"
product_catalog: "ProductCatalogService"
promotion_codes: "PromotionCodeService"
quotes: "QuoteService"
radar: "RadarService"
Expand Down
Loading