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

* Add support for new resources `radar.Rule`, `v2.money_management.FundingSession`, and `v2.money_management.InboundTransferMandate`
* Add support for `cancel`, `create`, `list`, and `retrieve` methods on resource `v2.money_management.InboundTransferMandate`
* Add support for `create` method on resource `v2.money_management.FundingSession`
* Add support for `excluded_payout_destinations` on `AccountModifyParamsSettingCapital`
* Add support for `wero_payments` on `Account.Capability`
* ⚠️ Change type of `Charge.Outcome.rule` from `RadarRule` to `$Radar.Rule`
* Add support for new value `ousd` on enums `Charge.PaymentMethodDetail.Crypto.token_currency`, `PaymentAttemptRecord.PaymentMethodDetail.Crypto.token_currency`, and `PaymentRecord.PaymentMethodDetail.Crypto.token_currency`
* Add support for `location` and `reader` on `Charge.PaymentMethodDetail.Swish`, `PaymentAttemptRecord.PaymentMethodDetail.Swish`, and `PaymentRecord.PaymentMethodDetail.Swish`
* Add support for `payment_settings` on `Checkout.Session` and `checkout.SessionCreateParams`
* Add support for `on_behalf_of` on `Checkout.Session`
* Add support for new values `fednow` and `rtp` on enum `CustomerCashBalanceTransaction.Funded.BankTransfer.UsBankTransfer.network`
* Add support for `flexible_credential` on `Issuing.Authorization`
* Add support for `fuels` on `Issuing.Transaction.PurchaseDetail`
* Add support for `us_bank_account` on `PaymentAttemptRecordReportFailedParamsPaymentMethodDetail`, `PaymentRecordReportPaymentAttemptFailedParamsPaymentMethodDetail`, `PaymentRecordReportPaymentAttemptParamsPaymentMethodDetail`, `PaymentRecordReportPaymentParamsPaymentMethodDetail`, `Radar.PaymentEvaluation.PaymentDetail.MoneyMovementDetail`, and `radar.PaymentEvaluationCreateParamsPaymentDetailMoneyMovementDetail`
* Change type of `PaymentAttemptRecordReportFailedParamsPaymentMethodDetail.type` and `PaymentRecordReportPaymentAttemptFailedParamsPaymentMethodDetail.type` from `literal('card')` to `enum('card'|'us_bank_account')`
* Add support for `fleet` on `PaymentIntent.PaymentMethodOption.CardPresent`, `PaymentIntentConfirmParamsPaymentMethodOptionCardPresent`, `PaymentIntentCreateParamsPaymentMethodOptionCardPresent`, and `PaymentIntentModifyParamsPaymentMethodOptionCardPresent`
* Add support for `subscription_reference` on `PaymentIntent.PaymentMethodOption.Paypay`, `PaymentIntentConfirmParamsPaymentMethodOptionPaypay`, `PaymentIntentCreateParamsPaymentMethodOptionPaypay`, and `PaymentIntentModifyParamsPaymentMethodOptionPaypay`
* Add support for new value `us_bank_account` on enums `PaymentRecordReportPaymentAttemptParamsPaymentMethodDetail.type` and `PaymentRecordReportPaymentParamsPaymentMethodDetail.type`
* Add support for `enablement_details` on `QuotePreviewSubscriptionSchedule.DefaultSetting.AutomaticTax`, `QuotePreviewSubscriptionSchedule.Phase.AutomaticTax`, `Subscription.AutomaticTax`, `SubscriptionSchedule.DefaultSetting.AutomaticTax`, and `SubscriptionSchedule.Phase.AutomaticTax`
* Change type of `radar.PaymentEvaluationCreateParamsPaymentDetailMoneyMovementDetail.money_movement_type` from `literal('card')` to `enum('card'|'us_bank_account')`
* Add support for `rules` on `Radar.PaymentEvaluation`
* ⚠️ Change type of `Radar.PaymentEvaluation.PaymentDetail.MoneyMovementDetail.money_movement_type` from `literal('card')` to `enum('card'|'us_bank_account')`
* Add support for new values `request_three_d_secure` and `reroute` on enum `Radar.PaymentEvaluation.recommended_action`
* Add support for `bank_initiated_return` on `Radar.PaymentEvaluation.Signal`
* Add support for new value `hour` on enums `SharedPayment.GrantedToken.UsageLimit.Recurring.interval`, `SharedPayment.IssuedToken.UsageLimit.Recurring.interval`, `shared_payment.GrantedTokenCreateParamsUsageLimitRecurring.interval`, and `shared_payment.IssuedTokenCreateParamsUsageLimitRecurring.interval`
* Add support for new values `digital_excise_tax` and `utility_users_tax` on enums `Tax.Registration.CountryOption.Me.type` and `tax.RegistrationCreateParamsCountryOptionMe.type`
* Add support for `utility_users_tax` on `Tax.Registration.CountryOption.Me`
* Add support for `enable_customer_cancellation` on `terminal.ReaderActivateGiftCardParams`, `terminal.ReaderCashoutGiftCardParams`, `terminal.ReaderCheckGiftCardBalanceParams`, and `terminal.ReaderReloadGiftCardParams`
* Add support for `vipps_payments` on `V2.Core.Account.Configuration.Merchant.Capability`, `v2.core.AccountCreateParamsConfigurationMerchantCapability`, and `v2.core.AccountModifyParamsConfigurationMerchantCapability`
* Add support for `business_custodial_storage` on `V2.Core.Account.Configuration.MoneyManager.Capability`, `v2.core.AccountCreateParamsConfigurationMoneyManagerCapability`, and `v2.core.AccountModifyParamsConfigurationMoneyManagerCapability`
* Add support for `offramp` and `onramp` on `V2.Core.Account.Configuration.MoneyManager.Capability.OutboundPayment`, `V2.Core.Account.Configuration.MoneyManager.Capability.OutboundTransfer`, `V2.Core.Account.Configuration.MoneyManager.Capability.ReceivedCredit`, `v2.core.AccountCreateParamsConfigurationMoneyManagerCapabilityOutboundPayment`, `v2.core.AccountCreateParamsConfigurationMoneyManagerCapabilityOutboundTransfer`, `v2.core.AccountCreateParamsConfigurationMoneyManagerCapabilityReceivedCredit`, `v2.core.AccountModifyParamsConfigurationMoneyManagerCapabilityOutboundPayment`, `v2.core.AccountModifyParamsConfigurationMoneyManagerCapabilityOutboundTransfer`, and `v2.core.AccountModifyParamsConfigurationMoneyManagerCapabilityReceivedCredit`
* Add support for `pix` on `V2.Core.Account.Configuration.Recipient.Capability`, `V2.MoneyManagement.PayoutMethod`, `v2.core.AccountCreateParamsConfigurationRecipientCapability`, `v2.core.AccountModifyParamsConfigurationRecipientCapability`, and `v2.money_management.OutboundSetupIntentCreateParamsPayoutMethodDatum`
* ⚠️ Add support for new value `pix` on enum `V2.Core.Account.Configuration.Recipient.DefaultOutboundDestination.type`
* Add support for new values `pix` and `vipps_payments` on enums `V2.Core.Account.FutureRequirement.Entry.Impact.RestrictsCapability.capability` and `V2.Core.Account.Requirement.Entry.Impact.RestrictsCapability.capability`
* Add support for `account` on `V2.MoneyManagement.FinancialAddress`, `v2.money_management.FinancialAddressCreateParams`, and `v2.money_management.FinancialAddressListParams`
* Add support for new values `bre_b`, `nip`, and `pix` on enum `V2.MoneyManagement.FinancialAddress.BankAccount.type`
* Add support for `supported_network_details` on `V2.MoneyManagement.FinancialAddress.CryptoWallet`
* Add support for new value `bitcoin` on enums `V2.MoneyManagement.FinancialAddress.CryptoWallet.network`, `V2.MoneyManagement.ReceivedCredit.CryptoWalletTransfer.CryptoWallet.network`, and `v2.money_management.FinancialAddressCreateParamsCryptoWallet.network`
* Add support for `network_details` on `V2.MoneyManagement.InboundTransfer` and `v2.money_management.InboundTransferCreateParams`
* Add support for `bacs_debit` on `V2.MoneyManagement.InboundTransfer.From.PaymentMethod`
* Add support for new value `pix` on enums `V2.MoneyManagement.PayoutMethod.type`, `v2.money_management.OutboundSetupIntentCreateParamsPayoutMethodDatum.type`, and `v2.money_management.OutboundSetupIntentModifyParamsPayoutMethodDatum.type`
* Add support for `bic` on `V2.MoneyManagement.ReceivedCredit.BankTransfer.OriginatingBankAccount.Aba` and `V2.MoneyManagement.ReceivedCredit.BankTransfer.OriginatingBankAccount.SortCode`
* Add support for `originating_crypto_wallet`, `token_currency`, and `transaction_hash` on `V2.MoneyManagement.ReceivedCredit.CryptoWalletTransfer`
* Add support for `invoices` on `V2.Tax.IntegrationConfiguration` and `v2.tax.IntegrationConfigurationModifyParams`
* ⚠️ Remove support for `account` on `v2.risk.InquiryListParams`
* Add support for new values `brl`, `cop`, and `ngn` on enum `v2.money_management.FinancialAddressCreateParamsBankAccount.currency`
* Add support for `customer` and `subscription` on `EventsV1InvoiceUpcomingEvent`
* Add support for new value `vipps_payments` on enum `EventsV2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEvent.updated_capability`
* Add support for new values `business_custodial_storage.inbound.ousd`, `business_custodial_storage.inbound.usdc`, `business_custodial_storage.outbound.ousd`, `business_custodial_storage.outbound.usdc`, `outbound_payments.offramp.bank_accounts.brl`, `outbound_payments.offramp.bank_accounts.cop`, `outbound_payments.offramp.bank_accounts.eur`, `outbound_payments.offramp.bank_accounts.gbp`, `outbound_payments.offramp.bank_accounts.mxn`, `outbound_payments.offramp.bank_accounts.usd`, `outbound_payments.onramp.crypto_wallets.brl`, `outbound_payments.onramp.crypto_wallets.cop`, `outbound_payments.onramp.crypto_wallets.eur`, `outbound_payments.onramp.crypto_wallets.gbp`, `outbound_payments.onramp.crypto_wallets.mxn`, `outbound_payments.onramp.crypto_wallets.usd`, `outbound_transfers.offramp.bank_accounts.brl`, `outbound_transfers.offramp.bank_accounts.cop`, `outbound_transfers.offramp.bank_accounts.eur`, `outbound_transfers.offramp.bank_accounts.gbp`, `outbound_transfers.offramp.bank_accounts.mxn`, `outbound_transfers.offramp.bank_accounts.usd`, `outbound_transfers.onramp.crypto_wallets.brl`, `outbound_transfers.onramp.crypto_wallets.cop`, `outbound_transfers.onramp.crypto_wallets.eur`, `outbound_transfers.onramp.crypto_wallets.gbp`, `outbound_transfers.onramp.crypto_wallets.mxn`, `outbound_transfers.onramp.crypto_wallets.usd`, `received_credits.offramp.bank_accounts.brl`, `received_credits.offramp.bank_accounts.cop`, `received_credits.offramp.bank_accounts.eur`, `received_credits.offramp.bank_accounts.gbp`, `received_credits.offramp.bank_accounts.mxn`, `received_credits.offramp.bank_accounts.usd`, `received_credits.onramp.crypto_wallets.brl`, `received_credits.onramp.crypto_wallets.cop`, `received_credits.onramp.crypto_wallets.eur`, `received_credits.onramp.crypto_wallets.gbp`, `received_credits.onramp.crypto_wallets.mxn`, and `received_credits.onramp.crypto_wallets.usd` on enum `EventsV2CoreAccountIncludingConfigurationMoneyManagerCapabilityStatusUpdatedEvent.updated_capability`
* Add support for new value `pix` on enum `EventsV2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEvent.updated_capability`
* Add support for event notifications `V2MoneyManagementInboundTransferMandateActivatedEvent`, `V2MoneyManagementInboundTransferMandateCreatedEvent`, `V2MoneyManagementInboundTransferMandateExpiredEvent`, `V2MoneyManagementInboundTransferMandateRefusedEvent`, and `V2MoneyManagementInboundTransferMandateRevokedEvent` with related object `v2.money_management.InboundTransferMandate`
* Add support for error code `service_unavailable` on `ServiceUnavailableError`
2 changes: 1 addition & 1 deletion CODEGEN_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
588801ef34f7b5f7d6a784d3354f5f93d2a26ffb
43649cb7390f9257ffa04232dc7ed9ea8359c77f
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2526
v2544
6 changes: 6 additions & 0 deletions stripe/_account.py
Original file line number Diff line number Diff line change
Expand Up @@ -705,6 +705,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
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.preview"
CURRENT = "2026-10-07.preview"
CURRENT_MAJOR = ""
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
27 changes: 11 additions & 16 deletions stripe/_charge.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
ChargeRetrieveRefundParams,
)
from stripe.params._charge_search_params import ChargeSearchParams
from stripe.radar._rule import Rule


