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
54 changes: 54 additions & 0 deletions .hark/changes/2026-10-21_stripe-openapi_ec7b311e.change.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
title: Update generated code
pr_url: https://github.com/stripe/stripe-python/pull/1945
semver_level: major
is_stripe_api_change: true
---

* Add support for new resources `risk.Form` and `v2.data.SearchResultList`
* Add support for `modify` and `retrieve` methods on resource `risk.Form`
* Add support for `search` method on resource `v2.data.SearchResultList`
* Add support for `business_profile_management` and `reporting_chart` on `AccountSession.Component`
* Change type of `AccountSession.Component.terminal_hardware_orders` from `nullable(ConnectEmbeddedBaseConfig)` to `ConnectEmbeddedBaseConfig`
* Change type of `AccountSession.Component.terminal_hardware_shop` from `nullable(ConnectEmbeddedBaseConfig)` to `ConnectEmbeddedBaseConfig`
* Change `AccountSession.Component.terminal_hardware_orders` to be required
* Change `AccountSession.Component.terminal_hardware_shop` to be required
* Add support for `subscription_pause` on `BillingPortal.Configuration.Feature`
* Change `BillingPortal.Session.Flow.subscription_pause` to be required
* Add support for new value `mandiri` on enums `Charge.PaymentMethodDetail.IdBankTransfer.bank`, `ConfirmationToken.PaymentMethodPreview.IdBankTransfer.bank`, `PaymentAttemptRecord.PaymentMethodDetail.IdBankTransfer.bank`, `PaymentMethod.IdBankTransfer.bank`, `PaymentRecord.PaymentMethodDetail.IdBankTransfer.bank`, and `SetupAttempt.PaymentMethodDetail.IdBankTransfer.bank`
* Add support for `marketing_attributions` on `Checkout.Session` and `checkout.SessionCreateParams`
* Add support for `metronome_commit` on `Checkout.Session.Item` and `checkout.SessionCreateParamsItem`
* Add support for `adjustable_quantity` on `checkout.SessionCreateParamsItemSubscriptionItem`
* Add support for new value `metronome_commit` on enums `Checkout.Session.Item.type` and `checkout.SessionCreateParamsItem.type`
* Add support for new values `au_acn`, `au_wpn`, `cz_dic`, `fr_siren`, `fr_siret`, `fr_spi`, `is_kt`, `md_cf`, `mu_vat`, `mz_nuit`, `nz_bn`, `pt_nif`, `sm_coe`, `tt_bir`, and `tt_vat` on enums `Checkout.Session.CollectedInformation.TaxId.type`, `Checkout.Session.CustomerDetail.TaxId.type`, `Invoice.CustomerTaxId.type`, `Order.TaxDetail.TaxId.type`, `QuotePreviewInvoice.CustomerTaxId.type`, `Tax.Calculation.CustomerDetail.TaxId.type`, and `Tax.Transaction.CustomerDetail.TaxId.type`
* Add support for `mandate_options` on `Checkout.Session.PaymentMethodOption.Card`
* ⚠️ Change type of `Dispute.Evidence.appeal` from `DisputeAppeal` to `nullable(DisputeAppeal)`
* Change `Dispute.EvidenceDetail.submission_method` to be required
* ⚠️ Remove support for value `email` from enums `identity.VerificationReportListParams.type`, `identity.VerificationSessionCreateParams.type`, and `identity.VerificationSessionModifyParams.type`
* ⚠️ Remove support for `details` on `Identity.VerificationReport.Email`
* ⚠️ Remove support for value `email` from enums `Identity.VerificationReport.type` and `Identity.VerificationSession.type`
* Add support for `merchant_amount_exchange_rate` on `issuing.AuthorizationCaptureParams`, `issuing.AuthorizationCreateParams`, and `issuing.TransactionCreateForceCaptureParams`
* Add support for `type` on `Issuing.Authorization` and `issuing.AuthorizationCreateParams`
* Add support for `settlement_details` on `issuing.AuthorizationCaptureParams` and `issuing.TransactionCreateForceCaptureParams`
* ⚠️ Remove support for `healthcare` on `issuing.AuthorizationCaptureParamsPurchaseDetail`, `issuing.TransactionCreateForceCaptureParamsPurchaseDetail`, and `issuing.TransactionCreateUnlinkedRefundParamsPurchaseDetail`
* Add support for `product_eligibility_inquiry` on `Issuing.Authorization`
* Add support for `account_tax_ids`, `custom_fields`, `description`, and `footer` on `PaymentLink.SubscriptionDatum.InvoiceSetting`
* Change type of `Radar.PaymentEvaluation.Signal.early_fraud_warning` from `nullable(Payment Evaluation Signal)` to `Payment Evaluation Signal`
* ⚠️ Change `Radar.PaymentEvaluation.Signal.early_fraud_warning` to be optional
* Add support for `reference_status` and `reference` on `Refund.DestinationDetail.AfterpayClearpay`, `Refund.DestinationDetail.Klarna`, and `Refund.DestinationDetail.Paypal`
* Add support for `bw`, `ci`, `gh`, and `mu` on `Tax.Registration.CountryOption`
* Add support for new value `account_takeover` on enum `V2.Core.AccountEvaluation.evaluations_triggered`
* Add support for `czk`, `nok`, `pln`, and `sek` on `V2.Core.Account.Configuration.MoneyManager.Capability.BusinessStorage.Inbound`, `V2.Core.Account.Configuration.MoneyManager.Capability.BusinessStorage.Outbound`, `v2.core.AccountCreateParamsConfigurationMoneyManagerCapabilityBusinessStorageInbound`, `v2.core.AccountCreateParamsConfigurationMoneyManagerCapabilityBusinessStorageOutbound`, `v2.core.AccountModifyParamsConfigurationMoneyManagerCapabilityBusinessStorageInbound`, and `v2.core.AccountModifyParamsConfigurationMoneyManagerCapabilityBusinessStorageOutbound`
* Add support for `stablecoin_custodial` on `V2.Core.Account.Configuration.Recipient.Capability.StripeBalance`, `v2.core.AccountCreateParamsConfigurationRecipientCapabilityStripeBalance`, and `v2.core.AccountModifyParamsConfigurationRecipientCapabilityStripeBalance`
* Add support for new value `stripe_balance.stablecoin_custodial` on enums `V2.Core.Account.FutureRequirement.Entry.Impact.RestrictsCapability.capability` and `V2.Core.Account.Requirement.Entry.Impact.RestrictsCapability.capability`
* Add support for `account_takeover_confirmation`, `account_takeover_report`, `credential_change`, `mfa_addition`, and `mfa_removal` on `V2.Signals.AccountActivity`, `v2.signals.AccountActivityCreateParams`, and `v2.signals.AccountEvaluationCreateParamsAccountActivityDetailData`
* Add support for new values `account_takeover_confirmation`, `account_takeover_mitigation`, `account_takeover_report`, `credential_change`, `mfa_addition`, and `mfa_removal` on enums `V2.Signals.AccountActivity.type`, `v2.signals.AccountActivityCreateParams.type`, and `v2.signals.AccountEvaluationCreateParamsAccountActivityDetailData.type`
* Add support for `account_takeover` on `V2.Signals.AccountEvaluation.EvaluatedSignal` and `V2.Signals.AccountSignal`
* Add support for new value `account_takeover` on enum `V2.Signals.AccountEvaluation.pending_signals`
* Add support for new value `account_takeover` on enums `V2.Signals.AccountEvaluation.requested_signals` and `v2.signals.AccountEvaluationCreateParams.requested_signals`
* Add support for `customer_risk` on `V2.Signals.AccountSignal`
* Add support for new values `account_takeover` and `customer_risk` on enums `V2.Signals.AccountSignal.type` and `v2.signals.AccountSignalListParams.type`
* Add support for new value `account_takeover` on enum `v2.core.AccountEvaluationCreateParams.signals`
* Add support for new values `business_storage.inbound.czk`, `business_storage.inbound.nok`, `business_storage.inbound.pln`, `business_storage.inbound.sek`, `business_storage.outbound.czk`, `business_storage.outbound.nok`, `business_storage.outbound.pln`, and `business_storage.outbound.sek` on enum `EventsV2CoreAccountIncludingConfigurationMoneyManagerCapabilityStatusUpdatedEvent.updated_capability`
* Add support for new value `stripe_balance.stablecoin_custodial` on enum `EventsV2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEvent.updated_capability`
* Add support for event notification `V2SignalsAccountSignalCustomerRiskReadyEvent` with related object `v2.signals.AccountSignal`
2 changes: 1 addition & 1 deletion CODEGEN_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ee856c792d5b7bc7c9a55588bd92531c2774e744
3a5e392ca3f7564fd6496837a3ccc9bb5d2647cd
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2562
v2588
4 changes: 4 additions & 0 deletions stripe/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ def add_beta_version(
radar as radar,
reporting as reporting,
reserve as reserve,
risk as risk,
shared_payment as shared_payment,
sigma as sigma,
tax as tax,
Expand Down Expand Up @@ -591,6 +592,7 @@ def add_beta_version(
)
from stripe._review import Review as Review
from stripe._review_service import ReviewService as ReviewService
from stripe._risk_service import RiskService as RiskService
from stripe._risk_signals import RiskSignals as RiskSignals
from stripe._search_result_object import (
SearchResultObject as SearchResultObject,
Expand Down Expand Up @@ -727,6 +729,7 @@ def add_beta_version(
"radar": ("stripe.radar", True),
"reporting": ("stripe.reporting", True),
"reserve": ("stripe.reserve", True),
"risk": ("stripe.risk", True),
"shared_payment": ("stripe.shared_payment", True),
"sigma": ("stripe.sigma", True),
"tax": ("stripe.tax", True),
Expand Down Expand Up @@ -1077,6 +1080,7 @@ def add_beta_version(
"ReserveTransaction": ("stripe._reserve_transaction", False),
"Review": ("stripe._review", False),
"ReviewService": ("stripe._review_service", False),
"RiskService": ("stripe._risk_service", False),
"RiskSignals": ("stripe._risk_signals", False),
"SearchResultObject": ("stripe._search_result_object", False),
"SearchableAPIResource": ("stripe._searchable_api_resource", False),
Expand Down
39 changes: 31 additions & 8 deletions stripe/_account_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,17 @@ class Features(StripeObject):
features: Features
_inner_class_types = {"features": Features}

class BusinessProfileManagement(StripeObject):
class Features(StripeObject):
pass

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

class CapitalFinancing(StripeObject):
class Features(StripeObject):
pass
Expand Down Expand Up @@ -634,6 +645,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 Down Expand Up @@ -690,6 +712,10 @@ class Features(StripeObject):
"""
Configuration for the [Bills](https://docs.stripe.com/connect/supported-embedded-components/bills/) embedded component.
"""
business_profile_management: Optional[BusinessProfileManagement]
"""
Configuration for the [Business profile management](https://docs.stripe.com/connect/supported-embedded-components/business-profile-management/) embedded component.
"""
capital_financing: Optional[CapitalFinancing]
capital_financing_application: Optional[CapitalFinancingApplication]
capital_financing_manual_payment: Optional[
Expand Down Expand Up @@ -741,23 +767,19 @@ class Features(StripeObject):
"""
Configuration for the [recipients list](https://docs.stripe.com/connect/supported-embedded-components/recipients-list/) embedded component.
"""
reporting_chart: ReportingChart
tax_registrations: TaxRegistrations
tax_settings: TaxSettings
terminal_hardware_orders: Optional[TerminalHardwareOrders]
"""
Configuration for the [Terminal hardware orders](https://docs.stripe.com/connect/supported-embedded-components/terminal-hardware-orders/) embedded component.
"""
terminal_hardware_shop: Optional[TerminalHardwareShop]
"""
Configuration for the [Terminal hardware shop](https://docs.stripe.com/connect/supported-embedded-components/terminal-hardware-shop/) embedded component.
"""
terminal_hardware_orders: TerminalHardwareOrders
terminal_hardware_shop: TerminalHardwareShop
_inner_class_types = {
"account_management": AccountManagement,
"account_onboarding": AccountOnboarding,
"agentic_commerce_settings": AgenticCommerceSettings,
"balance_report": BalanceReport,
"balances": Balances,
"bills": Bills,
"business_profile_management": BusinessProfileManagement,
"capital_financing": CapitalFinancing,
"capital_financing_application": CapitalFinancingApplication,
"capital_financing_manual_payment": CapitalFinancingManualPayment,
Expand All @@ -784,6 +806,7 @@ class Features(StripeObject):
"payouts": Payouts,
"payouts_list": PayoutsList,
"recipients_list": RecipientsList,
"reporting_chart": ReportingChart,
"tax_registrations": TaxRegistrations,
"tax_settings": TaxSettings,
"terminal_hardware_orders": TerminalHardwareOrders,
Expand Down
2 changes: 2 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 Down
4 changes: 3 additions & 1 deletion stripe/_charge.py
Original file line number Diff line number Diff line change
Expand Up @@ -1497,7 +1497,9 @@ class IdBankTransfer(StripeObject):
"""
Account number of the bank account to transfer funds to.
"""
bank: Union[Literal["bca", "bni", "bri", "cimb", "permata"], str]
bank: Union[
Literal["bca", "bni", "bri", "cimb", "mandiri", "permata"], str
]
"""
Bank where the account is located.
"""
Expand Down
5 changes: 4 additions & 1 deletion stripe/_confirmation_token.py
Original file line number Diff line number Diff line change
Expand Up @@ -1069,7 +1069,10 @@ class Grabpay(StripeObject):

class IdBankTransfer(StripeObject):
bank: Optional[
Union[Literal["bca", "bni", "bri", "cimb", "permata"], str]
Union[
Literal["bca", "bni", "bri", "cimb", "mandiri", "permata"],
str,
]
]
bank_code: Optional[str]
bank_name: Optional[str]
Expand Down
16 changes: 8 additions & 8 deletions stripe/_customer.py
Original file line number Diff line number Diff line change
Expand Up @@ -2119,7 +2119,7 @@ def _cls_fund_cash_balance(
**params: Unpack["CustomerFundCashBalanceParams"],
) -> "CustomerCashBalanceTransaction":
"""
Create an incoming testmode bank transfer
Create a test incoming bank transfer
"""
return cast(
"CustomerCashBalanceTransaction",
Expand All @@ -2138,7 +2138,7 @@ def fund_cash_balance(
customer: str, /, **params: Unpack["CustomerFundCashBalanceParams"]
) -> "CustomerCashBalanceTransaction":
"""
Create an incoming testmode bank transfer
Create a test incoming bank transfer
"""
...

Expand All @@ -2147,7 +2147,7 @@ def fund_cash_balance(
self, **params: Unpack["CustomerFundCashBalanceParams"]
) -> "CustomerCashBalanceTransaction":
"""
Create an incoming testmode bank transfer
Create a test incoming bank transfer
"""
...

Expand All @@ -2156,7 +2156,7 @@ def fund_cash_balance(
self, **params: Unpack["CustomerFundCashBalanceParams"]
) -> "CustomerCashBalanceTransaction":
"""
Create an incoming testmode bank transfer
Create a test incoming bank transfer
"""
return cast(
"CustomerCashBalanceTransaction",
Expand All @@ -2177,7 +2177,7 @@ async def _cls_fund_cash_balance_async(
**params: Unpack["CustomerFundCashBalanceParams"],
) -> "CustomerCashBalanceTransaction":
"""
Create an incoming testmode bank transfer
Create a test incoming bank transfer
"""
return cast(
"CustomerCashBalanceTransaction",
Expand All @@ -2196,7 +2196,7 @@ async def fund_cash_balance_async(
customer: str, /, **params: Unpack["CustomerFundCashBalanceParams"]
) -> "CustomerCashBalanceTransaction":
"""
Create an incoming testmode bank transfer
Create a test incoming bank transfer
"""
...

Expand All @@ -2205,7 +2205,7 @@ async def fund_cash_balance_async(
self, **params: Unpack["CustomerFundCashBalanceParams"]
) -> "CustomerCashBalanceTransaction":
"""
Create an incoming testmode bank transfer
Create a test incoming bank transfer
"""
...

Expand All @@ -2214,7 +2214,7 @@ async def fund_cash_balance_async(
self, **params: Unpack["CustomerFundCashBalanceParams"]
) -> "CustomerCashBalanceTransaction":
"""
Create an incoming testmode bank transfer
Create a test incoming bank transfer
"""
return cast(
"CustomerCashBalanceTransaction",
Expand Down
7 changes: 5 additions & 2 deletions stripe/_dispute.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,9 @@ class VisaCompliance(StripeObject):
Any server or activity logs showing proof that the customer accessed or downloaded the purchased digital product. This information should include IP addresses, corresponding timestamps, and any detailed recorded activity.
"""
appeal: Optional[Appeal]
"""
Appeal evidence submitted during the appeal stage.
"""
billing_address: Optional[str]
"""
The billing address provided by the customer.
Expand Down Expand Up @@ -394,8 +397,8 @@ class VisaCompliance(StripeObject):
"""
The number of times evidence has been submitted. Typically, you may only submit evidence once.
"""
submission_method: Optional[
Union[Literal["manual", "not_submitted", "smart_disputes"], str]
submission_method: Union[
Literal["manual", "not_submitted", "smart_disputes"], str
]
"""
Whether the dispute was submitted manually, with Smart Disputes, or not submitted.
Expand Down
Loading
Loading