Skip to content
2 changes: 1 addition & 1 deletion CODEGEN_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
e65e48569f6dfad2d5f1b58018017856520c3ae6
5a12435b3b09ae0579265713bb543b4bd962f424
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2186
v2204
18 changes: 12 additions & 6 deletions 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 @@ -472,6 +474,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 @@ -1765,7 +1771,7 @@ def persons( # pyright: ignore[reportGeneralTypeIssues]
self._request(
"get",
"/v1/accounts/{account}/persons".format(
account=sanitize_id(self.get("id"))
account=sanitize_id(self._data.get("id"))
),
params=params,
),
Expand Down Expand Up @@ -1820,7 +1826,7 @@ async def persons_async( # pyright: ignore[reportGeneralTypeIssues]
await self._request_async(
"get",
"/v1/accounts/{account}/persons".format(
account=sanitize_id(self.get("id"))
account=sanitize_id(self._data.get("id"))
),
params=params,
),
Expand Down Expand Up @@ -1881,7 +1887,7 @@ def reject( # pyright: ignore[reportGeneralTypeIssues]
self._request(
"post",
"/v1/accounts/{account}/reject".format(
account=sanitize_id(self.get("id"))
account=sanitize_id(self._data.get("id"))
),
params=params,
),
Expand Down Expand Up @@ -1944,7 +1950,7 @@ async def reject_async( # pyright: ignore[reportGeneralTypeIssues]
await self._request_async(
"post",
"/v1/accounts/{account}/reject".format(
account=sanitize_id(self.get("id"))
account=sanitize_id(self._data.get("id"))
),
params=params,
),
Expand Down Expand Up @@ -1984,7 +1990,7 @@ def _build_instance_url(cls, sid):
return "%s/%s" % (base, extn)

def instance_url(self):
return self._build_instance_url(self.get("id"))
return self._build_instance_url(self._data.get("id"))

def deauthorize(self, **params):
params["stripe_user_id"] = self.id
Expand All @@ -1994,7 +2000,7 @@ def serialize(self, previous):
params = super(Account, self).serialize(previous)
previous = previous or self._previous or {}

for k, v in iter(self.items()):
for k, v in iter(self._data.items()):
if k == "individual" and isinstance(v, Person) and k not in params:
params[k] = v.serialize(previous.get(k, None))

Expand Down
2 changes: 1 addition & 1 deletion stripe/_account_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,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: 2 additions & 0 deletions stripe/_api_requestor.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,8 @@ 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 == "rate_limit":
return error.RateLimitError(**error_args)
elif type == "temporary_session_expired":
return error.TemporarySessionExpiredError(**error_args)
# switchCases: The end of the section generated from our OpenAPI spec
Expand Down
4 changes: 2 additions & 2 deletions 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-02-25.clover"
CURRENT_MAJOR = "clover"
CURRENT = "2026-03-25.dahlia"
CURRENT_MAJOR = "dahlia"
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
6 changes: 3 additions & 3 deletions 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 Expand Up @@ -236,7 +236,7 @@ def refund( # pyright: ignore[reportGeneralTypeIssues]
self._request(
"post",
"/v1/application_fees/{id}/refunds".format(
id=sanitize_id(self.get("id"))
id=sanitize_id(self._data.get("id"))
),
params=params,
),
Expand Down Expand Up @@ -321,7 +321,7 @@ async def refund_async( # pyright: ignore[reportGeneralTypeIssues]
await self._request_async(
"post",
"/v1/application_fees/{id}/refunds".format(
id=sanitize_id(self.get("id"))
id=sanitize_id(self._data.get("id"))
),
params=params,
),
Expand Down
2 changes: 1 addition & 1 deletion stripe/_balance.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,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 Down
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: 14 additions & 4 deletions stripe/_charge.py
Original file line number Diff line number Diff line change
Expand Up @@ -1112,7 +1112,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 @@ -1947,6 +1949,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 @@ -2068,6 +2076,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 @@ -2126,6 +2135,7 @@ class Zip(StripeObject):
"stripe_account": StripeAccount,
"swish": Swish,
"twint": Twint,
"upi": Upi,
"us_bank_account": UsBankAccount,
"wechat": Wechat,
"wechat_pay": WechatPay,
Expand Down Expand Up @@ -2290,7 +2300,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 Expand Up @@ -2455,7 +2465,7 @@ def capture( # pyright: ignore[reportGeneralTypeIssues]
self._request(
"post",
"/v1/charges/{charge}/capture".format(
charge=sanitize_id(self.get("id"))
charge=sanitize_id(self._data.get("id"))
),
params=params,
),
Expand Down Expand Up @@ -2526,7 +2536,7 @@ async def capture_async( # pyright: ignore[reportGeneralTypeIssues]
await self._request_async(
"post",
"/v1/charges/{charge}/capture".format(
charge=sanitize_id(self.get("id"))
charge=sanitize_id(self._data.get("id"))
),
params=params,
),
Expand Down
11 changes: 10 additions & 1 deletion stripe/_confirmation_token.py
Original file line number Diff line number Diff line change
Expand Up @@ -1338,6 +1338,12 @@ class Swish(StripeObject):
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 @@ -1545,13 +1551,15 @@ class Zip(StripeObject):
"sofort",
"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 @@ -1606,6 +1614,7 @@ class Zip(StripeObject):
"sofort": Sofort,
"swish": Swish,
"twint": Twint,
"upi": Upi,
"us_bank_account": UsBankAccount,
"wechat_pay": WechatPay,
"zip": Zip,
Expand Down Expand Up @@ -1663,7 +1672,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 @@ -79,7 +79,7 @@ class CurrencyOptions(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
6 changes: 3 additions & 3 deletions 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 Expand Up @@ -633,7 +633,7 @@ def void_credit_note( # pyright: ignore[reportGeneralTypeIssues]
self._request(
"post",
"/v1/credit_notes/{id}/void".format(
id=sanitize_id(self.get("id"))
id=sanitize_id(self._data.get("id"))
),
params=params,
),
Expand Down Expand Up @@ -686,7 +686,7 @@ async def void_credit_note_async( # pyright: ignore[reportGeneralTypeIssues]
await self._request_async(
"post",
"/v1/credit_notes/{id}/void".format(
id=sanitize_id(self.get("id"))
id=sanitize_id(self._data.get("id"))
),
params=params,
),
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 @@ -128,7 +128,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