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 @@
e65e48569f6dfad2d5f1b58018017856520c3ae6
5a12435b3b09ae0579265713bb543b4bd962f424
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/_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
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 @@ -383,6 +383,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
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
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
14 changes: 12 additions & 2 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
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
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 @@ -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
6 changes: 3 additions & 3 deletions stripe/_customer.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ class Location(StripeObject):
invoice_settings: Optional[InvoiceSettings]
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 Expand Up @@ -1469,7 +1469,7 @@ def create_source(

If the card's owner has no default card, then the new card will become the default.
However, if the owner already has a default, then it will not change.
To change the default, you should [update the customer](https://docs.stripe.com/docs/api#update_customer) to have a new default_source.
To change the default, you should [update the customer](https://docs.stripe.com/api/customers/update) to have a new default_source.
"""
return cast(
Union["Account", "BankAccount", "Card", "Source"],
Expand All @@ -1491,7 +1491,7 @@ async def create_source_async(

If the card's owner has no default card, then the new card will become the default.
However, if the owner already has a default, then it will not change.
To change the default, you should [update the customer](https://docs.stripe.com/docs/api#update_customer) to have a new default_source.
To change the default, you should [update the customer](https://docs.stripe.com/api/customers/update) to have a new default_source.
"""
return cast(
Union["Account", "BankAccount", "Card", "Source"],
Expand Down
2 changes: 1 addition & 1 deletion stripe/_customer_balance_transaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class CustomerBalanceTransaction(APIResource["CustomerBalanceTransaction"]):
"""
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/_customer_cash_balance_transaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ class UnappliedFromPayment(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`.
"""
net_amount: int
"""
Expand Down
4 changes: 2 additions & 2 deletions stripe/_customer_payment_source_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def create(

If the card's owner has no default card, then the new card will become the default.
However, if the owner already has a default, then it will not change.
To change the default, you should [update the customer](https://docs.stripe.com/docs/api#update_customer) to have a new default_source.
To change the default, you should [update the customer](https://docs.stripe.com/api/customers/update) to have a new default_source.
"""
return cast(
"Union[Account, BankAccount, Card, Source]",
Expand All @@ -115,7 +115,7 @@ async def create_async(

If the card's owner has no default card, then the new card will become the default.
However, if the owner already has a default, then it will not change.
To change the default, you should [update the customer](https://docs.stripe.com/docs/api#update_customer) to have a new default_source.
To change the default, you should [update the customer](https://docs.stripe.com/api/customers/update) to have a new default_source.
"""
return cast(
"Union[Account, BankAccount, Card, Source]",
Expand Down
2 changes: 1 addition & 1 deletion stripe/_customer_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ class PricingTable(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["customer_session"]
"""
Expand Down
2 changes: 1 addition & 1 deletion stripe/_dispute.py
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ class Paypal(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: Dict[str, str]
"""
Expand Down
2 changes: 1 addition & 1 deletion stripe/_ephemeral_key.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class EphemeralKey(
"""
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["ephemeral_key"]
"""
Expand Down
2 changes: 1 addition & 1 deletion stripe/_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class Request(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["event"]
"""
Expand Down
2 changes: 1 addition & 1 deletion stripe/_file_link.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class FileLink(
"""
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
2 changes: 1 addition & 1 deletion stripe/_funding_instructions.py
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ class BankAddress(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["funding_instructions"]
"""
Expand Down
Loading
Loading