@nested_resource_class_methods("refund")
Expand Down Expand Up @@ -144,20 +145,6 @@ class LineItem(StripeObject):
_inner_class_types = {"line_items": LineItem}

class Outcome(StripeObject):
class Rule(StripeObject):
action: str
"""
The action taken on the payment.
"""
id: str
"""
Unique identifier for the object.
"""
predicate: str
"""
The predicate to evaluate the payment against.
"""

advice_code: Optional[
Union[
Literal[
Expand Down Expand Up @@ -193,7 +180,7 @@ class Rule(StripeObject):
"""
Stripe Radar's evaluation of the riskiness of the payment. Possible values for evaluated payments are between 0 and 100. For non-card payments, card-based payments predating the public assignment of risk scores, or in the event of an error during evaluation, this field will not be present. This field is only available with Radar for Fraud Teams.
"""
rule: Optional[ExpandableField[Rule]]
rule: Optional[ExpandableField["Rule"]]
"""
The ID of the Radar rule that matched the payment, if applicable.
"""
Expand All @@ -205,7 +192,6 @@ class Rule(StripeObject):
"""
Possible values are `authorized`, `manual_review`, `issuer_declined`, `blocked`, and `invalid`. See [understanding declines](https://docs.stripe.com/declines) and [Radar reviews](https://docs.stripe.com/radar/reviews) for details.
"""
_inner_class_types = {"rule": Rule}

class PaymentMethodDetails(StripeObject):
class AchCreditTransfer(StripeObject):
Expand Down Expand Up @@ -1308,6 +1294,7 @@ class Crypto(StripeObject):
token_currency: Optional[
Union[
Literal[
"ousd",
"phantom_cash",
"usdc",
"usdg",
Expand Down Expand Up @@ -2388,10 +2375,18 @@ class Swish(StripeObject):
"""
Uniquely identifies the payer's Swish account. You can use this attribute to check whether two Swish transactions were paid for by the same payer
"""
location: Optional[str]
"""
ID of the [location](https://docs.stripe.com/api/terminal/locations) that this transaction's reader is assigned to.
"""
payment_reference: Optional[str]
"""
Payer bank reference number for the payment
"""
reader: Optional[str]
"""
ID of the [reader](https://docs.stripe.com/api/terminal/readers) this transaction was made on.
"""
verified_phone_last4: Optional[str]
"""
The last four digits of the Swish account phone number
Expand Down
7 changes: 6 additions & 1 deletion stripe/_customer_cash_balance_transaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,12 @@ class JpBankTransfer(StripeObject):

class UsBankTransfer(StripeObject):
network: Optional[
Union[Literal["ach", "domestic_wire_us", "swift"], str]
Union[
Literal[
"ach", "domestic_wire_us", "fednow", "rtp", "swift"
],
str,
]
]
"""
The banking network used for this funding.
Expand Down
Loading
Loading