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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
89 changes: 89 additions & 0 deletions .hark/changes/2026-10-29_stripe-openapi_c1afa42f.change.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion CODEGEN_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
588801ef34f7b5f7d6a784d3354f5f93d2a26ffb
df91e5dd67ba5cc7f17eee285a3bfec51d6b9b02
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2526
v2594
36 changes: 36 additions & 0 deletions stripe/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,16 +287,34 @@ def set_app_info(
from stripe._error import (
APIConnectionError as APIConnectionError,
APIError as APIError,
AlreadyCanceledError as AlreadyCanceledError,
AuthenticationError as AuthenticationError,
BlockedByStripeError as BlockedByStripeError,
CannotProceedError as CannotProceedError,
CapabilityNotEnabledError as CapabilityNotEnabledError,
CardError as CardError,
ControlledByAlternateResourceError as ControlledByAlternateResourceError,
FeatureNotEnabledError as FeatureNotEnabledError,
FinancialAccountNotOpenError as FinancialAccountNotOpenError,
FxQuoteNeedsRefreshError as FxQuoteNeedsRefreshError,
IdempotencyError as IdempotencyError,
InsufficientFundsError as InsufficientFundsError,
InvalidPaymentMethodError as InvalidPaymentMethodError,
InvalidPayoutMethodError as InvalidPayoutMethodError,
InvalidRequestError as InvalidRequestError,
InvalidVaultedCredentialError as InvalidVaultedCredentialError,
NotCancelableError as NotCancelableError,
PermissionError as PermissionError,
QuotaExceededError as QuotaExceededError,
RateLimitError as RateLimitError,
RecipientNotNotifiableError as RecipientNotNotifiableError,
SignatureVerificationError as SignatureVerificationError,
StripeError as StripeError,
StripeErrorWithParamCode as StripeErrorWithParamCode,
TemporarySessionExpiredError as TemporarySessionExpiredError,
VerificationAttemptFailedError as VerificationAttemptFailedError,
VerificationExpiredError as VerificationExpiredError,
VerificationNotInitiatedError as VerificationNotInitiatedError,
)
from stripe._error_object import (
ErrorObject as ErrorObject,
Expand Down Expand Up @@ -700,16 +718,34 @@ def set_app_info(
"EphemeralKeyService": ("stripe._ephemeral_key_service", False),
"APIConnectionError": ("stripe._error", False),
"APIError": ("stripe._error", False),
"AlreadyCanceledError": ("stripe._error", False),
"AuthenticationError": ("stripe._error", False),
"BlockedByStripeError": ("stripe._error", False),
"CannotProceedError": ("stripe._error", False),
"CapabilityNotEnabledError": ("stripe._error", False),
"CardError": ("stripe._error", False),
"ControlledByAlternateResourceError": ("stripe._error", False),
"FeatureNotEnabledError": ("stripe._error", False),
"FinancialAccountNotOpenError": ("stripe._error", False),
"FxQuoteNeedsRefreshError": ("stripe._error", False),
"IdempotencyError": ("stripe._error", False),
"InsufficientFundsError": ("stripe._error", False),
"InvalidPaymentMethodError": ("stripe._error", False),
"InvalidPayoutMethodError": ("stripe._error", False),
"InvalidRequestError": ("stripe._error", False),
"InvalidVaultedCredentialError": ("stripe._error", False),
"NotCancelableError": ("stripe._error", False),
"PermissionError": ("stripe._error", False),
"QuotaExceededError": ("stripe._error", False),
"RateLimitError": ("stripe._error", False),
"RecipientNotNotifiableError": ("stripe._error", False),
"SignatureVerificationError": ("stripe._error", False),
"StripeError": ("stripe._error", False),
"StripeErrorWithParamCode": ("stripe._error", False),
"TemporarySessionExpiredError": ("stripe._error", False),
"VerificationAttemptFailedError": ("stripe._error", False),
"VerificationExpiredError": ("stripe._error", False),
"VerificationNotInitiatedError": ("stripe._error", False),
"ErrorObject": ("stripe._error_object", False),
"OAuthErrorObject": ("stripe._error_object", False),
"Event": ("stripe._event", False),
Expand Down
34 changes: 34 additions & 0 deletions stripe/_account.py
Original file line number Diff line number Diff line change
Expand Up @@ -628,6 +628,12 @@ class Capabilities(StripeObject):
"""
The status of the US customer_balance payments (USD currency) capability of the account, or whether the account can directly process US customer_balance charges.
"""
wero_payments: Optional[
Union[Literal["active", "inactive", "pending"], str]
]
"""
The status of the Wero capability of the account, or whether the account can directly process Wero payments.
"""
zip_payments: Optional[
Union[Literal["active", "inactive", "pending"], str]
]
Expand Down Expand Up @@ -776,6 +782,32 @@ class OwnershipDeclaration(StripeObject):
The user-agent string from the browser where the beneficial owner attestation was made.
"""

class PhysicalAddress(StripeObject):
city: Optional[str]
"""
City, district, suburb, town, or village.
"""
country: Optional[str]
"""
Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
"""
line1: Optional[str]
"""
Address line 1, such as the street, PO Box, or company name.
"""
line2: Optional[str]
"""
Address line 2, such as the apartment, suite, unit, or building.
"""
postal_code: Optional[str]
"""
ZIP or postal code.
"""
state: Optional[str]
"""
State, county, province, or region ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)).
"""

class PrincipalPlaceOfBusiness(StripeObject):
city: Optional[str]
"""
Expand Down Expand Up @@ -918,6 +950,7 @@ class Document(StripeObject):
"""
The company's phone number (used for verification).
"""
physical_address: Optional[PhysicalAddress]
principal_place_of_business: Optional[PrincipalPlaceOfBusiness]
registration_date: Optional[RegistrationDate]
representative_declaration: Optional[RepresentativeDeclaration]
Expand Down Expand Up @@ -980,6 +1013,7 @@ class Document(StripeObject):
"administrative_address": AdministrativeAddress,
"directorship_declaration": DirectorshipDeclaration,
"ownership_declaration": OwnershipDeclaration,
"physical_address": PhysicalAddress,
"principal_place_of_business": PrincipalPlaceOfBusiness,
"registration_date": RegistrationDate,
"representative_declaration": RepresentativeDeclaration,
Expand Down
39 changes: 39 additions & 0 deletions stripe/_account_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,17 @@ class Features(StripeObject):
features: Features
_inner_class_types = {"features": Features}

class ReportingChart(StripeObject):
class Features(StripeObject):
pass

enabled: bool
"""
Whether the embedded component is enabled.
"""
features: Features
_inner_class_types = {"features": Features}

class TaxRegistrations(StripeObject):
class Features(StripeObject):
pass
Expand All @@ -464,6 +475,28 @@ class Features(StripeObject):
features: Features
_inner_class_types = {"features": Features}

class TerminalHardwareOrders(StripeObject):
class Features(StripeObject):
pass

enabled: bool
"""
Whether the embedded component is enabled.
"""
features: Features
_inner_class_types = {"features": Features}

class TerminalHardwareShop(StripeObject):
class Features(StripeObject):
pass

enabled: bool
"""
Whether the embedded component is enabled.
"""
features: Features
_inner_class_types = {"features": Features}

account_management: AccountManagement
account_onboarding: AccountOnboarding
balance_report: BalanceReport
Expand All @@ -484,8 +517,11 @@ class Features(StripeObject):
payout_reconciliation_report: PayoutReconciliationReport
payouts: Payouts
payouts_list: PayoutsList
reporting_chart: ReportingChart
tax_registrations: TaxRegistrations
tax_settings: TaxSettings
terminal_hardware_orders: TerminalHardwareOrders
terminal_hardware_shop: TerminalHardwareShop
_inner_class_types = {
"account_management": AccountManagement,
"account_onboarding": AccountOnboarding,
Expand All @@ -507,8 +543,11 @@ class Features(StripeObject):
"payout_reconciliation_report": PayoutReconciliationReport,
"payouts": Payouts,
"payouts_list": PayoutsList,
"reporting_chart": ReportingChart,
"tax_registrations": TaxRegistrations,
"tax_settings": TaxSettings,
"terminal_hardware_orders": TerminalHardwareOrders,
"terminal_hardware_shop": TerminalHardwareShop,
}

account: str
Expand Down
54 changes: 54 additions & 0 deletions stripe/_api_requestor.py
Original file line number Diff line number Diff line change
Expand Up @@ -417,10 +417,64 @@ def specific_v2_api_error(self, rbody, rcode, resp, rheaders, error_data):
code,
)
# switchCases: The beginning of the section generated from our OpenAPI spec
elif type == "already_canceled":
return error.AlreadyCanceledError(**error_args)
elif type == "blocked_by_stripe":
return error.BlockedByStripeError(**error_args)
elif type == "cannot_proceed":
return error.CannotProceedError(
**error_args,
reason=error_data.get("reason"),
)
elif type == "capability_not_enabled":
return error.CapabilityNotEnabledError(**error_args)
elif type == "controlled_by_alternate_resource":
return error.ControlledByAlternateResourceError(**error_args)
elif type == "feature_not_enabled":
return error.FeatureNotEnabledError(**error_args)
elif type == "financial_account_not_open":
return error.FinancialAccountNotOpenError(**error_args)
elif type == "fx_quote_needs_refresh":
return error.FxQuoteNeedsRefreshError(**error_args)
elif type == "insufficient_funds":
return error.InsufficientFundsError(**error_args)
elif type == "invalid_payment_method":
return error.InvalidPaymentMethodError(
**error_args,
invalid_param=error_data.get("invalid_param"),
)
elif type == "invalid_payout_method":
return error.InvalidPayoutMethodError(**error_args)
elif type == "invalid_vaulted_credential":
return error.InvalidVaultedCredentialError(
**error_args,
invalid_param=error_data.get("invalid_param"),
)
elif type == "not_cancelable":
return error.NotCancelableError(**error_args)
elif type == "quota_exceeded":
return error.QuotaExceededError(**error_args)
elif type == "rate_limit":
return error.RateLimitError(**error_args)
elif type == "recipient_not_notifiable":
return error.RecipientNotNotifiableError(**error_args)
elif type == "temporary_session_expired":
return error.TemporarySessionExpiredError(**error_args)
elif type == "verification_attempt_failed":
return error.VerificationAttemptFailedError(
**error_args,
verification_status=error_data.get("verification_status"),
)
elif type == "verification_expired":
return error.VerificationExpiredError(
**error_args,
verification_status=error_data.get("verification_status"),
)
elif type == "verification_not_initiated":
return error.VerificationNotInitiatedError(
**error_args,
verification_status=error_data.get("verification_status"),
)
# switchCases: The end of the section generated from our OpenAPI spec

