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 CODEGEN_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
25e6bd225852aa44d783e9fb3b9895af39479331
b0095e1dae0437fa60f0933a38f0914e8bba44ff
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2206
v2207
2 changes: 2 additions & 0 deletions stripe/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -547,6 +547,7 @@ def add_beta_version(
from stripe._reversal import Reversal as Reversal
from stripe._review import Review as Review
from stripe._review_service import ReviewService as ReviewService
from stripe._risk_signals import RiskSignals as RiskSignals
from stripe._search_result_object import (
SearchResultObject as SearchResultObject,
)
Expand Down Expand Up @@ -980,6 +981,7 @@ def add_beta_version(
"Reversal": ("stripe._reversal", False),
"Review": ("stripe._review", False),
"ReviewService": ("stripe._review_service", False),
"RiskSignals": ("stripe._risk_signals", False),
"SearchResultObject": ("stripe._search_result_object", False),
"SearchableAPIResource": ("stripe._searchable_api_resource", False),
"SetupAttempt": ("stripe._setup_attempt", False),
Expand Down
13 changes: 12 additions & 1 deletion stripe/_account.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
from stripe._card import Card
from stripe._file import File
from stripe._login_link import LoginLink
from stripe._risk_signals import RiskSignals
from stripe._tax_id import TaxId
from stripe.params._account_create_external_account_params import (
AccountCreateExternalAccountParams,
Expand Down Expand Up @@ -85,6 +86,8 @@ class Account(
UpdateableAPIResource["Account"],
):
"""
For new integrations, we recommend using the [Accounts v2 API](https://docs.stripe.com/api/v2/core/accounts), in place of /v1/accounts and /v1/customers to represent a user.

This is an object representing a Stripe account. You can retrieve it to see
properties on the account like its current requirements or if the account is
enabled to make live charges or receive payouts.
Expand Down Expand Up @@ -544,6 +547,10 @@ class Capabilities(StripeObject):
"""
The status of the TWINT capability of the account, or whether the account can directly process TWINT charges.
"""
upi_payments: Optional[Literal["active", "inactive", "pending"]]
"""
The status of the upi payments capability of the account, or whether the account can directly process upi charges.
"""
us_bank_account_ach_payments: Optional[
Literal["active", "inactive", "pending"]
]
Expand Down Expand Up @@ -1531,7 +1538,7 @@ class Restricted(StripeObject):
"""
goods_type: Optional[Literal["digital_content", "other"]]
"""
Whether your business sells digital content or not.
The type of goods your business sells. Use `digital_content` if you sell digital content. Use `other` for all other types of goods or services.
"""
site: Optional[Site]
_inner_class_types = {"site": Site}
Expand Down Expand Up @@ -1705,6 +1712,10 @@ class TosAcceptance(StripeObject):
"""
requirements: Optional[Requirements]
risk_controls: Optional[RiskControls]
risk_signals: Optional["RiskSignals"]
"""
A hash containing information about risk signal collection
"""
settings: Optional[Settings]
"""
Options for customizing how the account functions within Stripe.
Expand Down
2 changes: 1 addition & 1 deletion stripe/_account_notice.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class LinkedObjects(StripeObject):
"""
livemode: bool
"""
Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
"""
metadata: Optional[Dict[str, str]]
"""
Expand Down
34 changes: 33 additions & 1 deletion stripe/_account_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,17 @@ class Features(StripeObject):
features: Features
_inner_class_types = {"features": Features}

class FinancialAccountRewards(StripeObject):
class Features(StripeObject):
pass

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

class FinancialAccountTransactions(StripeObject):
class Features(StripeObject):
card_spend_dispute_management: bool
Expand Down Expand Up @@ -301,6 +312,17 @@ class Features(StripeObject):
features: Features
_inner_class_types = {"features": Features}

class NestingDemo(StripeObject):
class Features(StripeObject):
pass

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

class NetworkCostPassthroughReport(StripeObject):
class Features(StripeObject):
pass
Expand Down Expand Up @@ -517,10 +539,18 @@ class Features(StripeObject):
disputes_list: DisputesList
documents: Documents
financial_account: FinancialAccount
financial_account_rewards: Optional[FinancialAccountRewards]
"""
Configuration for the [financial account rewards](https://docs.stripe.com/connect/supported-embedded-components/financial-account-rewards/) embedded component.
"""
financial_account_transactions: FinancialAccountTransactions
instant_payouts_promotion: InstantPayoutsPromotion
issuing_card: IssuingCard
issuing_cards_list: IssuingCardsList
nesting_demo: Optional[NestingDemo]
"""
Configuration for the [Nestingdemo](https://docs.stripe.com/connect/supported-embedded-components/nesting-demo/) embedded component.
"""
network_cost_passthrough_report: Optional[NetworkCostPassthroughReport]
"""
Configuration for the [network cost passthrough report](https://docs.stripe.com/connect/supported-embedded-components/network-cost-passthrough-report/) embedded component.
Expand Down Expand Up @@ -554,10 +584,12 @@ class Features(StripeObject):
"disputes_list": DisputesList,
"documents": Documents,
"financial_account": FinancialAccount,
"financial_account_rewards": FinancialAccountRewards,
"financial_account_transactions": FinancialAccountTransactions,
"instant_payouts_promotion": InstantPayoutsPromotion,
"issuing_card": IssuingCard,
"issuing_cards_list": IssuingCardsList,
"nesting_demo": NestingDemo,
"network_cost_passthrough_report": NetworkCostPassthroughReport,
"notification_banner": NotificationBanner,
"payment_details": PaymentDetails,
Expand Down Expand Up @@ -591,7 +623,7 @@ class Features(StripeObject):
"""
livemode: bool
"""
Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
"""
object: Literal["account_session"]
"""
Expand Down
62 changes: 61 additions & 1 deletion stripe/_account_signals.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ class Indicator(StripeObject):
"payment_volume",
"payouts",
"refunds",
"related_accounts",
"tenure",
"transfers",
]
Expand Down Expand Up @@ -69,6 +70,58 @@ class Indicator(StripeObject):
"""
_inner_class_types = {"indicators": Indicator}

class FraudIntent(StripeObject):
class Indicator(StripeObject):
description: str
"""
A brief explanation of how this indicator contributed to the delinquency probability.
"""
impact: Literal[
"decrease", "neutral", "slight_increase", "strong_increase"
]
"""
The effect this indicator had on the overall risk level.
"""
indicator: Literal[
"bank_account",
"business_information_and_account_activity",
"disputes",
"failures",
"geo_location",
"other",
"other_related_accounts",
"other_transaction_activity",
"owner_email",
"web_presence",
]
"""
The name of the specific indicator used in the risk assessment.
"""

evaluated_at: Optional[int]
"""
Time at which the signal was evaluated, measured in seconds since the Unix epoch.
"""
indicators: Optional[List[Indicator]]
"""
Array of objects representing individual factors that contributed to the calculated probability of fraud intent.
"""
probability: Optional[float]
"""
The probability of fraud intent. Can be between 0.00 and 100.00
"""
risk_level: Literal[
"elevated", "highest", "low", "normal", "not_assessed", "unknown"
]
"""
Categorical assessment of the fraud intent risk based on probability.
"""
signal_id: Optional[str]
"""
Unique identifier for the fraud intent signal.
"""
_inner_class_types = {"indicators": Indicator}

account: str
"""
The account for which the signals belong to.
Expand All @@ -77,6 +130,10 @@ class Indicator(StripeObject):
"""
The delinquency signal of the account.
"""
fraud_intent: Optional[FraudIntent]
"""
The fraud intent signal of the account.
"""
livemode: bool
"""
Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
Expand All @@ -85,4 +142,7 @@ class Indicator(StripeObject):
"""
String representing the object's type. Objects of the same type share the same value.
"""
_inner_class_types = {"delinquency": Delinquency}
_inner_class_types = {
"delinquency": Delinquency,
"fraud_intent": FraudIntent,
}
2 changes: 1 addition & 1 deletion stripe/_api_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# -*- coding: utf-8 -*-
# File generated from our OpenAPI spec
class _ApiVersion:
CURRENT = "2026-03-04.preview"
CURRENT = "2026-03-25.preview"
2 changes: 1 addition & 1 deletion stripe/_apple_pay_domain.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class ApplePayDomain(
"""
livemode: bool
"""
Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
"""
object: Literal["apple_pay_domain"]
"""
Expand Down
2 changes: 1 addition & 1 deletion stripe/_application_fee.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ class FundingSource(StripeObject):
"""
livemode: bool
"""
Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
"""
object: Literal["application_fee"]
"""
Expand Down
67 changes: 66 additions & 1 deletion stripe/_balance.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,69 @@ class SourceTypes(StripeObject):
"""
_inner_class_types = {"available": Available, "pending": Pending}

class RiskReserved(StripeObject):
class Available(StripeObject):
class SourceTypes(StripeObject):
bank_account: Optional[int]
"""
Amount coming from [legacy US ACH payments](https://docs.stripe.com/ach-deprecated).
"""
card: Optional[int]
"""
Amount coming from most payment methods, including cards as well as [non-legacy bank debits](https://docs.stripe.com/payments/bank-debits).
"""
fpx: Optional[int]
"""
Amount coming from [FPX](https://docs.stripe.com/payments/fpx), a Malaysian payment method.
"""

amount: int
"""
Balance amount.
"""
currency: str
"""
Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
"""
source_types: Optional[SourceTypes]
_inner_class_types = {"source_types": SourceTypes}

class Pending(StripeObject):
class SourceTypes(StripeObject):
bank_account: Optional[int]
"""
Amount coming from [legacy US ACH payments](https://docs.stripe.com/ach-deprecated).
"""
card: Optional[int]
"""
Amount coming from most payment methods, including cards as well as [non-legacy bank debits](https://docs.stripe.com/payments/bank-debits).
"""
fpx: Optional[int]
"""
Amount coming from [FPX](https://docs.stripe.com/payments/fpx), a Malaysian payment method.
"""

amount: int
"""
Balance amount.
"""
currency: str
"""
Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
"""
source_types: Optional[SourceTypes]
_inner_class_types = {"source_types": SourceTypes}

available: List[Available]
"""
Funds that are available for use.
"""
pending: List[Pending]
"""
Funds that are pending
"""
_inner_class_types = {"available": Available, "pending": Pending}

class TransitBalancesTotal(StripeObject):
class Available(StripeObject):
class SourceTypes(StripeObject):
Expand Down Expand Up @@ -332,7 +395,7 @@ class SourceTypes(StripeObject):
issuing: Optional[Issuing]
livemode: bool
"""
Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
"""
object: Literal["balance"]
"""
Expand All @@ -343,6 +406,7 @@ class SourceTypes(StripeObject):
Funds that aren't available in the balance yet. You can find the pending balance for each currency and each payment type in the `source_types` property.
"""
refund_and_dispute_prefunding: Optional[RefundAndDisputePrefunding]
risk_reserved: Optional[RiskReserved]
transit_balances_total: Optional[TransitBalancesTotal]

@classmethod
Expand Down Expand Up @@ -378,5 +442,6 @@ def class_url(cls):
"issuing": Issuing,
"pending": Pending,
"refund_and_dispute_prefunding": RefundAndDisputePrefunding,
"risk_reserved": RiskReserved,
"transit_balances_total": TransitBalancesTotal,
}
2 changes: 1 addition & 1 deletion stripe/_cash_balance.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class Settings(StripeObject):
"""
livemode: bool
"""
Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
"""
object: Literal["cash_balance"]
"""
Expand Down
Loading
Loading