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
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion CODEGEN_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
e10daa4ed23a4fe87d6ea60836226446e042fdd3
ad2b71436a7c3a9c93ae7beeecc0f8975fba42d5
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2186
v2204
6 changes: 6 additions & 0 deletions stripe/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,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,
reserve as reserve,
Expand Down Expand Up @@ -476,6 +477,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 @@ -638,6 +642,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),
"reserve": ("stripe.reserve", True),
Expand Down Expand Up @@ -901,6 +906,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
8 changes: 7 additions & 1 deletion stripe/_account.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,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 @@ -540,6 +542,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 @@ -1527,7 +1533,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
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
2 changes: 1 addition & 1 deletion stripe/_account_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,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
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-02-25.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 @@ -98,7 +98,7 @@ class FeeSource(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}

available: List[Available]
"""
Available funds that you can transfer or pay out automatically by Stripe or explicitly through the [Transfers API](https://api.stripe.com#transfers) or [Payouts API](https://api.stripe.com#payouts). You can find the available balance for each currency and payment type in the `source_types` property.
Expand All @@ -269,7 +332,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 @@ -280,6 +343,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]

@classmethod
def retrieve(cls, **params: Unpack["BalanceRetrieveParams"]) -> "Balance":
Expand Down Expand Up @@ -314,4 +378,5 @@ def class_url(cls):
"issuing": Issuing,
"pending": Pending,
"refund_and_dispute_prefunding": RefundAndDisputePrefunding,
"risk_reserved": RiskReserved,
}
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
18 changes: 12 additions & 6 deletions stripe/_charge.py
Original file line number Diff line number Diff line change
Expand Up @@ -1141,7 +1141,9 @@ class Crypto(StripeObject):
"""
The wallet address of the customer.
"""
network: Optional[Literal["base", "ethereum", "polygon", "solana"]]
network: Optional[
Literal["base", "ethereum", "polygon", "solana", "tempo"]
]
"""
The blockchain network that the transaction was sent on.
"""
Expand Down Expand Up @@ -2090,10 +2092,6 @@ class StripeBalance(StripeObject):
"""
The connected account ID whose Stripe balance to use as the source of payment
"""
source_type: Optional[Literal["bank_account", "card", "fpx"]]
"""
The [source_type](https://docs.stripe.com/api/balance/balance_object#balance_object-available-source_types) of the balance
"""

class Swish(StripeObject):
fingerprint: Optional[str]
Expand All @@ -2112,6 +2110,12 @@ class Swish(StripeObject):
class Twint(StripeObject):
pass

class Upi(StripeObject):
vpa: Optional[str]
"""
Customer's unique Virtual Payment Address.
"""

class UsBankAccount(StripeObject):
account_holder_type: Optional[Literal["company", "individual"]]
"""
Expand Down Expand Up @@ -2240,6 +2244,7 @@ class Zip(StripeObject):
An additional hash is included on `payment_method_details` with a name matching this value.
It contains information specific to the payment method.
"""
upi: Optional[Upi]
us_bank_account: Optional[UsBankAccount]
wechat: Optional[Wechat]
wechat_pay: Optional[WechatPay]
Expand Down Expand Up @@ -2305,6 +2310,7 @@ class Zip(StripeObject):
"stripe_balance": StripeBalance,
"swish": Swish,
"twint": Twint,
"upi": Upi,
"us_bank_account": UsBankAccount,
"wechat": Wechat,
"wechat_pay": WechatPay,
Expand Down Expand Up @@ -2469,7 +2475,7 @@ class TransferData(StripeObject):
level3: Optional[Level3]
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: Dict[str, str]
"""
Expand Down
15 changes: 10 additions & 5 deletions stripe/_confirmation_token.py
Original file line number Diff line number Diff line change
Expand Up @@ -1386,17 +1386,19 @@ class StripeBalance(StripeObject):
"""
The connected account ID whose Stripe balance to use as the source of payment
"""
source_type: Optional[Literal["bank_account", "card", "fpx"]]
"""
The [source_type](https://docs.stripe.com/api/balance/balance_object#balance_object-available-source_types) of the balance
"""

class Swish(StripeObject):
pass

class Twint(StripeObject):
pass

class Upi(StripeObject):
vpa: Optional[str]
"""
Customer's unique Virtual Payment Address
"""

class UsBankAccount(StripeObject):
class Networks(StripeObject):
preferred: Optional[str]
Expand Down Expand Up @@ -1622,13 +1624,15 @@ class Zip(StripeObject):
"stripe_balance",
"swish",
"twint",
"upi",
"us_bank_account",
"wechat_pay",
"zip",
]
"""
The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type.
"""
upi: Optional[Upi]
us_bank_account: Optional[UsBankAccount]
wechat_pay: Optional[WechatPay]
zip: Optional[Zip]
Expand Down Expand Up @@ -1690,6 +1694,7 @@ class Zip(StripeObject):
"stripe_balance": StripeBalance,
"swish": Swish,
"twint": Twint,
"upi": Upi,
"us_bank_account": UsBankAccount,
"wechat_pay": WechatPay,
"zip": Zip,
Expand Down Expand Up @@ -1747,7 +1752,7 @@ class Address(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`.
"""
mandate_data: Optional[MandateData]
"""
Expand Down
2 changes: 1 addition & 1 deletion stripe/_connect_collection_transfer.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class ConnectCollectionTransfer(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["connect_collection_transfer"]
"""
Expand Down
4 changes: 2 additions & 2 deletions stripe/_coupon.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class Coupon(
"""
A coupon contains information about a percent-off or amount-off discount you
might want to apply to a customer. Coupons may be applied to [subscriptions](https://api.stripe.com#subscriptions), [invoices](https://api.stripe.com#invoices),
[checkout sessions](https://docs.stripe.com/api/checkout/sessions), [quotes](https://api.stripe.com#quotes), and more. Coupons do not work with conventional one-off [charges](https://api.stripe.com#create_charge) or [payment intents](https://docs.stripe.com/api/payment_intents).
[checkout sessions](https://docs.stripe.com/api/checkout/sessions), [quotes](https://api.stripe.com#quotes), and more. Coupons do not work with conventional one-off [charges](https://docs.stripe.com/api/charges/create) or [payment intents](https://docs.stripe.com/api/payment_intents).
"""

OBJECT_NAME: ClassVar[Literal["coupon"]] = "coupon"
Expand Down Expand Up @@ -93,7 +93,7 @@ class Script(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`.
"""
max_redemptions: Optional[int]
"""
Expand Down
2 changes: 1 addition & 1 deletion stripe/_credit_note.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ class TaxRateDetails(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`.
"""
memo: Optional[str]
"""
Expand Down
8 changes: 6 additions & 2 deletions stripe/_credit_note_line_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# File generated from our OpenAPI spec
from stripe._expandable_field import ExpandableField
from stripe._stripe_object import StripeObject
from typing import ClassVar, List, Optional
from typing import ClassVar, Dict, List, Optional
from typing_extensions import Literal, TYPE_CHECKING

if TYPE_CHECKING:
Expand Down Expand Up @@ -138,7 +138,11 @@ class TaxRateDetails(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]]
"""
Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
"""
object: Literal["credit_note_line_item"]
"""
Expand Down
Loading
Loading