return self.specific_v1_api_error(
Expand Down
2 changes: 1 addition & 1 deletion stripe/_api_version.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# File generated from our OpenAPI spec
class _ApiVersion:
CURRENT = "2026-09-30.endive"
CURRENT = "2026-10-28.endive"
CURRENT_MAJOR = "endive"
8 changes: 8 additions & 0 deletions stripe/_application_fee.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,14 @@

@nested_resource_class_methods("refund")
class ApplicationFee(ListableAPIResource["ApplicationFee"]):
"""
When you collect a transaction fee on top of a charge made for your user
(using [Connect](https://docs.stripe.com/connect)), an `Application Fee` object is created in
your account. You can list, retrieve, and refund application fees.
Related guide: [Collecting application fees](https://docs.stripe.com/connect/direct-charges#collect-fees)
"""

OBJECT_NAME: ClassVar[Literal["application_fee"]] = "application_fee"

class FeeSource(StripeObject):
Expand Down
5 changes: 5 additions & 0 deletions stripe/_card.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ class Card(DeletableAPIResource["Card"], UpdateableAPIResource["Card"]):
later. You can also store multiple debit cards on a recipient in order to
transfer to those cards later.

This API is deprecated. Use the [PaymentMethods API](https://docs.stripe.com/api/payment_methods) instead.

Related guide: [Card payments with Sources](https://docs.stripe.com/sources/cards)
"""

Expand All @@ -34,6 +36,9 @@ class Networks(StripeObject):
"""

account: Optional[ExpandableField["Account"]]
"""
The account this card belongs to. Only applicable on Accounts (not customers or recipients) This property is only available when returned as an [External Account](https://docs.stripe.com/api/external_account_cards/object) where [controller.is_controller](https://docs.stripe.com/api/accounts/object#account_object-controller-is_controller) is `true`.
"""
address_city: Optional[str]
"""
City/District/Suburb/Town/Village.
Expand Down
13 changes: 13 additions & 0 deletions stripe/_charge.py
Original file line number Diff line number Diff line change
Expand Up @@ -937,6 +937,18 @@ class ShippingAddress(StripeObject):
"""
Status of a card based on the card issuer.
"""
setup_credential_usage: Optional[
Union[Literal["installment", "recurring", "unscheduled"], str]
]
"""
The payment_method_options.card.setup_credential_usage value that was passed when setup_future_usage was present at confirmation, one of `recurring`, `unscheduled`, or `installment`
"""
stored_credential_usage: Optional[
Union[Literal["installment", "recurring", "unscheduled"], str]
]
"""
The payment_method_options.card.stored_credential_usage value that was passed for an off session, merchant-initiated transaction.
"""
three_d_secure: Optional[ThreeDSecure]
"""
Populated if this transaction used 3D Secure authentication.
Expand Down Expand Up @@ -1183,6 +1195,7 @@ class Crypto(StripeObject):
token_currency: Optional[
Union[
Literal[
"ousd",
"phantom_cash",
"usdc",
"usdg",
Expand Down
Loading
Loading