diff --git a/.claude/CLAUDE.md b/.claude/CLAUDE.md
index b65b38505..b9e11f38e 100644
--- a/.claude/CLAUDE.md
+++ b/.claude/CLAUDE.md
@@ -28,7 +28,7 @@
## Conventions
-- Uses `requests` library by default for sync HTTP, `httpx` for async
+- Uses `requests` library by default for sync HTTP, `httpx2` (falling back to `httpx`) for async
- Type hints throughout
- Virtual env managed in `.venv/`; `just` recipes handle setup automatically
- Work is not complete until `just test`, `just lint` and `just typecheck` complete successfully.
diff --git a/.hark/changes/2026-11-19_stripe-openapi_031ed7f8.change.md b/.hark/changes/2026-11-19_stripe-openapi_031ed7f8.change.md
new file mode 100644
index 000000000..19d19b723
--- /dev/null
+++ b/.hark/changes/2026-11-19_stripe-openapi_031ed7f8.change.md
@@ -0,0 +1,30 @@
+---
+title: Update generated code
+pr_url: https://github.com/stripe/stripe-python/pull/1964
+semver_level: major
+is_stripe_api_change: true
+---
+
+* ⚠️ Remove support for resource `v2.billing.Cadence`
+* Add support for `create` and `refill` test helper methods on resource `capital.FinancingOffer`
+* ⚠️ Remove support for `cancel`, `create`, `list`, `modify`, and `retrieve` methods on resource `v2.billing.Cadence`
+* Add support for `export_tax_transactions`, `product_tax_code_selector`, and `tax_threshold_monitoring` on `AccountSession.Component`
+* Add support for `custom` on `CouponCreateParams` and `Coupon`
+* Add support for `type` on `CouponCreateParams` and `CustomerCreateCustomerBalanceTransactionParams`
+* Add support for new value `custom` on enum `Coupon.type`
+* Add support for `applied_to_invoice` on `CustomerCreateCustomerBalanceTransactionParams`
+* Add support for `customer_balance` on `Invoice` and `QuotePreviewInvoice`
+* ⚠️ Change type of `PaymentIntent.NextAction.VerifyWithMicrodeposit.arrival_date` and `SetupIntent.NextAction.VerifyWithMicrodeposit.arrival_date` from `DateTime` to `nullable(DateTime)`
+* Add support for `connect`, `data_export`, `event_destination`, `radar`, and `user_access` on `V2.Iam.ActivityLog.Detail`
+* Add support for new values `app`, `connect`, `data_export`, `event_destination`, `radar`, and `user_access` on enum `V2.Iam.ActivityLog.Detail.type`
+* Add support for new values `apps.install`, `v2.core.event_destination`, and `webhook_endpoint` on enum `V2.Iam.ActivityLog.RelatedObject.type`
+* Add support for new values `app_installed`, `app_uninstalled`, `application_authorized`, `application_created`, `application_deauthorized`, `connect_express_branding_updated`, `connect_oauth_disabled`, `connect_oauth_enabled`, `connect_settings_updated`, `connect_site_link_updated`, `data_export_requested`, `event_destination_added`, `event_destination_removed`, `event_destination_updated`, `payout_schedule_updated`, `radar_adaptive_3ds_disabled`, `radar_dynamic_risk_thresholds_disabled`, `radar_early_fraud_warning_disabled`, `radar_for_setup_intents_disabled`, `radar_fraud_dispute_protection_disabled`, `radar_rule_added`, `radar_rule_disabled`, `radar_rule_enabled`, `radar_rule_removed`, `radar_rule_updated`, and `user_access_started` on enum `V2.Iam.ActivityLog.type`
+* Add support for `apple_pay` on `V2.MoneyManagement.PayoutMethod` and `v2.money_management.OutboundSetupIntentCreateParamsPayoutMethodDatum`
+* Add support for new value `apple_pay` on enums `V2.MoneyManagement.PayoutMethod.type`, `v2.money_management.OutboundSetupIntentCreateParamsPayoutMethodDatum.type`, and `v2.money_management.OutboundSetupIntentModifyParamsPayoutMethodDatum.type`
+* Add support for `network` and `originating_bank_account` on `V2.MoneyManagement.ReceivedDebit.BankTransfer`
+* Add support for `created` on `v2.money_management.ReceivedDebitListParams`
+* Add support for `logs_from` on `v2.iam.ActivityLogListParams`
+* Add support for new values `app`, `connect`, `data_export`, `event_destination`, `radar`, and `user_access` on enum `v2.iam.ActivityLogListParams.action_groups`
+* Add support for new values `app_installed`, `app_uninstalled`, `application_authorized`, `application_created`, `application_deauthorized`, `connect_express_branding_updated`, `connect_oauth_disabled`, `connect_oauth_enabled`, `connect_settings_updated`, `connect_site_link_updated`, `data_export_requested`, `event_destination_added`, `event_destination_removed`, `event_destination_updated`, `payout_schedule_updated`, `radar_adaptive_3ds_disabled`, `radar_dynamic_risk_thresholds_disabled`, `radar_early_fraud_warning_disabled`, `radar_for_setup_intents_disabled`, `radar_fraud_dispute_protection_disabled`, `radar_rule_added`, `radar_rule_disabled`, `radar_rule_enabled`, `radar_rule_removed`, `radar_rule_updated`, and `user_access_started` on enum `v2.iam.ActivityLogListParams.actions`
+* Add support for `severity` on `EventsV2CoreHealthEventGenerationFailureResolvedEvent`
+* Add support for error code `inactive_api_operation_confirmation_required` on `QuotePreviewInvoice.LastFinalizationError`
diff --git a/CODEGEN_VERSION b/CODEGEN_VERSION
index b9979ecd9..06a01d0ea 100644
--- a/CODEGEN_VERSION
+++ b/CODEGEN_VERSION
@@ -1 +1 @@
-65c49b0893d71e8cfe272b2d38cd3307ee1833f2
\ No newline at end of file
+f3581f76eec818aa658fd9635eaf0107d13e3441
\ No newline at end of file
diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION
index 9a21d2dc6..d313855f3 100644
--- a/OPENAPI_VERSION
+++ b/OPENAPI_VERSION
@@ -1 +1 @@
-v2596
\ No newline at end of file
+v2602
\ No newline at end of file
diff --git a/README.md b/README.md
index c40ed3e96..6dd63449e 100644
--- a/README.md
+++ b/README.md
@@ -370,9 +370,12 @@ async for c in await stripe.Customer.list_async().auto_paging_iter():
There is no `.save_async` as `.save` is [deprecated since stripe-python v5](https://github.com/stripe/stripe-python/wiki/Migration-guide-for-v5#deprecated). Please migrate to `.modify_async`.
The default HTTP client uses `requests` for making synchronous requests but
-`httpx` for making async requests. If you're migrating to async, we recommend
-you to explicitly initialize your own http client and pass it to StripeClient
-or set it as the global default.
+`httpx2` for making async requests, falling back to `httpx` if `httpx2` isn't
+installed (and to `aiohttp` if neither is). We recommend `pip install httpx2`
+for async use, since `httpx` is no longer actively maintained. `httpx` support
+is deprecated and will be removed in the next major version of stripe-python.
+If you're migrating to async, we recommend you to explicitly initialize your own
+http client and pass it to StripeClient or set it as the global default.
If you don't already have a dependency on an async-compatible HTTP library, `pip install stripe[async]` will install one for you (new in `v13.0.1`).
@@ -382,7 +385,7 @@ If you don't already have a dependency on an async-compatible HTTP library, `pip
# make sure you don't unintentionally make a synchronous request.
my_http_client = stripe.HTTPXClient()
-# If you want to use httpx to make sync requests, you can disable this
+# If you want to use httpx2 to make sync requests, you can disable this
# behavior.
my_http_client = stripe.HTTPXClient(allow_sync_methods=True)
diff --git a/deps/test-requirements.txt b/deps/test-requirements.txt
index e8ab486b2..24fffcb55 100644
--- a/deps/test-requirements.txt
+++ b/deps/test-requirements.txt
@@ -1,17 +1,14 @@
# packages needed to run unit tests (including extra supported http libraries)
-# version requirements: all supported versions (currently 3.6-3.12)
+# version requirements: all supported versions (currently 3.9-3.14)
-# This is the last version of httpx compatible with Python 3.6
-httpx == 0.22.0; python_version == "3.6"
-httpx >= 0.24.1; python_version == "3.7"
-httpx >= 0.27.0; python_version >= "3.8"
-aiohttp == 3.8.6; python_version <= "3.7"
-aiohttp == 3.10.11; python_version == "3.8"
-aiohttp == 3.12.15; python_version >= "3.9"
-anyio[trio] == 3.6.2; python_version < "3.13"
-anyio[trio] == 4.11.0; python_version >= "3.13"
+httpx2 >= 2.0.0
+# fallback when httpx2 isn't installed
+# TODO: (DEVSDK-3427) remove httpx in the next major version
+httpx >= 0.27.0
+aiohttp == 3.12.15
+# httpx2 requires anyio >= 4.10 since 2.9.0
+anyio[trio] == 4.10.0
pytest-mock >= 2.0.0
-mock >= 4.0; python_version < "3.8"
pytest-xdist >= 1.31.0
pytest >= 6.0.0,<9.0.0
diff --git a/pyproject.toml b/pyproject.toml
index 9730e8520..3894e4de9 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -15,12 +15,12 @@ classifiers = [
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
- "Programming Language :: Python :: 3.7",
- "Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
+ "Programming Language :: Python :: 3.13",
+ "Programming Language :: Python :: 3.14",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Software Development :: Libraries :: Python Modules",
diff --git a/stripe/_account_session.py b/stripe/_account_session.py
index 5ac8d7540..9ac51a545 100644
--- a/stripe/_account_session.py
+++ b/stripe/_account_session.py
@@ -176,6 +176,17 @@ class Features(StripeObject):
features: Features
_inner_class_types = {"features": Features}
+ class ExportTaxTransactions(StripeObject):
+ class Features(StripeObject):
+ pass
+
+ enabled: bool
+ """
+ Whether the embedded component is enabled.
+ """
+ features: Features
+ _inner_class_types = {"features": Features}
+
class FinancialAccount(StripeObject):
class Features(StripeObject):
disable_stripe_user_authentication: bool
@@ -475,6 +486,17 @@ class Features(StripeObject):
features: Features
_inner_class_types = {"features": Features}
+ class ProductTaxCodeSelector(StripeObject):
+ class Features(StripeObject):
+ pass
+
+ enabled: bool
+ """
+ Whether the embedded component is enabled.
+ """
+ features: Features
+ _inner_class_types = {"features": Features}
+
class ReportingChart(StripeObject):
class Features(StripeObject):
pass
@@ -508,6 +530,17 @@ class Features(StripeObject):
features: Features
_inner_class_types = {"features": Features}
+ class TaxThresholdMonitoring(StripeObject):
+ class Features(StripeObject):
+ pass
+
+ enabled: bool
+ """
+ Whether the embedded component is enabled.
+ """
+ features: Features
+ _inner_class_types = {"features": Features}
+
class TerminalHardwareOrders(StripeObject):
class Features(StripeObject):
pass
@@ -539,6 +572,7 @@ class Features(StripeObject):
capital_financing_promotion: Optional[CapitalFinancingPromotion]
disputes_list: DisputesList
documents: Documents
+ export_tax_transactions: Optional[ExportTaxTransactions]
financial_account: FinancialAccount
financial_account_transactions: FinancialAccountTransactions
instant_payouts_promotion: InstantPayoutsPromotion
@@ -553,9 +587,11 @@ class Features(StripeObject):
payout_reconciliation_report: PayoutReconciliationReport
payouts: Payouts
payouts_list: PayoutsList
+ product_tax_code_selector: Optional[ProductTaxCodeSelector]
reporting_chart: ReportingChart
tax_registrations: TaxRegistrations
tax_settings: TaxSettings
+ tax_threshold_monitoring: Optional[TaxThresholdMonitoring]
terminal_hardware_orders: TerminalHardwareOrders
terminal_hardware_shop: TerminalHardwareShop
_inner_class_types = {
@@ -568,6 +604,7 @@ class Features(StripeObject):
"capital_financing_promotion": CapitalFinancingPromotion,
"disputes_list": DisputesList,
"documents": Documents,
+ "export_tax_transactions": ExportTaxTransactions,
"financial_account": FinancialAccount,
"financial_account_transactions": FinancialAccountTransactions,
"instant_payouts_promotion": InstantPayoutsPromotion,
@@ -582,9 +619,11 @@ class Features(StripeObject):
"payout_reconciliation_report": PayoutReconciliationReport,
"payouts": Payouts,
"payouts_list": PayoutsList,
+ "product_tax_code_selector": ProductTaxCodeSelector,
"reporting_chart": ReportingChart,
"tax_registrations": TaxRegistrations,
"tax_settings": TaxSettings,
+ "tax_threshold_monitoring": TaxThresholdMonitoring,
"terminal_hardware_orders": TerminalHardwareOrders,
"terminal_hardware_shop": TerminalHardwareShop,
}
diff --git a/stripe/_api_version.py b/stripe/_api_version.py
index 09cb8e4ec..57c285085 100644
--- a/stripe/_api_version.py
+++ b/stripe/_api_version.py
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# File generated from our OpenAPI spec
class _ApiVersion:
- CURRENT = "2026-10-28.preview"
+ CURRENT = "2026-11-18.preview"
CURRENT_MAJOR = ""
diff --git a/stripe/_balance_transaction.py b/stripe/_balance_transaction.py
index 40be50da9..d6387e004 100644
--- a/stripe/_balance_transaction.py
+++ b/stripe/_balance_transaction.py
@@ -102,7 +102,7 @@ class FeeDetail(StripeObject):
"""
exchange_rate: Optional[float]
"""
- If applicable, this transaction uses an exchange rate. If money converts from currency A to currency B, then the `amount` in currency A, multiplied by the `exchange_rate`, equals the `amount` in currency B. For example, if you charge a customer 10.00 EUR, the PaymentIntent's `amount` is `1000` and `currency` is `eur`. If this converts to 12.34 USD in your Stripe account, the BalanceTransaction's `amount` is `1234`, its `currency` is `usd`, and the `exchange_rate` is `1.234`.
+ The exchange rate used for this transaction, if applicable. Multiplying the source `amount` by the `exchange_rate` gives the destination `amount`, both in their currencies' smallest units. For example, `1000` EUR cents converts to `1234` USD cents at `1.234`. For a zero-decimal currency such as JPY, `1000` JPY converts to `640` USD cents (6.40 USD) at `0.64`, equivalent to `0.0064` USD per JPY. For JPY to USD, the API multiplier is 100 times the whole-unit rate because JPY amounts use yen and USD amounts use cents.
"""
fee: int
"""
diff --git a/stripe/_charge.py b/stripe/_charge.py
index f8f79ea83..327392693 100644
--- a/stripe/_charge.py
+++ b/stripe/_charge.py
@@ -495,11 +495,11 @@ class Card(StripeObject):
class Checks(StripeObject):
address_line1_check: Optional[str]
"""
- If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
+ If an address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
"""
address_postal_code_check: Optional[str]
"""
- If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
+ If an address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
"""
cvc_check: Optional[str]
"""
@@ -671,10 +671,222 @@ class GooglePay(StripeObject):
pass
class Link(StripeObject):
+ class FundingSource(StripeObject):
+ class Card(StripeObject):
+ class Checks(StripeObject):
+ address_line1_check: Optional[str]
+ """
+ If an address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
+ """
+ address_postal_code_check: Optional[str]
+ """
+ If an address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
+ """
+ cvc_check: Optional[str]
+ """
+ If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
+ """
+
+ class NetworkToken(StripeObject):
+ used: bool
+ """
+ Indicates if Stripe used a network token, either user provided or Stripe managed when processing the transaction.
+ """
+
+ class ThreeDSecure(StripeObject):
+ authentication_flow: Optional[
+ Union[
+ Literal["challenge", "frictionless"],
+ str,
+ ]
+ ]
+ """
+ For authenticated transactions: how the customer was authenticated by
+ the issuing bank.
+ """
+ electronic_commerce_indicator: Optional[
+ Union[
+ Literal["01", "02", "05", "06", "07"],
+ str,
+ ]
+ ]
+ """
+ The Electronic Commerce Indicator (ECI). A protocol-level field
+ indicating what degree of authentication was performed.
+ """
+ exemption_indicator: Optional[
+ Union[Literal["low_risk", "none"], str]
+ ]
+ """
+ The exemption requested via 3DS and accepted by the issuer at authentication time.
+ """
+ exemption_indicator_applied: Optional[bool]
+ """
+ Whether Stripe requested the value of `exemption_indicator` in the transaction. This will depend on
+ the outcome of Stripe's internal risk assessment.
+ """
+ result: Optional[
+ Union[
+ Literal[
+ "attempt_acknowledged",
+ "authenticated",
+ "data_share_only",
+ "exempted",
+ "failed",
+ "not_supported",
+ "processing_error",
+ ],
+ str,
+ ]
+ ]
+ """
+ Indicates the outcome of 3D Secure authentication.
+ """
+ result_reason: Optional[
+ Union[
+ Literal[
+ "abandoned",
+ "bypassed",
+ "canceled",
+ "card_not_enrolled",
+ "network_not_supported",
+ "protocol_error",
+ "rejected",
+ ],
+ str,
+ ]
+ ]
+ """
+ Additional information about why 3D Secure succeeded or failed based
+ on the `result`.
+ """
+ transaction_id: Optional[str]
+ """
+ The 3D Secure 1 XID or 3D Secure 2 Directory Server Transaction ID
+ (dsTransId) for this payment.
+ """
+ version: Optional[
+ Union[
+ Literal[
+ "1.0.2",
+ "2.1.0",
+ "2.2.0",
+ "2.3.0",
+ "2.3.1",
+ ],
+ str,
+ ]
+ ]
+ """
+ The version of 3D Secure that was used.
+ """
+
+ amount_authorized: Optional[int]
+ """
+ The authorized amount.
+ """
+ authorization_code: Optional[str]
+ """
+ Authorization code on the charge.
+ """
+ brand: Optional[str]
+ """
+ Card brand. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa` or `unknown`.
+ """
+ checks: Optional[Checks]
+ """
+ Check results by Card networks on Card address and CVC at time of payment.
+ """
+ country: Optional[str]
+ """
+ Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected.
+ """
+ description: Optional[str]
+ """
+ A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.)
+ """
+ electronic_commerce_indicator: Optional[str]
+ """
+ The Electronic Commerce Indicator (ECI) returned by the card network in the authorization response. Indicates the level of authentication used. Only populated for Visa and Mastercard transactions. This is the network's final ECI and can differ from the request value. An authenticated ECI alone doesn't determine liability shift.
+ """
+ exp_month: int
+ """
+ Two-digit number representing the card's expiration month.
+ """
+ exp_year: int
+ """
+ Four-digit number representing the card's expiration year.
+ """
+ fingerprint: Optional[str]
+ """
+ Uniquely identifies this particular card number. You can use this attribute to check whether two customers who've signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number.
+
+ *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.*
+ """
+ funding: Optional[str]
+ """
+ Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.
+ """
+ iin: Optional[str]
+ """
+ Issuer identification number of the card. (For internal use only and not typically available in standard API requests.)
+ """
+ issuer: Optional[str]
+ """
+ The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.)
+ """
+ last4: Optional[str]
+ """
+ The last four digits of the card.
+ """
+ network: Optional[str]
+ """
+ Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
+ """
+ network_token: Optional[NetworkToken]
+ """
+ If this card has network token credentials, this contains the details of the network token credentials.
+ """
+ network_transaction_id: Optional[str]
+ """
+ This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. This value will be present if it is returned by the financial network in the authorization response, and null otherwise.
+ """
+ regulated_status: Optional[
+ Union[Literal["regulated", "unregulated"], str]
+ ]
+ """
+ Status of a card based on the card issuer.
+ """
+ three_d_secure: Optional[ThreeDSecure]
+ """
+ Populated if this transaction used 3D Secure authentication.
+ """
+ transaction_link_id: Optional[str]
+ """
+ Transaction Link ID (TLID) is a unique identifier for a transaction. This is used by some card networks, such as Mastercard, for transaction linking, in addition to Network Transaction IDs. This value will be present if it is returned by the financial network in the authorization response, and null otherwise.
+ """
+ _inner_class_types = {
+ "checks": Checks,
+ "network_token": NetworkToken,
+ "three_d_secure": ThreeDSecure,
+ }
+
+ card: Card
+ type: Union[Literal["card"], str]
+ """
+ The type of funding source used for this Link payment.
+ """
+ _inner_class_types = {"card": Card}
+
funding_source_group: Optional[str]
"""
The [funding source group code](https://docs.stripe.com/payments/link/link-payment-methods) applied to this Link payment at confirmation time.
"""
+ funding_sources: Optional[List[FundingSource]]
+ """
+ Details about the funding sources used for this Link payment.
+ """
+ _inner_class_types = {"funding_sources": FundingSource}
class Masterpass(StripeObject):
class BillingAddress(StripeObject):
@@ -1216,7 +1428,13 @@ class Crypto(StripeObject):
network: Optional[
Union[
Literal[
- "base", "ethereum", "polygon", "solana", "sui", "tempo"
+ "base",
+ "ethereum",
+ "polygon",
+ "solana",
+ "sui",
+ "tempo",
+ "tron",
],
str,
]
@@ -1728,6 +1946,203 @@ class KrCard(StripeObject):
"""
class Link(StripeObject):
+ class FundingSource(StripeObject):
+ class Card(StripeObject):
+ class Checks(StripeObject):
+ address_line1_check: Optional[str]
+ """
+ If an address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
+ """
+ address_postal_code_check: Optional[str]
+ """
+ If an address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
+ """
+ cvc_check: Optional[str]
+ """
+ If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
+ """
+
+ class NetworkToken(StripeObject):
+ used: bool
+ """
+ Indicates if Stripe used a network token, either user provided or Stripe managed when processing the transaction.
+ """
+
+ class ThreeDSecure(StripeObject):
+ authentication_flow: Optional[
+ Union[Literal["challenge", "frictionless"], str]
+ ]
+ """
+ For authenticated transactions: how the customer was authenticated by
+ the issuing bank.
+ """
+ electronic_commerce_indicator: Optional[
+ Union[Literal["01", "02", "05", "06", "07"], str]
+ ]
+ """
+ The Electronic Commerce Indicator (ECI). A protocol-level field
+ indicating what degree of authentication was performed.
+ """
+ exemption_indicator: Optional[
+ Union[Literal["low_risk", "none"], str]
+ ]
+ """
+ The exemption requested via 3DS and accepted by the issuer at authentication time.
+ """
+ exemption_indicator_applied: Optional[bool]
+ """
+ Whether Stripe requested the value of `exemption_indicator` in the transaction. This will depend on
+ the outcome of Stripe's internal risk assessment.
+ """
+ result: Optional[
+ Union[
+ Literal[
+ "attempt_acknowledged",
+ "authenticated",
+ "data_share_only",
+ "exempted",
+ "failed",
+ "not_supported",
+ "processing_error",
+ ],
+ str,
+ ]
+ ]
+ """
+ Indicates the outcome of 3D Secure authentication.
+ """
+ result_reason: Optional[
+ Union[
+ Literal[
+ "abandoned",
+ "bypassed",
+ "canceled",
+ "card_not_enrolled",
+ "network_not_supported",
+ "protocol_error",
+ "rejected",
+ ],
+ str,
+ ]
+ ]
+ """
+ Additional information about why 3D Secure succeeded or failed based
+ on the `result`.
+ """
+ transaction_id: Optional[str]
+ """
+ The 3D Secure 1 XID or 3D Secure 2 Directory Server Transaction ID
+ (dsTransId) for this payment.
+ """
+ version: Optional[
+ Union[
+ Literal[
+ "1.0.2", "2.1.0", "2.2.0", "2.3.0", "2.3.1"
+ ],
+ str,
+ ]
+ ]
+ """
+ The version of 3D Secure that was used.
+ """
+
+ amount_authorized: Optional[int]
+ """
+ The authorized amount.
+ """
+ authorization_code: Optional[str]
+ """
+ Authorization code on the charge.
+ """
+ brand: Optional[str]
+ """
+ Card brand. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa` or `unknown`.
+ """
+ checks: Optional[Checks]
+ """
+ Check results by Card networks on Card address and CVC at time of payment.
+ """
+ country: Optional[str]
+ """
+ Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected.
+ """
+ description: Optional[str]
+ """
+ A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.)
+ """
+ electronic_commerce_indicator: Optional[str]
+ """
+ The Electronic Commerce Indicator (ECI) returned by the card network in the authorization response. Indicates the level of authentication used. Only populated for Visa and Mastercard transactions. This is the network's final ECI and can differ from the request value. An authenticated ECI alone doesn't determine liability shift.
+ """
+ exp_month: int
+ """
+ Two-digit number representing the card's expiration month.
+ """
+ exp_year: int
+ """
+ Four-digit number representing the card's expiration year.
+ """
+ fingerprint: Optional[str]
+ """
+ Uniquely identifies this particular card number. You can use this attribute to check whether two customers who've signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number.
+
+ *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.*
+ """
+ funding: Optional[str]
+ """
+ Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.
+ """
+ iin: Optional[str]
+ """
+ Issuer identification number of the card. (For internal use only and not typically available in standard API requests.)
+ """
+ issuer: Optional[str]
+ """
+ The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.)
+ """
+ last4: Optional[str]
+ """
+ The last four digits of the card.
+ """
+ network: Optional[str]
+ """
+ Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
+ """
+ network_token: Optional[NetworkToken]
+ """
+ If this card has network token credentials, this contains the details of the network token credentials.
+ """
+ network_transaction_id: Optional[str]
+ """
+ This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. This value will be present if it is returned by the financial network in the authorization response, and null otherwise.
+ """
+ regulated_status: Optional[
+ Union[Literal["regulated", "unregulated"], str]
+ ]
+ """
+ Status of a card based on the card issuer.
+ """
+ three_d_secure: Optional[ThreeDSecure]
+ """
+ Populated if this transaction used 3D Secure authentication.
+ """
+ transaction_link_id: Optional[str]
+ """
+ Transaction Link ID (TLID) is a unique identifier for a transaction. This is used by some card networks, such as Mastercard, for transaction linking, in addition to Network Transaction IDs. This value will be present if it is returned by the financial network in the authorization response, and null otherwise.
+ """
+ _inner_class_types = {
+ "checks": Checks,
+ "network_token": NetworkToken,
+ "three_d_secure": ThreeDSecure,
+ }
+
+ card: Card
+ type: Union[Literal["card"], str]
+ """
+ The type of funding source used for this Link payment.
+ """
+ _inner_class_types = {"card": Card}
+
country: Optional[str]
"""
Two-letter ISO code representing the funding source country beneath the Link payment.
@@ -1737,6 +2152,11 @@ class Link(StripeObject):
"""
The [funding source group code](https://docs.stripe.com/payments/link/link-payment-methods) applied to this Link payment at confirmation time.
"""
+ funding_sources: Optional[List[FundingSource]]
+ """
+ Details about the funding sources used for this Link payment.
+ """
+ _inner_class_types = {"funding_sources": FundingSource}
class MbWay(StripeObject):
pass
@@ -2028,7 +2448,10 @@ class VerifiedAddress(StripeObject):
}
class Paypay(StripeObject):
- pass
+ fingerprint: Optional[str]
+ """
+ Uniquely identifies this particular PayPay account. You can use this attribute to check whether two PayPay accounts are the same.
+ """
class Payto(StripeObject):
bsb_number: Optional[str]
diff --git a/stripe/_confirmation_token.py b/stripe/_confirmation_token.py
index 9f2503ecb..149f50f5c 100644
--- a/stripe/_confirmation_token.py
+++ b/stripe/_confirmation_token.py
@@ -246,11 +246,11 @@ class Card(StripeObject):
class Checks(StripeObject):
address_line1_check: Optional[str]
"""
- If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
+ If an address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
"""
address_postal_code_check: Optional[str]
"""
- If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
+ If an address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
"""
cvc_check: Optional[str]
"""
diff --git a/stripe/_coupon.py b/stripe/_coupon.py
index b7b00ff47..bdfc4a073 100644
--- a/stripe/_coupon.py
+++ b/stripe/_coupon.py
@@ -25,9 +25,12 @@ class Coupon(
UpdateableAPIResource["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://docs.stripe.com/api#subscriptions), [invoices](https://docs.stripe.com/api#invoices),
- [checkout sessions](https://docs.stripe.com/api/checkout/sessions), [quotes](https://docs.stripe.com/api#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).
+ A coupon defines a fixed or custom discount. Fixed discounts take a percentage or amount off, while
+ [custom coupons](https://docs.stripe.com/billing/subscriptions/script-coupons) use scripts to calculate discounts dynamically for subscriptions and invoices.
+ You can apply coupons to customers' [subscriptions](https://docs.stripe.com/api#subscriptions), [invoices](https://docs.stripe.com/api#invoices),
+ [Checkout Sessions](https://docs.stripe.com/api/checkout/sessions), [quotes](https://docs.stripe.com/api#quotes), and other supported billing objects.
+ The optional [applies_to.products](https://docs.stripe.com/api/coupons/object#coupon_object-applies_to-products) property limits which product line items are eligible for the discount, independently of where you apply the coupon.
+ Coupons don't 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"
@@ -44,6 +47,24 @@ class CurrencyOptions(StripeObject):
Amount (in the `currency` specified) that will be taken off the subtotal of any invoices for this customer.
"""
+ class Custom(StripeObject):
+ class Extension(StripeObject):
+ id: str
+ """
+ The Extension Prototype ID.
+ """
+ version: str
+ """
+ The semantic version of the extension.
+ """
+
+ configuration: UntypedStripeObject[Any]
+ """
+ The configuration supplied to the extension.
+ """
+ extension: Extension
+ _inner_class_types = {"extension": Extension}
+
class Script(StripeObject):
configuration: UntypedStripeObject[Any]
"""
@@ -75,6 +96,7 @@ class Script(StripeObject):
"""
Coupons defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
"""
+ custom: Optional[Custom]
deleted: Optional[Literal[True]]
"""
Always true for a deleted object
@@ -127,7 +149,9 @@ class Script(StripeObject):
"""
Number of times this coupon has been applied to a customer.
"""
- type: Optional[Union[Literal["amount_off", "percent_off", "script"], str]]
+ type: Optional[
+ Union[Literal["amount_off", "custom", "percent_off", "script"], str]
+ ]
"""
The type of coupon logic used to calculate the discount.
"""
@@ -363,5 +387,6 @@ async def retrieve_async(
_inner_class_types = {
"applies_to": AppliesTo,
"currency_options": CurrencyOptions,
+ "custom": Custom,
"script": Script,
}
diff --git a/stripe/_dispute.py b/stripe/_dispute.py
index a9be074f8..5f4b0fd06 100644
--- a/stripe/_dispute.py
+++ b/stripe/_dispute.py
@@ -492,7 +492,7 @@ class SmartDisputes(StripeObject):
"""
balance_transactions: List["BalanceTransaction"]
"""
- List of zero, one, or two balance transactions that show funds withdrawn and reinstated to your Stripe account as a result of this dispute.
+ List of balance transactions that show funds withdrawn and reinstated to your Stripe account as a result of this dispute.
"""
charge: ExpandableField["Charge"]
"""
diff --git a/stripe/_event.py b/stripe/_event.py
index cead2cae2..a6dd8bbb2 100644
--- a/stripe/_event.py
+++ b/stripe/_event.py
@@ -131,7 +131,7 @@ class Request(StripeObject):
"""
pending_webhooks: int
"""
- Number of webhooks that haven't been successfully delivered (for example, to return a 20x response) to the URLs you specify.
+ Number of webhooks that haven't been successfully delivered (for example, to return a 20x response). This count can include deliveries to endpoints that belong to Connect platforms or apps with access to your account. These endpoints don't appear when you list your account's webhook endpoints or event destinations. To see the delivery status for each endpoint, view the event in [Workbench](https://docs.stripe.com/workbench/overview#events).
"""
reason: Optional[Reason]
"""
@@ -470,7 +470,7 @@ class Request(StripeObject):
@classmethod
def list(cls, **params: Unpack["EventListParams"]) -> ListObject["Event"]:
"""
- List events, going back up to 30 days. Each event data is rendered according to Stripe API version at its creation time, specified in [event object](https://docs.stripe.com/api/events/object) api_version attribute (not according to your current Stripe API version or Stripe-Version header).
+ List events, going back up to 30 days. Each event data is rendered according to Stripe API version at its creation time, specified in [event object api_version attribute (not according to your current Stripe API version or Stripe-Version header). The list includes only events for the account that makes the request. A platform's list doesn't include events from its connected accounts. To list a connected account's events, make the request as the connected account](https://docs.stripe.com/api/events/object) using the Stripe-Account header.
"""
result = cls._static_request(
"get",
@@ -490,7 +490,7 @@ async def list_async(
cls, **params: Unpack["EventListParams"]
) -> ListObject["Event"]:
"""
- List events, going back up to 30 days. Each event data is rendered according to Stripe API version at its creation time, specified in [event object](https://docs.stripe.com/api/events/object) api_version attribute (not according to your current Stripe API version or Stripe-Version header).
+ List events, going back up to 30 days. Each event data is rendered according to Stripe API version at its creation time, specified in [event object api_version attribute (not according to your current Stripe API version or Stripe-Version header). The list includes only events for the account that makes the request. A platform's list doesn't include events from its connected accounts. To list a connected account's events, make the request as the connected account](https://docs.stripe.com/api/events/object) using the Stripe-Account header.
"""
result = await cls._static_request_async(
"get",
diff --git a/stripe/_event_notification_handler.py b/stripe/_event_notification_handler.py
index b31fb7528..a0c35748a 100644
--- a/stripe/_event_notification_handler.py
+++ b/stripe/_event_notification_handler.py
@@ -966,6 +966,21 @@
from stripe.events._v2_core_batch_job_validation_failed_event import (
V2CoreBatchJobValidationFailedEventNotification,
)
+ from stripe.events._v2_core_claimable_sandbox_claimed_event import (
+ V2CoreClaimableSandboxClaimedEventNotification,
+ )
+ from stripe.events._v2_core_claimable_sandbox_created_event import (
+ V2CoreClaimableSandboxCreatedEventNotification,
+ )
+ from stripe.events._v2_core_claimable_sandbox_expired_event import (
+ V2CoreClaimableSandboxExpiredEventNotification,
+ )
+ from stripe.events._v2_core_claimable_sandbox_expiring_event import (
+ V2CoreClaimableSandboxExpiringEventNotification,
+ )
+ from stripe.events._v2_core_claimable_sandbox_updated_event import (
+ V2CoreClaimableSandboxUpdatedEventNotification,
+ )
from stripe.events._v2_core_event_destination_ping_event import (
V2CoreEventDestinationPingEventNotification,
)
@@ -5332,6 +5347,71 @@ def on_v2_core_batch_job_validation_failed(
)
return func
+ def on_v2_core_claimable_sandbox_claimed(
+ self,
+ func: "Callable[[V2CoreClaimableSandboxClaimedEventNotification, StripeClient], CallbackReturn]",
+ ):
+ """
+ Registers a callback for the `V2CoreClaimableSandboxClaimedEvent` (`v2.core.claimable_sandbox.claimed`) event notification.
+ """
+ self._register(
+ "v2.core.claimable_sandbox.claimed",
+ func,
+ )
+ return func
+
+ def on_v2_core_claimable_sandbox_created(
+ self,
+ func: "Callable[[V2CoreClaimableSandboxCreatedEventNotification, StripeClient], CallbackReturn]",
+ ):
+ """
+ Registers a callback for the `V2CoreClaimableSandboxCreatedEvent` (`v2.core.claimable_sandbox.created`) event notification.
+ """
+ self._register(
+ "v2.core.claimable_sandbox.created",
+ func,
+ )
+ return func
+
+ def on_v2_core_claimable_sandbox_expired(
+ self,
+ func: "Callable[[V2CoreClaimableSandboxExpiredEventNotification, StripeClient], CallbackReturn]",
+ ):
+ """
+ Registers a callback for the `V2CoreClaimableSandboxExpiredEvent` (`v2.core.claimable_sandbox.expired`) event notification.
+ """
+ self._register(
+ "v2.core.claimable_sandbox.expired",
+ func,
+ )
+ return func
+
+ def on_v2_core_claimable_sandbox_expiring(
+ self,
+ func: "Callable[[V2CoreClaimableSandboxExpiringEventNotification, StripeClient], CallbackReturn]",
+ ):
+ """
+ Registers a callback for the `V2CoreClaimableSandboxExpiringEvent` (`v2.core.claimable_sandbox.expiring`) event notification.
+ """
+ self._register(
+ "v2.core.claimable_sandbox.expiring",
+ func,
+ )
+ return func
+
+ def on_v2_core_claimable_sandbox_updated(
+ self,
+ func: "Callable[[V2CoreClaimableSandboxUpdatedEventNotification, StripeClient], CallbackReturn]",
+ ):
+ """
+ Registers a callback for the `V2CoreClaimableSandboxUpdatedEvent` (`v2.core.claimable_sandbox.updated`) event notification.
+ """
+ self._register(
+ "v2.core.claimable_sandbox.updated",
+ func,
+ )
+ return func
+
def on_v2_core_event_destination_ping(
self,
func: "Callable[[V2CoreEventDestinationPingEventNotification, StripeClient], CallbackReturn]",
diff --git a/stripe/_event_service.py b/stripe/_event_service.py
index 2ea67cd99..d83997cc1 100644
--- a/stripe/_event_service.py
+++ b/stripe/_event_service.py
@@ -20,7 +20,7 @@ def list(
options: Optional["RequestOptions"] = None,
) -> "ListObject[Event]":
"""
- List events, going back up to 30 days. Each event data is rendered according to Stripe API version at its creation time, specified in [event object](https://docs.stripe.com/api/events/object) api_version attribute (not according to your current Stripe API version or Stripe-Version header).
+ List events, going back up to 30 days. Each event data is rendered according to Stripe API version at its creation time, specified in [event object api_version attribute (not according to your current Stripe API version or Stripe-Version header). The list includes only events for the account that makes the request. A platform's list doesn't include events from its connected accounts. To list a connected account's events, make the request as the connected account](https://docs.stripe.com/api/events/object) using the Stripe-Account header.
"""
return cast(
"ListObject[Event]",
@@ -39,7 +39,7 @@ async def list_async(
options: Optional["RequestOptions"] = None,
) -> "ListObject[Event]":
"""
- List events, going back up to 30 days. Each event data is rendered according to Stripe API version at its creation time, specified in [event object](https://docs.stripe.com/api/events/object) api_version attribute (not according to your current Stripe API version or Stripe-Version header).
+ List events, going back up to 30 days. Each event data is rendered according to Stripe API version at its creation time, specified in [event object api_version attribute (not according to your current Stripe API version or Stripe-Version header). The list includes only events for the account that makes the request. A platform's list doesn't include events from its connected accounts. To list a connected account's events, make the request as the connected account](https://docs.stripe.com/api/events/object) using the Stripe-Account header.
"""
return cast(
"ListObject[Event]",
diff --git a/stripe/_fx_quote.py b/stripe/_fx_quote.py
index 82a909615..e06a3d2f1 100644
--- a/stripe/_fx_quote.py
+++ b/stripe/_fx_quote.py
@@ -91,8 +91,6 @@ class Transfer(StripeObject):
type: Union[Literal["payment", "transfer"], str]
"""
The transaction type for which the FX Quote will be used.
-
- Can be 'payment' or 'transfer'.
"""
_inner_class_types = {"payment": Payment, "transfer": Transfer}
diff --git a/stripe/_http_client.py b/stripe/_http_client.py
index 51740e156..75f8d35bd 100644
--- a/stripe/_http_client.py
+++ b/stripe/_http_client.py
@@ -48,8 +48,10 @@
pass
try:
- from httpx import Timeout as HTTPXTimeout
- from httpx import Client as HTTPXClientType
+ from httpx2 import Timeout as HTTPXTimeout
+ from httpx2 import Client as HTTPXClientType
+ from httpx2 import AsyncBaseTransport as HTTPXAsyncTransport
+ from httpx2 import BaseTransport as HTTPXSyncTransport
except ImportError:
pass
@@ -858,12 +860,17 @@ def __init__(
proxy: Optional[HTTPClient._Proxy] = None,
async_fallback_client: Optional[HTTPClient] = None,
_lib=None, # used for internal unit testing
+ *,
+ timeout: int = 80,
+ connect_timeout: int = 30,
):
super(PycurlClient, self).__init__(
verify_ssl_certs=verify_ssl_certs,
proxy=proxy,
async_fallback_client=async_fallback_client,
)
+ self._timeout = timeout
+ self._connect_timeout = connect_timeout
if _lib is None:
import pycurl # pyright: ignore[reportMissingModuleSource]
@@ -985,8 +992,8 @@ def _request_internal(
curl.setopt(self.pycurl.WRITEFUNCTION, b.write)
curl.setopt(self.pycurl.HEADERFUNCTION, rheaders.write)
curl.setopt(self.pycurl.NOSIGNAL, 1)
- curl.setopt(self.pycurl.CONNECTTIMEOUT, 30)
- curl.setopt(self.pycurl.TIMEOUT, 80)
+ curl.setopt(self.pycurl.CONNECTTIMEOUT, self._connect_timeout)
+ curl.setopt(self.pycurl.TIMEOUT, self._timeout)
_assert_no_header_injection(headers)
curl.setopt(
self.pycurl.HTTPHEADER,
@@ -1188,6 +1195,67 @@ def close(self):
pass
+def _get_httpx_async_mounts(
+ httpx: Any,
+ proxy: Optional[HTTPClient._Proxy],
+ verify: Union[ssl.SSLContext, bool],
+) -> Optional[Dict[str, "HTTPXAsyncTransport"]]:
+ """
+ Returns the `mounts` option that routes an `httpx.AsyncClient` (or the
+ `httpx2` equivalent) through `proxy`, or `None` when there's no proxy.
+
+ httpx only accepts proxies at the client level, and needs a transport
+ mounted per URL scheme to use a different proxy for each one.
+ """
+ if not proxy:
+ return None
+
+ return {
+ f"{scheme}://": httpx.AsyncHTTPTransport(
+ proxy=proxy_url, verify=verify
+ )
+ for scheme, proxy_url in proxy.items()
+ if proxy_url
+ }
+
+
+def _get_httpx_sync_mounts(
+ httpx: Any,
+ proxy: Optional[HTTPClient._Proxy],
+ verify: Union[ssl.SSLContext, bool],
+) -> Optional[Dict[str, "HTTPXSyncTransport"]]:
+ """
+ The sync `Client` counterpart of `_get_httpx_async_mounts`, since sync
+ and async clients can't share transports.
+ """
+ if not proxy:
+ return None
+
+ return {
+ f"{scheme}://": httpx.HTTPTransport(proxy=proxy_url, verify=verify)
+ for scheme, proxy_url in proxy.items()
+ if proxy_url
+ }
+
+
+# TODO: (DEVSDK-3427) No longer necessary in the next major version.
+def _coerce_httpx_timeout(httpx_lib: Any, timeout: Any) -> Any:
+ """
+ `httpx` and `httpx2` each define their own `Timeout` class and neither
+ recognizes the other's, so a `Timeout` from the library that isn't in use
+ is rebuilt as one from the library that is.
+ """
+ if timeout is None or isinstance(timeout, (int, float, httpx_lib.Timeout)):
+ return timeout
+
+ return httpx_lib.Timeout(
+ connect=timeout.connect,
+ read=timeout.read,
+ write=timeout.write,
+ pool=timeout.pool,
+ )
+
+
class HTTPXClient(HTTPClient):
name = "httpx"
@@ -1203,28 +1271,32 @@ def __init__(
super(HTTPXClient, self).__init__(**kwargs)
if _lib is None:
- import httpx
-
- _lib = httpx
- self.httpx = _lib
+ # TODO: (DEVSDK-3427) drop the httpx fallback in the next major version.
+ try:
+ import httpx2 as _lib
+ except ImportError:
+ import httpx as _lib
+ self.httpx: Any = _lib
import anyio
self.anyio = anyio
- kwargs = {}
+ verify: Union[ssl.SSLContext, Literal[False]] = False
if self._verify_ssl_certs:
- kwargs["verify"] = ssl.create_default_context(
- cafile=stripe.ca_bundle_path
- )
- else:
- kwargs["verify"] = False
+ verify = ssl.create_default_context(cafile=stripe.ca_bundle_path)
- self._client_async = self.httpx.AsyncClient(**kwargs)
+ self._client_async = self.httpx.AsyncClient(
+ verify=verify,
+ mounts=_get_httpx_async_mounts(self.httpx, self._proxy, verify),
+ )
self._client = None
if allow_sync_methods:
- self._client = self.httpx.Client(**kwargs)
- self._timeout = timeout
+ self._client = self.httpx.Client(
+ verify=verify,
+ mounts=_get_httpx_sync_mounts(self.httpx, self._proxy, verify),
+ )
+ self._timeout = _coerce_httpx_timeout(self.httpx, timeout)
def sleep_async(self, secs):
return self.anyio.sleep(secs)
@@ -1234,14 +1306,13 @@ def _get_request_args_kwargs(
):
kwargs = {}
- if self._proxy:
- kwargs["proxies"] = self._proxy
-
if self._timeout:
kwargs["timeout"] = self._timeout
+ # `post_data` is an already-encoded body, which httpx takes as
+ # `content`; passing it as `data` is deprecated.
return [
(method, url),
- {"headers": headers, "data": post_data or {}, **kwargs},
+ {"headers": headers, "content": post_data or None, **kwargs},
]
def request(
@@ -1493,9 +1564,9 @@ def __init__(self, **kwargs):
def raise_async_client_import_error() -> Never:
raise ImportError(
(
- "Import httpx not found. To make async http requests,"
- "You must either install httpx or define your own"
- "async http client by subclassing stripe.HTTPClient"
+ "Import httpx2 not found. To make async http requests, "
+ "you must either install httpx2 or define your own "
+ "async http client by subclassing stripe.HTTPClient "
"and setting stripe.default_http_client to an instance of it."
)
)
@@ -1516,7 +1587,7 @@ async def close_async(self):
# --- Client resolution ---
# Detect available HTTP libraries at module load time so the expensive imports
-# (e.g. requests, httpx) happen during Python's init phase rather than when
+# (e.g. requests, httpx2) happen during Python's init phase rather than when
# StripeClient() is constructed. This matters in environments like AWS Lambda
# where module loading has a generous timeout (10s) but handler invocation
# does not (often 3s).
@@ -1528,9 +1599,14 @@ async def close_async(self):
# 4. urllib (stdlib fallback, basically always present)
#
# Async client precedence:
-# 1. httpx + anyio (both required)
-# 2. aiohttp
-# 3. NoImportFoundAsyncClient (raises on use)
+# 1. httpx2 + anyio (both required)
+# 2. (deprecated, see note) httpx + anyio (both required)
+# 3. aiohttp
+# 4. NoImportFoundAsyncClient (raises on use)
+#
+# Note: httpx is no longer maintained, so we only fall back to it for users who
+# haven't installed httpx2 yet. That fallback is deprecated and will be removed
+# in the next major version (DEVSDK-3427).
#
# To add a new client: define the class above, then add it to the appropriate
# cascade below. The resolved class is stored directly — new_default_http_client()
@@ -1564,9 +1640,14 @@ def _resolve_sync_client():
def _resolve_async_client():
try:
- import httpx # noqa: F401
import anyio # noqa: F401
+ # TODO: (DEVSDK-3427) drop the httpx fallback in the next major version.
+ try:
+ import httpx2 # noqa: F401
+ except ImportError:
+ import httpx # noqa: F401
+
return HTTPXClient
except ImportError:
pass
diff --git a/stripe/_invoice.py b/stripe/_invoice.py
index 5d4e88a27..80909eecb 100644
--- a/stripe/_invoice.py
+++ b/stripe/_invoice.py
@@ -254,6 +254,20 @@ class CustomerAddress(StripeObject):
State, county, province, or region ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)).
"""
+ class CustomerBalance(StripeObject):
+ applied_balance: int
+ """
+ The total amount of customer balance applied to this invoice (automatically + manually).
+ """
+ automatically_applied_balance: int
+ """
+ The amount of customer balance automatically applied during invoice finalization.
+ """
+ manually_applied_balance: int
+ """
+ The total amount of customer balance manually applied after finalization.
+ """
+
class CustomerShipping(StripeObject):
class Address(StripeObject):
city: Optional[str]
@@ -556,6 +570,7 @@ class LastFinalizationError(StripeObject):
"forwarding_api_upstream_connection_timeout",
"forwarding_api_upstream_error",
"idempotency_key_in_use",
+ "inactive_api_operation_confirmation_required",
"incorrect_address",
"incorrect_cvc",
"incorrect_number",
@@ -1703,6 +1718,10 @@ class TaxRateDetails(StripeObject):
"""
The customer's address. Until the invoice is finalized, this field will equal `customer.address`. Once the invoice is finalized, this field will no longer be updated.
"""
+ customer_balance: Optional[CustomerBalance]
+ """
+ The customer balance amounts applied to this invoice.
+ """
customer_email: Optional[str]
"""
The customer's email. Until the invoice is finalized, this field will equal `customer.email`. Once the invoice is finalized, this field will no longer be updated.
@@ -3499,6 +3518,7 @@ async def list_lines_async(
"confirmation_secret": ConfirmationSecret,
"custom_fields": CustomField,
"customer_address": CustomerAddress,
+ "customer_balance": CustomerBalance,
"customer_shipping": CustomerShipping,
"customer_tax_ids": CustomerTaxId,
"from_invoice": FromInvoice,
diff --git a/stripe/_object_classes.py b/stripe/_object_classes.py
index 079f5b68f..884d38fcf 100644
--- a/stripe/_object_classes.py
+++ b/stripe/_object_classes.py
@@ -435,7 +435,6 @@
"stripe.v2.billing._bill_setting_version",
"BillSettingVersion",
),
- "v2.billing.cadence": ("stripe.v2.billing._cadence", "Cadence"),
"v2.billing.collection_setting": (
"stripe.v2.billing._collection_setting",
"CollectionSetting",
@@ -474,6 +473,10 @@
"ApprovalRequest",
),
"v2.core.batch_job": ("stripe.v2.core._batch_job", "BatchJob"),
+ "v2.core.claimable_sandbox": (
+ "stripe.v2.core._claimable_sandbox",
+ "ClaimableSandbox",
+ ),
"v2.core.event": ("stripe.v2.core._event", "Event"),
"v2.core.event_destination": (
"stripe.v2.core._event_destination",
diff --git a/stripe/_payment_attempt_record.py b/stripe/_payment_attempt_record.py
index 9ca43345d..5edf3964d 100644
--- a/stripe/_payment_attempt_record.py
+++ b/stripe/_payment_attempt_record.py
@@ -464,7 +464,7 @@ class Checks(StripeObject):
]
]
"""
- If you provide a address postal code, the check result is one of `pass`, `fail`, `unavailable`, or `unchecked`.
+ If you provide an address postal code, the check result is one of `pass`, `fail`, `unavailable`, or `unchecked`.
"""
cvc_check: Optional[
Union[
@@ -957,7 +957,13 @@ class Crypto(StripeObject):
network: Optional[
Union[
Literal[
- "base", "ethereum", "polygon", "solana", "sui", "tempo"
+ "base",
+ "ethereum",
+ "polygon",
+ "solana",
+ "sui",
+ "tempo",
+ "tron",
],
str,
]
@@ -1779,7 +1785,10 @@ class VerifiedAddress(StripeObject):
}
class Paypay(StripeObject):
- pass
+ fingerprint: Optional[str]
+ """
+ Uniquely identifies this particular PayPay account. You can use this attribute to check whether two PayPay accounts are the same.
+ """
class Payto(StripeObject):
bsb_number: Optional[str]
diff --git a/stripe/_payment_intent.py b/stripe/_payment_intent.py
index c52250a8c..8cba9e02f 100644
--- a/stripe/_payment_intent.py
+++ b/stripe/_payment_intent.py
@@ -321,6 +321,7 @@ class LastPaymentError(StripeObject):
"forwarding_api_upstream_connection_timeout",
"forwarding_api_upstream_error",
"idempotency_key_in_use",
+ "inactive_api_operation_confirmation_required",
"incorrect_address",
"incorrect_cvc",
"incorrect_number",
@@ -1463,9 +1464,9 @@ class QrCode(StripeObject):
_inner_class_types = {"qr_code": QrCode}
class VerifyWithMicrodeposits(StripeObject):
- arrival_date: int
+ arrival_date: Optional[int]
"""
- The timestamp when the microdeposits are expected to land.
+ The timestamp when the microdeposits are expected to land. Null for instant microdeposits.
"""
hosted_verification_url: str
"""
diff --git a/stripe/_payment_method.py b/stripe/_payment_method.py
index 12d0b1d38..dfd83e1d1 100644
--- a/stripe/_payment_method.py
+++ b/stripe/_payment_method.py
@@ -196,11 +196,11 @@ class Card(StripeObject):
class Checks(StripeObject):
address_line1_check: Optional[str]
"""
- If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
+ If an address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
"""
address_postal_code_check: Optional[str]
"""
- If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
+ If an address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
"""
cvc_check: Optional[str]
"""
diff --git a/stripe/_payment_record.py b/stripe/_payment_record.py
index 613108d01..105691aa2 100644
--- a/stripe/_payment_record.py
+++ b/stripe/_payment_record.py
@@ -484,7 +484,7 @@ class Checks(StripeObject):
]
]
"""
- If you provide a address postal code, the check result is one of `pass`, `fail`, `unavailable`, or `unchecked`.
+ If you provide an address postal code, the check result is one of `pass`, `fail`, `unavailable`, or `unchecked`.
"""
cvc_check: Optional[
Union[
@@ -977,7 +977,13 @@ class Crypto(StripeObject):
network: Optional[
Union[
Literal[
- "base", "ethereum", "polygon", "solana", "sui", "tempo"
+ "base",
+ "ethereum",
+ "polygon",
+ "solana",
+ "sui",
+ "tempo",
+ "tron",
],
str,
]
@@ -1799,7 +1805,10 @@ class VerifiedAddress(StripeObject):
}
class Paypay(StripeObject):
- pass
+ fingerprint: Optional[str]
+ """
+ Uniquely identifies this particular PayPay account. You can use this attribute to check whether two PayPay accounts are the same.
+ """
class Payto(StripeObject):
bsb_number: Optional[str]
diff --git a/stripe/_product.py b/stripe/_product.py
index a0c923b6e..2ffaea6b8 100644
--- a/stripe/_product.py
+++ b/stripe/_product.py
@@ -69,6 +69,10 @@ class Product(
OBJECT_NAME: ClassVar[Literal["product"]] = "product"
class MarketingFeature(StripeObject):
+ loss_message: Optional[str]
+ """
+ Optional text that describes what a customer loses by canceling, shown for this marketing feature in the Customer Portal cancellation flow. Up to 80 characters long. If you omit it when you update `marketing_features`, Stripe keeps the message stored for the feature with the same name. Duplicate names are matched in order. Set it to an empty string to remove the override. When no override is stored, eligible cancellation flows use the marketing feature name. A renamed feature is treated as a new feature, so send the message again to keep it.
+ """
name: Optional[str]
"""
The marketing feature name. Up to 80 characters long.
diff --git a/stripe/_quote_preview_invoice.py b/stripe/_quote_preview_invoice.py
index 2731dc602..abdd5a579 100644
--- a/stripe/_quote_preview_invoice.py
+++ b/stripe/_quote_preview_invoice.py
@@ -179,6 +179,20 @@ class CustomerAddress(StripeObject):
State, county, province, or region ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)).
"""
+ class CustomerBalance(StripeObject):
+ applied_balance: int
+ """
+ The total amount of customer balance applied to this invoice (automatically + manually).
+ """
+ automatically_applied_balance: int
+ """
+ The amount of customer balance automatically applied during invoice finalization.
+ """
+ manually_applied_balance: int
+ """
+ The total amount of customer balance manually applied after finalization.
+ """
+
class CustomerShipping(StripeObject):
class Address(StripeObject):
city: Optional[str]
@@ -481,6 +495,7 @@ class LastFinalizationError(StripeObject):
"forwarding_api_upstream_connection_timeout",
"forwarding_api_upstream_error",
"idempotency_key_in_use",
+ "inactive_api_operation_confirmation_required",
"incorrect_address",
"incorrect_cvc",
"incorrect_number",
@@ -1621,6 +1636,10 @@ class TaxRateDetails(StripeObject):
"""
The customer's address. Until the invoice is finalized, this field will equal `customer.address`. Once the invoice is finalized, this field will no longer be updated.
"""
+ customer_balance: Optional[CustomerBalance]
+ """
+ The customer balance amounts applied to this invoice.
+ """
customer_email: Optional[str]
"""
The customer's email. Until the invoice is finalized, this field will equal `customer.email`. Once the invoice is finalized, this field will no longer be updated.
@@ -1842,6 +1861,7 @@ class TaxRateDetails(StripeObject):
"confirmation_secret": ConfirmationSecret,
"custom_fields": CustomField,
"customer_address": CustomerAddress,
+ "customer_balance": CustomerBalance,
"customer_shipping": CustomerShipping,
"customer_tax_ids": CustomerTaxId,
"from_invoice": FromInvoice,
diff --git a/stripe/_refund.py b/stripe/_refund.py
index 5c4d381b9..c39919b0e 100644
--- a/stripe/_refund.py
+++ b/stripe/_refund.py
@@ -12,6 +12,7 @@
from typing_extensions import Literal, Type, Unpack, TYPE_CHECKING
if TYPE_CHECKING:
+ from stripe._application import Application
from stripe._balance_transaction import BalanceTransaction
from stripe._charge import Charge
from stripe._customer import Customer
@@ -67,6 +68,16 @@ class AmazonPay(StripeObject):
class AuBankTransfer(StripeObject):
pass
+ class Bizum(StripeObject):
+ reference: Optional[str]
+ """
+ The reference assigned to the refund.
+ """
+ reference_status: Optional[str]
+ """
+ Status of the reference on the refund. This can be `pending`, `available` or `unavailable`.
+ """
+
class Blik(StripeObject):
network_decline_code: Optional[str]
"""
@@ -279,6 +290,16 @@ class ThBankTransfer(StripeObject):
class Twint(StripeObject):
pass
+ class Upi(StripeObject):
+ reference: Optional[str]
+ """
+ The reference assigned to the refund.
+ """
+ reference_status: Optional[str]
+ """
+ Status of the reference on the refund. This can be `pending`, `available` or `unavailable`.
+ """
+
class UsBankTransfer(StripeObject):
reference: Optional[str]
"""
@@ -301,6 +322,7 @@ class Zip(StripeObject):
alma: Optional[Alma]
amazon_pay: Optional[AmazonPay]
au_bank_transfer: Optional[AuBankTransfer]
+ bizum: Optional[Bizum]
blik: Optional[Blik]
br_bank_transfer: Optional[BrBankTransfer]
card: Optional[Card]
@@ -333,6 +355,7 @@ class Zip(StripeObject):
"""
The type of transaction-specific details of the payment method used in the refund (e.g., `card`). An additional hash is included on `destination_details` with a name matching this value. It contains information specific to the refund transaction.
"""
+ upi: Optional[Upi]
us_bank_transfer: Optional[UsBankTransfer]
wechat_pay: Optional[WechatPay]
zip: Optional[Zip]
@@ -343,6 +366,7 @@ class Zip(StripeObject):
"alma": Alma,
"amazon_pay": AmazonPay,
"au_bank_transfer": AuBankTransfer,
+ "bizum": Bizum,
"blik": Blik,
"br_bank_transfer": BrBankTransfer,
"card": Card,
@@ -371,6 +395,7 @@ class Zip(StripeObject):
"swish": Swish,
"th_bank_transfer": ThBankTransfer,
"twint": Twint,
+ "upi": Upi,
"us_bank_transfer": UsBankTransfer,
"wechat_pay": WechatPay,
"zip": Zip,
@@ -416,6 +441,10 @@ class PresentmentDetails(StripeObject):
"""
Amount, in cents (or local equivalent).
"""
+ application: Optional[ExpandableField["Application"]]
+ """
+ ID of the Connect application that created the refund. This can differ from the application on the associated Charge or PaymentIntent. A null value does not necessarily mean the refund was created without a Connect application.
+ """
balance_transaction: Optional[ExpandableField["BalanceTransaction"]]
"""
Balance transaction that describes the impact on your account balance.
diff --git a/stripe/_setup_attempt.py b/stripe/_setup_attempt.py
index cb0087991..0d27a566d 100644
--- a/stripe/_setup_attempt.py
+++ b/stripe/_setup_attempt.py
@@ -95,11 +95,11 @@ class Card(StripeObject):
class Checks(StripeObject):
address_line1_check: Optional[str]
"""
- If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
+ If an address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
"""
address_postal_code_check: Optional[str]
"""
- If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
+ If an address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
"""
cvc_check: Optional[str]
"""
@@ -627,6 +627,7 @@ class SetupError(StripeObject):
"forwarding_api_upstream_connection_timeout",
"forwarding_api_upstream_error",
"idempotency_key_in_use",
+ "inactive_api_operation_confirmation_required",
"incorrect_address",
"incorrect_cvc",
"incorrect_number",
diff --git a/stripe/_setup_intent.py b/stripe/_setup_intent.py
index 704c3b2eb..29ee431b4 100644
--- a/stripe/_setup_intent.py
+++ b/stripe/_setup_intent.py
@@ -171,6 +171,7 @@ class LastSetupError(StripeObject):
"forwarding_api_upstream_connection_timeout",
"forwarding_api_upstream_error",
"idempotency_key_in_use",
+ "inactive_api_operation_confirmation_required",
"incorrect_address",
"incorrect_cvc",
"incorrect_number",
@@ -503,9 +504,9 @@ class QrCode(StripeObject):
_inner_class_types = {"qr_code": QrCode}
class VerifyWithMicrodeposits(StripeObject):
- arrival_date: int
+ arrival_date: Optional[int]
"""
- The timestamp when the microdeposits are expected to land.
+ The timestamp when the microdeposits are expected to land. Null for instant microdeposits.
"""
hosted_verification_url: str
"""
diff --git a/stripe/_test_helpers_service.py b/stripe/_test_helpers_service.py
index 67f523821..46462df3b 100644
--- a/stripe/_test_helpers_service.py
+++ b/stripe/_test_helpers_service.py
@@ -5,6 +5,7 @@
from typing_extensions import TYPE_CHECKING
if TYPE_CHECKING:
+ from stripe.test_helpers._capital_service import CapitalService
from stripe.test_helpers._confirmation_token_service import (
ConfirmationTokenService,
)
@@ -19,6 +20,7 @@
from stripe.test_helpers._treasury_service import TreasuryService
_subservices = {
+ "capital": ["stripe.test_helpers._capital_service", "CapitalService"],
"confirmation_tokens": [
"stripe.test_helpers._confirmation_token_service",
"ConfirmationTokenService",
@@ -40,6 +42,7 @@
class TestHelpersService(StripeService):
+ capital: "CapitalService"
confirmation_tokens: "ConfirmationTokenService"
customers: "CustomerService"
issuing: "IssuingService"
diff --git a/stripe/apps/_install.py b/stripe/apps/_install.py
index c40ac4da4..4dc31c64f 100644
--- a/stripe/apps/_install.py
+++ b/stripe/apps/_install.py
@@ -133,7 +133,7 @@ class ContentSecurityPolicyPending(StripeObject):
@classmethod
def create(cls, **params: Unpack["InstallCreateParams"]) -> "Install":
"""
- Creates an app install. An account installs its own private app with its own key; public and testing installs are made from the Dashboard. An app developer acting on a connected account through Stripe-Account installs or reinstalls its app there, and an embedding platform can do the same once the app's developer approves its request to embed the app. For a private app, creating an install installs the newest completed upload; when that version is already installed with nothing pending, the existing install is returned.
+ Creates an app install. An account installs its own private app with its own key; public and testing installs are made from the Dashboard. An app developer acting on a connected account through Stripe-Account installs or reinstalls its app there, and an embedding platform can do the same once the app's developer approves its request to embed the app and the platform has accepted the Embedding Platform Terms and Conditions in the Dashboard. For a private app, creating an install installs the newest completed upload; when that version is already installed with nothing pending, the existing install is returned.
"""
return cast(
"Install",
@@ -149,7 +149,7 @@ async def create_async(
cls, **params: Unpack["InstallCreateParams"]
) -> "Install":
"""
- Creates an app install. An account installs its own private app with its own key; public and testing installs are made from the Dashboard. An app developer acting on a connected account through Stripe-Account installs or reinstalls its app there, and an embedding platform can do the same once the app's developer approves its request to embed the app. For a private app, creating an install installs the newest completed upload; when that version is already installed with nothing pending, the existing install is returned.
+ Creates an app install. An account installs its own private app with its own key; public and testing installs are made from the Dashboard. An app developer acting on a connected account through Stripe-Account installs or reinstalls its app there, and an embedding platform can do the same once the app's developer approves its request to embed the app and the platform has accepted the Embedding Platform Terms and Conditions in the Dashboard. For a private app, creating an install installs the newest completed upload; when that version is already installed with nothing pending, the existing install is returned.
"""
return cast(
"Install",
@@ -165,7 +165,7 @@ def list(
cls, **params: Unpack["InstallListParams"]
) -> ListObject["Install"]:
"""
- Returns a list of app installs. An app developer filtering by its own app with its own key sees that app's installs across the accounts that installed it. An app developer acting on a connected account through Stripe-Account and filtering by its app sees that account's installs of the app, and an embedding platform acting on a connected account sees only the installs it created there. Other callers see the installs on their own account. A live key lists live installs and a test key lists test installs; the key of an app's managed sandbox filtering by app lists that app's installs across every sandbox.
+ Returns a list of app installs. An app developer filtering by its own app with its own key sees that app's installs across the accounts that installed it. An app developer acting on a connected account through Stripe-Account and filtering by its app sees that account's installs of the app, and an embedding platform acting on a connected account sees only the installs it created there. Other callers see the installs on their own account. A live key lists live installs and a test key lists test installs; the key of an app's managed sandbox filtering by app lists that app's installs across every sandbox, and also that app's legacy test mode installs when the developer has no legacy test mode.
"""
result = cls._static_request(
"get",
@@ -185,7 +185,7 @@ async def list_async(
cls, **params: Unpack["InstallListParams"]
) -> ListObject["Install"]:
"""
- Returns a list of app installs. An app developer filtering by its own app with its own key sees that app's installs across the accounts that installed it. An app developer acting on a connected account through Stripe-Account and filtering by its app sees that account's installs of the app, and an embedding platform acting on a connected account sees only the installs it created there. Other callers see the installs on their own account. A live key lists live installs and a test key lists test installs; the key of an app's managed sandbox filtering by app lists that app's installs across every sandbox.
+ Returns a list of app installs. An app developer filtering by its own app with its own key sees that app's installs across the accounts that installed it. An app developer acting on a connected account through Stripe-Account and filtering by its app sees that account's installs of the app, and an embedding platform acting on a connected account sees only the installs it created there. Other callers see the installs on their own account. A live key lists live installs and a test key lists test installs; the key of an app's managed sandbox filtering by app lists that app's installs across every sandbox, and also that app's legacy test mode installs when the developer has no legacy test mode.
"""
result = await cls._static_request_async(
"get",
diff --git a/stripe/apps/_install_service.py b/stripe/apps/_install_service.py
index 930d3be45..e4efb1694 100644
--- a/stripe/apps/_install_service.py
+++ b/stripe/apps/_install_service.py
@@ -27,7 +27,7 @@ def list(
options: Optional["RequestOptions"] = None,
) -> "ListObject[Install]":
"""
- Returns a list of app installs. An app developer filtering by its own app with its own key sees that app's installs across the accounts that installed it. An app developer acting on a connected account through Stripe-Account and filtering by its app sees that account's installs of the app, and an embedding platform acting on a connected account sees only the installs it created there. Other callers see the installs on their own account. A live key lists live installs and a test key lists test installs; the key of an app's managed sandbox filtering by app lists that app's installs across every sandbox.
+ Returns a list of app installs. An app developer filtering by its own app with its own key sees that app's installs across the accounts that installed it. An app developer acting on a connected account through Stripe-Account and filtering by its app sees that account's installs of the app, and an embedding platform acting on a connected account sees only the installs it created there. Other callers see the installs on their own account. A live key lists live installs and a test key lists test installs; the key of an app's managed sandbox filtering by app lists that app's installs across every sandbox, and also that app's legacy test mode installs when the developer has no legacy test mode.
"""
return cast(
"ListObject[Install]",
@@ -46,7 +46,7 @@ async def list_async(
options: Optional["RequestOptions"] = None,
) -> "ListObject[Install]":
"""
- Returns a list of app installs. An app developer filtering by its own app with its own key sees that app's installs across the accounts that installed it. An app developer acting on a connected account through Stripe-Account and filtering by its app sees that account's installs of the app, and an embedding platform acting on a connected account sees only the installs it created there. Other callers see the installs on their own account. A live key lists live installs and a test key lists test installs; the key of an app's managed sandbox filtering by app lists that app's installs across every sandbox.
+ Returns a list of app installs. An app developer filtering by its own app with its own key sees that app's installs across the accounts that installed it. An app developer acting on a connected account through Stripe-Account and filtering by its app sees that account's installs of the app, and an embedding platform acting on a connected account sees only the installs it created there. Other callers see the installs on their own account. A live key lists live installs and a test key lists test installs; the key of an app's managed sandbox filtering by app lists that app's installs across every sandbox, and also that app's legacy test mode installs when the developer has no legacy test mode.
"""
return cast(
"ListObject[Install]",
@@ -65,7 +65,7 @@ def create(
options: Optional["RequestOptions"] = None,
) -> "Install":
"""
- Creates an app install. An account installs its own private app with its own key; public and testing installs are made from the Dashboard. An app developer acting on a connected account through Stripe-Account installs or reinstalls its app there, and an embedding platform can do the same once the app's developer approves its request to embed the app. For a private app, creating an install installs the newest completed upload; when that version is already installed with nothing pending, the existing install is returned.
+ Creates an app install. An account installs its own private app with its own key; public and testing installs are made from the Dashboard. An app developer acting on a connected account through Stripe-Account installs or reinstalls its app there, and an embedding platform can do the same once the app's developer approves its request to embed the app and the platform has accepted the Embedding Platform Terms and Conditions in the Dashboard. For a private app, creating an install installs the newest completed upload; when that version is already installed with nothing pending, the existing install is returned.
"""
return cast(
"Install",
@@ -84,7 +84,7 @@ async def create_async(
options: Optional["RequestOptions"] = None,
) -> "Install":
"""
- Creates an app install. An account installs its own private app with its own key; public and testing installs are made from the Dashboard. An app developer acting on a connected account through Stripe-Account installs or reinstalls its app there, and an embedding platform can do the same once the app's developer approves its request to embed the app. For a private app, creating an install installs the newest completed upload; when that version is already installed with nothing pending, the existing install is returned.
+ Creates an app install. An account installs its own private app with its own key; public and testing installs are made from the Dashboard. An app developer acting on a connected account through Stripe-Account installs or reinstalls its app there, and an embedding platform can do the same once the app's developer approves its request to embed the app and the platform has accepted the Embedding Platform Terms and Conditions in the Dashboard. For a private app, creating an install installs the newest completed upload; when that version is already installed with nothing pending, the existing install is returned.
"""
return cast(
"Install",
diff --git a/stripe/capital/_financing_offer.py b/stripe/capital/_financing_offer.py
index d02ef9fa6..9981a732b 100644
--- a/stripe/capital/_financing_offer.py
+++ b/stripe/capital/_financing_offer.py
@@ -3,17 +3,24 @@
from stripe._list_object import ListObject
from stripe._listable_api_resource import ListableAPIResource
from stripe._stripe_object import StripeObject, UntypedStripeObject
+from stripe._test_helpers import APIResourceTestHelpers
from stripe._util import class_method_variant, sanitize_id
from typing import ClassVar, Optional, Union, cast, overload
-from typing_extensions import Literal, Unpack, TYPE_CHECKING
+from typing_extensions import Literal, Type, Unpack, TYPE_CHECKING
if TYPE_CHECKING:
+ from stripe.params.capital._financing_offer_create_params import (
+ FinancingOfferCreateParams,
+ )
from stripe.params.capital._financing_offer_list_params import (
FinancingOfferListParams,
)
from stripe.params.capital._financing_offer_mark_delivered_params import (
FinancingOfferMarkDeliveredParams,
)
+ from stripe.params.capital._financing_offer_refill_params import (
+ FinancingOfferRefillParams,
+ )
from stripe.params.capital._financing_offer_retrieve_params import (
FinancingOfferRetrieveParams,
)
@@ -381,7 +388,173 @@ async def retrieve_async(
await instance.refresh_async()
return instance
+ class TestHelpers(APIResourceTestHelpers["FinancingOffer"]):
+ _resource_cls: Type["FinancingOffer"]
+
+ @classmethod
+ def create(
+ cls, **params: Unpack["FinancingOfferCreateParams"]
+ ) -> "FinancingOffer":
+ """
+ Creates a test financing offer for a connected account.
+ """
+ return cast(
+ "FinancingOffer",
+ cls._static_request(
+ "post",
+ "/v1/test_helpers/capital/financing_offers",
+ params=params,
+ ),
+ )
+
+ @classmethod
+ async def create_async(
+ cls, **params: Unpack["FinancingOfferCreateParams"]
+ ) -> "FinancingOffer":
+ """
+ Creates a test financing offer for a connected account.
+ """
+ return cast(
+ "FinancingOffer",
+ await cls._static_request_async(
+ "post",
+ "/v1/test_helpers/capital/financing_offers",
+ params=params,
+ ),
+ )
+
+ @classmethod
+ def _cls_refill(
+ cls,
+ financing_offer: str,
+ /,
+ **params: Unpack["FinancingOfferRefillParams"],
+ ) -> "FinancingOffer":
+ """
+ Refills a test financing offer for a connected account.
+ """
+ return cast(
+ "FinancingOffer",
+ cls._static_request(
+ "post",
+ "/v1/test_helpers/capital/financing_offers/{financing_offer}/refill".format(
+ financing_offer=sanitize_id(financing_offer)
+ ),
+ params=params,
+ ),
+ )
+
+ @overload
+ @staticmethod
+ def refill(
+ financing_offer: str,
+ /,
+ **params: Unpack["FinancingOfferRefillParams"],
+ ) -> "FinancingOffer":
+ """
+ Refills a test financing offer for a connected account.
+ """
+ ...
+
+ @overload
+ def refill(
+ self, **params: Unpack["FinancingOfferRefillParams"]
+ ) -> "FinancingOffer":
+ """
+ Refills a test financing offer for a connected account.
+ """
+ ...
+
+ @class_method_variant("_cls_refill")
+ def refill(
+ self, **params: Unpack["FinancingOfferRefillParams"]
+ ) -> "FinancingOffer":
+ """
+ Refills a test financing offer for a connected account.
+ """
+ return cast(
+ "FinancingOffer",
+ self.resource._request(
+ "post",
+ "/v1/test_helpers/capital/financing_offers/{financing_offer}/refill".format(
+ financing_offer=sanitize_id(
+ self.resource._data.get("id")
+ )
+ ),
+ params=params,
+ ),
+ )
+
+ @classmethod
+ async def _cls_refill_async(
+ cls,
+ financing_offer: str,
+ /,
+ **params: Unpack["FinancingOfferRefillParams"],
+ ) -> "FinancingOffer":
+ """
+ Refills a test financing offer for a connected account.
+ """
+ return cast(
+ "FinancingOffer",
+ await cls._static_request_async(
+ "post",
+ "/v1/test_helpers/capital/financing_offers/{financing_offer}/refill".format(
+ financing_offer=sanitize_id(financing_offer)
+ ),
+ params=params,
+ ),
+ )
+
+ @overload
+ @staticmethod
+ async def refill_async(
+ financing_offer: str,
+ /,
+ **params: Unpack["FinancingOfferRefillParams"],
+ ) -> "FinancingOffer":
+ """
+ Refills a test financing offer for a connected account.
+ """
+ ...
+
+ @overload
+ async def refill_async(
+ self, **params: Unpack["FinancingOfferRefillParams"]
+ ) -> "FinancingOffer":
+ """
+ Refills a test financing offer for a connected account.
+ """
+ ...
+
+ @class_method_variant("_cls_refill_async")
+ async def refill_async(
+ self, **params: Unpack["FinancingOfferRefillParams"]
+ ) -> "FinancingOffer":
+ """
+ Refills a test financing offer for a connected account.
+ """
+ return cast(
+ "FinancingOffer",
+ await self.resource._request_async(
+ "post",
+ "/v1/test_helpers/capital/financing_offers/{financing_offer}/refill".format(
+ financing_offer=sanitize_id(
+ self.resource._data.get("id")
+ )
+ ),
+ params=params,
+ ),
+ )
+
+ @property
+ def test_helpers(self):
+ return self.TestHelpers(self)
+
_inner_class_types = {
"accepted_terms": AcceptedTerms,
"offered_terms": OfferedTerms,
}
+
+
+FinancingOffer.TestHelpers._resource_cls = FinancingOffer
diff --git a/stripe/checkout/_session.py b/stripe/checkout/_session.py
index 1c170b76d..a7a31aa2f 100644
--- a/stripe/checkout/_session.py
+++ b/stripe/checkout/_session.py
@@ -112,6 +112,10 @@ class Liability(StripeObject):
Type of the account referenced.
"""
+ address_collection_precision: Optional[Literal["full", "minimal"]]
+ """
+ Controls how much address information Checkout collects when automatic tax is enabled.
+ """
enabled: bool
"""
Indicates whether automatic tax is enabled for the session
@@ -3007,6 +3011,8 @@ class Link(StripeObject):
def create(cls, **params: Unpack["SessionCreateParams"]) -> "Session":
"""
Creates a Checkout Session object.
+
+ Validate requests on your server and protect your application's Session-creation endpoint with access controls and limits on repeated creation. See [Protect your Session-creation endpoint](https://docs.stripe.com/payments/accept-a-payment?payment-ui=elements&api-integration=checkout#protect-session-creation).
"""
return cast(
"Session",
@@ -3023,6 +3029,8 @@ async def create_async(
) -> "Session":
"""
Creates a Checkout Session object.
+
+ Validate requests on your server and protect your application's Session-creation endpoint with access controls and limits on repeated creation. See [Protect your Session-creation endpoint](https://docs.stripe.com/payments/accept-a-payment?payment-ui=elements&api-integration=checkout#protect-session-creation).
"""
return cast(
"Session",
diff --git a/stripe/checkout/_session_service.py b/stripe/checkout/_session_service.py
index 96664e0af..cf8ebcc3f 100644
--- a/stripe/checkout/_session_service.py
+++ b/stripe/checkout/_session_service.py
@@ -102,6 +102,8 @@ def create(
) -> "Session":
"""
Creates a Checkout Session object.
+
+ Validate requests on your server and protect your application's Session-creation endpoint with access controls and limits on repeated creation. See [Protect your Session-creation endpoint](https://docs.stripe.com/payments/accept-a-payment?payment-ui=elements&api-integration=checkout#protect-session-creation).
"""
return cast(
"Session",
@@ -121,6 +123,8 @@ async def create_async(
) -> "Session":
"""
Creates a Checkout Session object.
+
+ Validate requests on your server and protect your application's Session-creation endpoint with access controls and limits on repeated creation. See [Protect your Session-creation endpoint](https://docs.stripe.com/payments/accept-a-payment?payment-ui=elements&api-integration=checkout#protect-session-creation).
"""
return cast(
"Session",
diff --git a/stripe/events/__init__.py b/stripe/events/__init__.py
index 0b0ef0642..5b624411f 100644
--- a/stripe/events/__init__.py
+++ b/stripe/events/__init__.py
@@ -1251,6 +1251,26 @@
V2CoreBatchJobValidationFailedEvent as V2CoreBatchJobValidationFailedEvent,
V2CoreBatchJobValidationFailedEventNotification as V2CoreBatchJobValidationFailedEventNotification,
)
+ from stripe.events._v2_core_claimable_sandbox_claimed_event import (
+ V2CoreClaimableSandboxClaimedEvent as V2CoreClaimableSandboxClaimedEvent,
+ V2CoreClaimableSandboxClaimedEventNotification as V2CoreClaimableSandboxClaimedEventNotification,
+ )
+ from stripe.events._v2_core_claimable_sandbox_created_event import (
+ V2CoreClaimableSandboxCreatedEvent as V2CoreClaimableSandboxCreatedEvent,
+ V2CoreClaimableSandboxCreatedEventNotification as V2CoreClaimableSandboxCreatedEventNotification,
+ )
+ from stripe.events._v2_core_claimable_sandbox_expired_event import (
+ V2CoreClaimableSandboxExpiredEvent as V2CoreClaimableSandboxExpiredEvent,
+ V2CoreClaimableSandboxExpiredEventNotification as V2CoreClaimableSandboxExpiredEventNotification,
+ )
+ from stripe.events._v2_core_claimable_sandbox_expiring_event import (
+ V2CoreClaimableSandboxExpiringEvent as V2CoreClaimableSandboxExpiringEvent,
+ V2CoreClaimableSandboxExpiringEventNotification as V2CoreClaimableSandboxExpiringEventNotification,
+ )
+ from stripe.events._v2_core_claimable_sandbox_updated_event import (
+ V2CoreClaimableSandboxUpdatedEvent as V2CoreClaimableSandboxUpdatedEvent,
+ V2CoreClaimableSandboxUpdatedEventNotification as V2CoreClaimableSandboxUpdatedEventNotification,
+ )
from stripe.events._v2_core_event_destination_ping_event import (
V2CoreEventDestinationPingEvent as V2CoreEventDestinationPingEvent,
V2CoreEventDestinationPingEventNotification as V2CoreEventDestinationPingEventNotification,
@@ -3900,6 +3920,46 @@
"stripe.events._v2_core_batch_job_validation_failed_event",
False,
),
+ "V2CoreClaimableSandboxClaimedEvent": (
+ "stripe.events._v2_core_claimable_sandbox_claimed_event",
+ False,
+ ),
+ "V2CoreClaimableSandboxClaimedEventNotification": (
+ "stripe.events._v2_core_claimable_sandbox_claimed_event",
+ False,
+ ),
+ "V2CoreClaimableSandboxCreatedEvent": (
+ "stripe.events._v2_core_claimable_sandbox_created_event",
+ False,
+ ),
+ "V2CoreClaimableSandboxCreatedEventNotification": (
+ "stripe.events._v2_core_claimable_sandbox_created_event",
+ False,
+ ),
+ "V2CoreClaimableSandboxExpiredEvent": (
+ "stripe.events._v2_core_claimable_sandbox_expired_event",
+ False,
+ ),
+ "V2CoreClaimableSandboxExpiredEventNotification": (
+ "stripe.events._v2_core_claimable_sandbox_expired_event",
+ False,
+ ),
+ "V2CoreClaimableSandboxExpiringEvent": (
+ "stripe.events._v2_core_claimable_sandbox_expiring_event",
+ False,
+ ),
+ "V2CoreClaimableSandboxExpiringEventNotification": (
+ "stripe.events._v2_core_claimable_sandbox_expiring_event",
+ False,
+ ),
+ "V2CoreClaimableSandboxUpdatedEvent": (
+ "stripe.events._v2_core_claimable_sandbox_updated_event",
+ False,
+ ),
+ "V2CoreClaimableSandboxUpdatedEventNotification": (
+ "stripe.events._v2_core_claimable_sandbox_updated_event",
+ False,
+ ),
"V2CoreEventDestinationPingEvent": (
"stripe.events._v2_core_event_destination_ping_event",
False,
diff --git a/stripe/events/_event_classes.py b/stripe/events/_event_classes.py
index 7262b0b16..26bf952f8 100644
--- a/stripe/events/_event_classes.py
+++ b/stripe/events/_event_classes.py
@@ -934,6 +934,21 @@
from stripe.events._v2_core_batch_job_validation_failed_event import (
V2CoreBatchJobValidationFailedEventNotification,
)
+ from stripe.events._v2_core_claimable_sandbox_claimed_event import (
+ V2CoreClaimableSandboxClaimedEventNotification,
+ )
+ from stripe.events._v2_core_claimable_sandbox_created_event import (
+ V2CoreClaimableSandboxCreatedEventNotification,
+ )
+ from stripe.events._v2_core_claimable_sandbox_expired_event import (
+ V2CoreClaimableSandboxExpiredEventNotification,
+ )
+ from stripe.events._v2_core_claimable_sandbox_expiring_event import (
+ V2CoreClaimableSandboxExpiringEventNotification,
+ )
+ from stripe.events._v2_core_claimable_sandbox_updated_event import (
+ V2CoreClaimableSandboxUpdatedEventNotification,
+ )
from stripe.events._v2_core_event_destination_ping_event import (
V2CoreEventDestinationPingEventNotification,
)
@@ -2386,6 +2401,26 @@
"stripe.events._v2_core_batch_job_validation_failed_event",
"V2CoreBatchJobValidationFailedEvent",
),
+ "v2.core.claimable_sandbox.claimed": (
+ "stripe.events._v2_core_claimable_sandbox_claimed_event",
+ "V2CoreClaimableSandboxClaimedEvent",
+ ),
+ "v2.core.claimable_sandbox.created": (
+ "stripe.events._v2_core_claimable_sandbox_created_event",
+ "V2CoreClaimableSandboxCreatedEvent",
+ ),
+ "v2.core.claimable_sandbox.expired": (
+ "stripe.events._v2_core_claimable_sandbox_expired_event",
+ "V2CoreClaimableSandboxExpiredEvent",
+ ),
+ "v2.core.claimable_sandbox.expiring": (
+ "stripe.events._v2_core_claimable_sandbox_expiring_event",
+ "V2CoreClaimableSandboxExpiringEvent",
+ ),
+ "v2.core.claimable_sandbox.updated": (
+ "stripe.events._v2_core_claimable_sandbox_updated_event",
+ "V2CoreClaimableSandboxUpdatedEvent",
+ ),
"v2.core.event_destination.ping": (
"stripe.events._v2_core_event_destination_ping_event",
"V2CoreEventDestinationPingEvent",
@@ -3921,6 +3956,26 @@ def get_v2_event_class(type_: str):
"stripe.events._v2_core_batch_job_validation_failed_event",
"V2CoreBatchJobValidationFailedEventNotification",
),
+ "v2.core.claimable_sandbox.claimed": (
+ "stripe.events._v2_core_claimable_sandbox_claimed_event",
+ "V2CoreClaimableSandboxClaimedEventNotification",
+ ),
+ "v2.core.claimable_sandbox.created": (
+ "stripe.events._v2_core_claimable_sandbox_created_event",
+ "V2CoreClaimableSandboxCreatedEventNotification",
+ ),
+ "v2.core.claimable_sandbox.expired": (
+ "stripe.events._v2_core_claimable_sandbox_expired_event",
+ "V2CoreClaimableSandboxExpiredEventNotification",
+ ),
+ "v2.core.claimable_sandbox.expiring": (
+ "stripe.events._v2_core_claimable_sandbox_expiring_event",
+ "V2CoreClaimableSandboxExpiringEventNotification",
+ ),
+ "v2.core.claimable_sandbox.updated": (
+ "stripe.events._v2_core_claimable_sandbox_updated_event",
+ "V2CoreClaimableSandboxUpdatedEventNotification",
+ ),
"v2.core.event_destination.ping": (
"stripe.events._v2_core_event_destination_ping_event",
"V2CoreEventDestinationPingEventNotification",
@@ -4529,6 +4584,11 @@ def get_v2_event_notification_class(type_: str):
"V2CoreBatchJobUploadTimeoutEventNotification",
"V2CoreBatchJobValidatingEventNotification",
"V2CoreBatchJobValidationFailedEventNotification",
+ "V2CoreClaimableSandboxClaimedEventNotification",
+ "V2CoreClaimableSandboxCreatedEventNotification",
+ "V2CoreClaimableSandboxExpiredEventNotification",
+ "V2CoreClaimableSandboxExpiringEventNotification",
+ "V2CoreClaimableSandboxUpdatedEventNotification",
"V2CoreEventDestinationPingEventNotification",
"V2CoreHealthEventGenerationFailureResolvedEventNotification",
"V2DataQueryRunCreatedEventNotification",
diff --git a/stripe/events/_v2_core_account_including_configuration_merchant_capability_status_updated_event.py b/stripe/events/_v2_core_account_including_configuration_merchant_capability_status_updated_event.py
index ed11fbbd1..8e2a3d249 100644
--- a/stripe/events/_v2_core_account_including_configuration_merchant_capability_status_updated_event.py
+++ b/stripe/events/_v2_core_account_including_configuration_merchant_capability_status_updated_event.py
@@ -109,6 +109,7 @@ class V2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEventDat
"au_becs_debit_payments",
"bacs_debit_payments",
"bancontact_payments",
+ "billie_payments",
"blik_payments",
"blik_recurring_payments",
"boleto_payments",
@@ -127,16 +128,20 @@ class V2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEventDat
"konbini_payments",
"kr_card_payments",
"link_payments",
+ "mb_way_payments",
"mobilepay_payments",
"multibanco_payments",
"mx_bank_transfer_payments",
"naver_pay_payments",
+ "nz_bank_account_becs_debit_payments",
"oxxo_payments",
"p24_payments",
"payco_payments",
"paynow_payments",
"stripe_balance.payouts",
+ "paypay_payments",
"pay_by_bank_payments",
+ "pix_payments",
"promptpay_payments",
"revolut_pay_payments",
"samsung_pay_payments",
diff --git a/stripe/events/_v2_core_claimable_sandbox_claimed_event.py b/stripe/events/_v2_core_claimable_sandbox_claimed_event.py
new file mode 100644
index 000000000..f483d66b4
--- /dev/null
+++ b/stripe/events/_v2_core_claimable_sandbox_claimed_event.py
@@ -0,0 +1,113 @@
+# -*- coding: utf-8 -*-
+# File generated from our OpenAPI spec
+from stripe._stripe_object import StripeObject
+from stripe._util import get_api_mode
+from stripe.v2.core._event import Event, EventNotification, RelatedObject
+from typing import Any, Dict, cast
+from typing_extensions import Literal, TYPE_CHECKING, override
+
+if TYPE_CHECKING:
+ from stripe._stripe_client import StripeClient
+ from stripe.v2.core._claimable_sandbox import ClaimableSandbox
+
+
+class V2CoreClaimableSandboxClaimedEventNotification(EventNotification):
+ LOOKUP_TYPE = "v2.core.claimable_sandbox.claimed"
+ type: Literal["v2.core.claimable_sandbox.claimed"]
+ related_object: RelatedObject
+
+ def __init__(
+ self, parsed_body: Dict[str, Any], client: "StripeClient"
+ ) -> None:
+ super().__init__(
+ parsed_body,
+ client,
+ )
+ self.related_object = RelatedObject(parsed_body["related_object"])
+
+ @override
+ def fetch_event(self) -> "V2CoreClaimableSandboxClaimedEvent":
+ return cast(
+ "V2CoreClaimableSandboxClaimedEvent",
+ super().fetch_event(),
+ )
+
+ def fetch_related_object(self) -> "ClaimableSandbox":
+ response = self._client.raw_request(
+ "get",
+ self.related_object.url,
+ stripe_context=self.context,
+ headers={"Stripe-Request-Trigger": f"event={self.id}"},
+ usage=["fetch_related_object"],
+ )
+ return cast(
+ "ClaimableSandbox",
+ self._client.deserialize(
+ response,
+ api_mode=get_api_mode(self.related_object.url),
+ ),
+ )
+
+ @override
+ async def fetch_event_async(self) -> "V2CoreClaimableSandboxClaimedEvent":
+ return cast(
+ "V2CoreClaimableSandboxClaimedEvent",
+ await super().fetch_event_async(),
+ )
+
+ async def fetch_related_object_async(self) -> "ClaimableSandbox":
+ response = await self._client.raw_request_async(
+ "get",
+ self.related_object.url,
+ stripe_context=self.context,
+ headers={"Stripe-Request-Trigger": f"event={self.id}"},
+ usage=["fetch_related_object"],
+ )
+ return cast(
+ "ClaimableSandbox",
+ self._client.deserialize(
+ response,
+ api_mode=get_api_mode(self.related_object.url),
+ ),
+ )
+
+
+class V2CoreClaimableSandboxClaimedEvent(Event):
+ LOOKUP_TYPE = "v2.core.claimable_sandbox.claimed"
+ type: Literal["v2.core.claimable_sandbox.claimed"]
+
+ class RelatedObject(StripeObject):
+ id: str
+ """
+ Unique identifier for the object relevant to the event.
+ """
+ type: str
+ """
+ Type of the object relevant to the event.
+ """
+ url: str
+ """
+ URL to retrieve the resource.
+ """
+
+ related_object: RelatedObject
+ """
+ Object containing the reference to API resource relevant to the event
+ """
+
+ def fetch_related_object(self) -> "ClaimableSandbox":
+ """
+ Retrieves the related object from the API. Makes an API request on every call.
+ """
+ return cast(
+ "ClaimableSandbox",
+ self._requestor.request(
+ "get",
+ self.related_object.url,
+ base_address="api",
+ options={
+ "stripe_context": self.context,
+ "headers": {"Stripe-Request-Trigger": f"event={self.id}"},
+ },
+ ),
+ )
diff --git a/stripe/events/_v2_core_claimable_sandbox_created_event.py b/stripe/events/_v2_core_claimable_sandbox_created_event.py
new file mode 100644
index 000000000..2ddb532c5
--- /dev/null
+++ b/stripe/events/_v2_core_claimable_sandbox_created_event.py
@@ -0,0 +1,113 @@
+# -*- coding: utf-8 -*-
+# File generated from our OpenAPI spec
+from stripe._stripe_object import StripeObject
+from stripe._util import get_api_mode
+from stripe.v2.core._event import Event, EventNotification, RelatedObject
+from typing import Any, Dict, cast
+from typing_extensions import Literal, TYPE_CHECKING, override
+
+if TYPE_CHECKING:
+ from stripe._stripe_client import StripeClient
+ from stripe.v2.core._claimable_sandbox import ClaimableSandbox
+
+
+class V2CoreClaimableSandboxCreatedEventNotification(EventNotification):
+ LOOKUP_TYPE = "v2.core.claimable_sandbox.created"
+ type: Literal["v2.core.claimable_sandbox.created"]
+ related_object: RelatedObject
+
+ def __init__(
+ self, parsed_body: Dict[str, Any], client: "StripeClient"
+ ) -> None:
+ super().__init__(
+ parsed_body,
+ client,
+ )
+ self.related_object = RelatedObject(parsed_body["related_object"])
+
+ @override
+ def fetch_event(self) -> "V2CoreClaimableSandboxCreatedEvent":
+ return cast(
+ "V2CoreClaimableSandboxCreatedEvent",
+ super().fetch_event(),
+ )
+
+ def fetch_related_object(self) -> "ClaimableSandbox":
+ response = self._client.raw_request(
+ "get",
+ self.related_object.url,
+ stripe_context=self.context,
+ headers={"Stripe-Request-Trigger": f"event={self.id}"},
+ usage=["fetch_related_object"],
+ )
+ return cast(
+ "ClaimableSandbox",
+ self._client.deserialize(
+ response,
+ api_mode=get_api_mode(self.related_object.url),
+ ),
+ )
+
+ @override
+ async def fetch_event_async(self) -> "V2CoreClaimableSandboxCreatedEvent":
+ return cast(
+ "V2CoreClaimableSandboxCreatedEvent",
+ await super().fetch_event_async(),
+ )
+
+ async def fetch_related_object_async(self) -> "ClaimableSandbox":
+ response = await self._client.raw_request_async(
+ "get",
+ self.related_object.url,
+ stripe_context=self.context,
+ headers={"Stripe-Request-Trigger": f"event={self.id}"},
+ usage=["fetch_related_object"],
+ )
+ return cast(
+ "ClaimableSandbox",
+ self._client.deserialize(
+ response,
+ api_mode=get_api_mode(self.related_object.url),
+ ),
+ )
+
+
+class V2CoreClaimableSandboxCreatedEvent(Event):
+ LOOKUP_TYPE = "v2.core.claimable_sandbox.created"
+ type: Literal["v2.core.claimable_sandbox.created"]
+
+ class RelatedObject(StripeObject):
+ id: str
+ """
+ Unique identifier for the object relevant to the event.
+ """
+ type: str
+ """
+ Type of the object relevant to the event.
+ """
+ url: str
+ """
+ URL to retrieve the resource.
+ """
+
+ related_object: RelatedObject
+ """
+ Object containing the reference to API resource relevant to the event
+ """
+
+ def fetch_related_object(self) -> "ClaimableSandbox":
+ """
+ Retrieves the related object from the API. Makes an API request on every call.
+ """
+ return cast(
+ "ClaimableSandbox",
+ self._requestor.request(
+ "get",
+ self.related_object.url,
+ base_address="api",
+ options={
+ "stripe_context": self.context,
+ "headers": {"Stripe-Request-Trigger": f"event={self.id}"},
+ },
+ ),
+ )
diff --git a/stripe/events/_v2_core_claimable_sandbox_expired_event.py b/stripe/events/_v2_core_claimable_sandbox_expired_event.py
new file mode 100644
index 000000000..0198c8c1f
--- /dev/null
+++ b/stripe/events/_v2_core_claimable_sandbox_expired_event.py
@@ -0,0 +1,113 @@
+# -*- coding: utf-8 -*-
+# File generated from our OpenAPI spec
+from stripe._stripe_object import StripeObject
+from stripe._util import get_api_mode
+from stripe.v2.core._event import Event, EventNotification, RelatedObject
+from typing import Any, Dict, cast
+from typing_extensions import Literal, TYPE_CHECKING, override
+
+if TYPE_CHECKING:
+ from stripe._stripe_client import StripeClient
+ from stripe.v2.core._claimable_sandbox import ClaimableSandbox
+
+
+class V2CoreClaimableSandboxExpiredEventNotification(EventNotification):
+ LOOKUP_TYPE = "v2.core.claimable_sandbox.expired"
+ type: Literal["v2.core.claimable_sandbox.expired"]
+ related_object: RelatedObject
+
+ def __init__(
+ self, parsed_body: Dict[str, Any], client: "StripeClient"
+ ) -> None:
+ super().__init__(
+ parsed_body,
+ client,
+ )
+ self.related_object = RelatedObject(parsed_body["related_object"])
+
+ @override
+ def fetch_event(self) -> "V2CoreClaimableSandboxExpiredEvent":
+ return cast(
+ "V2CoreClaimableSandboxExpiredEvent",
+ super().fetch_event(),
+ )
+
+ def fetch_related_object(self) -> "ClaimableSandbox":
+ response = self._client.raw_request(
+ "get",
+ self.related_object.url,
+ stripe_context=self.context,
+ headers={"Stripe-Request-Trigger": f"event={self.id}"},
+ usage=["fetch_related_object"],
+ )
+ return cast(
+ "ClaimableSandbox",
+ self._client.deserialize(
+ response,
+ api_mode=get_api_mode(self.related_object.url),
+ ),
+ )
+
+ @override
+ async def fetch_event_async(self) -> "V2CoreClaimableSandboxExpiredEvent":
+ return cast(
+ "V2CoreClaimableSandboxExpiredEvent",
+ await super().fetch_event_async(),
+ )
+
+ async def fetch_related_object_async(self) -> "ClaimableSandbox":
+ response = await self._client.raw_request_async(
+ "get",
+ self.related_object.url,
+ stripe_context=self.context,
+ headers={"Stripe-Request-Trigger": f"event={self.id}"},
+ usage=["fetch_related_object"],
+ )
+ return cast(
+ "ClaimableSandbox",
+ self._client.deserialize(
+ response,
+ api_mode=get_api_mode(self.related_object.url),
+ ),
+ )
+
+
+class V2CoreClaimableSandboxExpiredEvent(Event):
+ LOOKUP_TYPE = "v2.core.claimable_sandbox.expired"
+ type: Literal["v2.core.claimable_sandbox.expired"]
+
+ class RelatedObject(StripeObject):
+ id: str
+ """
+ Unique identifier for the object relevant to the event.
+ """
+ type: str
+ """
+ Type of the object relevant to the event.
+ """
+ url: str
+ """
+ URL to retrieve the resource.
+ """
+
+ related_object: RelatedObject
+ """
+ Object containing the reference to API resource relevant to the event
+ """
+
+ def fetch_related_object(self) -> "ClaimableSandbox":
+ """
+ Retrieves the related object from the API. Makes an API request on every call.
+ """
+ return cast(
+ "ClaimableSandbox",
+ self._requestor.request(
+ "get",
+ self.related_object.url,
+ base_address="api",
+ options={
+ "stripe_context": self.context,
+ "headers": {"Stripe-Request-Trigger": f"event={self.id}"},
+ },
+ ),
+ )
diff --git a/stripe/events/_v2_core_claimable_sandbox_expiring_event.py b/stripe/events/_v2_core_claimable_sandbox_expiring_event.py
new file mode 100644
index 000000000..9470c5a30
--- /dev/null
+++ b/stripe/events/_v2_core_claimable_sandbox_expiring_event.py
@@ -0,0 +1,113 @@
+# -*- coding: utf-8 -*-
+# File generated from our OpenAPI spec
+from stripe._stripe_object import StripeObject
+from stripe._util import get_api_mode
+from stripe.v2.core._event import Event, EventNotification, RelatedObject
+from typing import Any, Dict, cast
+from typing_extensions import Literal, TYPE_CHECKING, override
+
+if TYPE_CHECKING:
+ from stripe._stripe_client import StripeClient
+ from stripe.v2.core._claimable_sandbox import ClaimableSandbox
+
+
+class V2CoreClaimableSandboxExpiringEventNotification(EventNotification):
+ LOOKUP_TYPE = "v2.core.claimable_sandbox.expiring"
+ type: Literal["v2.core.claimable_sandbox.expiring"]
+ related_object: RelatedObject
+
+ def __init__(
+ self, parsed_body: Dict[str, Any], client: "StripeClient"
+ ) -> None:
+ super().__init__(
+ parsed_body,
+ client,
+ )
+ self.related_object = RelatedObject(parsed_body["related_object"])
+
+ @override
+ def fetch_event(self) -> "V2CoreClaimableSandboxExpiringEvent":
+ return cast(
+ "V2CoreClaimableSandboxExpiringEvent",
+ super().fetch_event(),
+ )
+
+ def fetch_related_object(self) -> "ClaimableSandbox":
+ response = self._client.raw_request(
+ "get",
+ self.related_object.url,
+ stripe_context=self.context,
+ headers={"Stripe-Request-Trigger": f"event={self.id}"},
+ usage=["fetch_related_object"],
+ )
+ return cast(
+ "ClaimableSandbox",
+ self._client.deserialize(
+ response,
+ api_mode=get_api_mode(self.related_object.url),
+ ),
+ )
+
+ @override
+ async def fetch_event_async(self) -> "V2CoreClaimableSandboxExpiringEvent":
+ return cast(
+ "V2CoreClaimableSandboxExpiringEvent",
+ await super().fetch_event_async(),
+ )
+
+ async def fetch_related_object_async(self) -> "ClaimableSandbox":
+ response = await self._client.raw_request_async(
+ "get",
+ self.related_object.url,
+ stripe_context=self.context,
+ headers={"Stripe-Request-Trigger": f"event={self.id}"},
+ usage=["fetch_related_object"],
+ )
+ return cast(
+ "ClaimableSandbox",
+ self._client.deserialize(
+ response,
+ api_mode=get_api_mode(self.related_object.url),
+ ),
+ )
+
+
+class V2CoreClaimableSandboxExpiringEvent(Event):
+ LOOKUP_TYPE = "v2.core.claimable_sandbox.expiring"
+ type: Literal["v2.core.claimable_sandbox.expiring"]
+
+ class RelatedObject(StripeObject):
+ id: str
+ """
+ Unique identifier for the object relevant to the event.
+ """
+ type: str
+ """
+ Type of the object relevant to the event.
+ """
+ url: str
+ """
+ URL to retrieve the resource.
+ """
+
+ related_object: RelatedObject
+ """
+ Object containing the reference to API resource relevant to the event
+ """
+
+ def fetch_related_object(self) -> "ClaimableSandbox":
+ """
+ Retrieves the related object from the API. Makes an API request on every call.
+ """
+ return cast(
+ "ClaimableSandbox",
+ self._requestor.request(
+ "get",
+ self.related_object.url,
+ base_address="api",
+ options={
+ "stripe_context": self.context,
+ "headers": {"Stripe-Request-Trigger": f"event={self.id}"},
+ },
+ ),
+ )
diff --git a/stripe/events/_v2_core_claimable_sandbox_updated_event.py b/stripe/events/_v2_core_claimable_sandbox_updated_event.py
new file mode 100644
index 000000000..4dfff6379
--- /dev/null
+++ b/stripe/events/_v2_core_claimable_sandbox_updated_event.py
@@ -0,0 +1,113 @@
+# -*- coding: utf-8 -*-
+# File generated from our OpenAPI spec
+from stripe._stripe_object import StripeObject
+from stripe._util import get_api_mode
+from stripe.v2.core._event import Event, EventNotification, RelatedObject
+from typing import Any, Dict, cast
+from typing_extensions import Literal, TYPE_CHECKING, override
+
+if TYPE_CHECKING:
+ from stripe._stripe_client import StripeClient
+ from stripe.v2.core._claimable_sandbox import ClaimableSandbox
+
+
+class V2CoreClaimableSandboxUpdatedEventNotification(EventNotification):
+ LOOKUP_TYPE = "v2.core.claimable_sandbox.updated"
+ type: Literal["v2.core.claimable_sandbox.updated"]
+ related_object: RelatedObject
+
+ def __init__(
+ self, parsed_body: Dict[str, Any], client: "StripeClient"
+ ) -> None:
+ super().__init__(
+ parsed_body,
+ client,
+ )
+ self.related_object = RelatedObject(parsed_body["related_object"])
+
+ @override
+ def fetch_event(self) -> "V2CoreClaimableSandboxUpdatedEvent":
+ return cast(
+ "V2CoreClaimableSandboxUpdatedEvent",
+ super().fetch_event(),
+ )
+
+ def fetch_related_object(self) -> "ClaimableSandbox":
+ response = self._client.raw_request(
+ "get",
+ self.related_object.url,
+ stripe_context=self.context,
+ headers={"Stripe-Request-Trigger": f"event={self.id}"},
+ usage=["fetch_related_object"],
+ )
+ return cast(
+ "ClaimableSandbox",
+ self._client.deserialize(
+ response,
+ api_mode=get_api_mode(self.related_object.url),
+ ),
+ )
+
+ @override
+ async def fetch_event_async(self) -> "V2CoreClaimableSandboxUpdatedEvent":
+ return cast(
+ "V2CoreClaimableSandboxUpdatedEvent",
+ await super().fetch_event_async(),
+ )
+
+ async def fetch_related_object_async(self) -> "ClaimableSandbox":
+ response = await self._client.raw_request_async(
+ "get",
+ self.related_object.url,
+ stripe_context=self.context,
+ headers={"Stripe-Request-Trigger": f"event={self.id}"},
+ usage=["fetch_related_object"],
+ )
+ return cast(
+ "ClaimableSandbox",
+ self._client.deserialize(
+ response,
+ api_mode=get_api_mode(self.related_object.url),
+ ),
+ )
+
+
+class V2CoreClaimableSandboxUpdatedEvent(Event):
+ LOOKUP_TYPE = "v2.core.claimable_sandbox.updated"
+ type: Literal["v2.core.claimable_sandbox.updated"]
+
+ class RelatedObject(StripeObject):
+ id: str
+ """
+ Unique identifier for the object relevant to the event.
+ """
+ type: str
+ """
+ Type of the object relevant to the event.
+ """
+ url: str
+ """
+ URL to retrieve the resource.
+ """
+
+ related_object: RelatedObject
+ """
+ Object containing the reference to API resource relevant to the event
+ """
+
+ def fetch_related_object(self) -> "ClaimableSandbox":
+ """
+ Retrieves the related object from the API. Makes an API request on every call.
+ """
+ return cast(
+ "ClaimableSandbox",
+ self._requestor.request(
+ "get",
+ self.related_object.url,
+ base_address="api",
+ options={
+ "stripe_context": self.context,
+ "headers": {"Stripe-Request-Trigger": f"event={self.id}"},
+ },
+ ),
+ )
diff --git a/stripe/events/_v2_core_health_event_generation_failure_resolved_event.py b/stripe/events/_v2_core_health_event_generation_failure_resolved_event.py
index 12c4163a6..4c62bcd0f 100644
--- a/stripe/events/_v2_core_health_event_generation_failure_resolved_event.py
+++ b/stripe/events/_v2_core_health_event_generation_failure_resolved_event.py
@@ -4,7 +4,7 @@
from stripe._stripe_object import StripeObject
from stripe._stripe_response import StripeResponse
from stripe.v2.core._event import Event, EventNotification
-from typing import Any, Dict, Optional, cast
+from typing import Any, Dict, Optional, Union, cast
from typing_extensions import Literal, TYPE_CHECKING, override
if TYPE_CHECKING:
@@ -84,6 +84,10 @@ class RelatedObject(StripeObject):
"""
The time when the user experience has returned to expected levels.
"""
+ severity: Union[Literal["critical", "non_critical"], str]
+ """
+ The severity of the alert.
+ """
summary: str
"""
A short description of the alert.
diff --git a/stripe/issuing/_card.py b/stripe/issuing/_card.py
index e98f5b0ec..8fd59e1c5 100644
--- a/stripe/issuing/_card.py
+++ b/stripe/issuing/_card.py
@@ -1321,7 +1321,7 @@ class GooglePay(StripeObject):
"""
latest_fraud_warning: Optional[LatestFraudWarning]
"""
- Stripe's assessment of whether this card's details have been compromised. If this property isn't null, cancel and reissue the card to prevent fraudulent activity risk.
+ Stripe's assessment of whether this card's details have been compromised. If this property isn't null, cancel and reissue the card to reduce the risk of fraudulent activity. Stripe may remove a fraud warning if the cardholder confirms that the activity on the card is legitimate.
"""
lifecycle_controls: Optional[LifecycleControls]
"""
diff --git a/stripe/params/__init__.py b/stripe/params/__init__.py
index 79f9dd6af..ccf860ec2 100644
--- a/stripe/params/__init__.py
+++ b/stripe/params/__init__.py
@@ -1055,6 +1055,8 @@
CouponCreateParams as CouponCreateParams,
CouponCreateParamsAppliesTo as CouponCreateParamsAppliesTo,
CouponCreateParamsCurrencyOptions as CouponCreateParamsCurrencyOptions,
+ CouponCreateParamsCustom as CouponCreateParamsCustom,
+ CouponCreateParamsCustomExtension as CouponCreateParamsCustomExtension,
CouponCreateParamsScript as CouponCreateParamsScript,
)
from stripe.params._coupon_delete_params import (
@@ -1131,6 +1133,7 @@
)
from stripe.params._customer_balance_transaction_create_params import (
CustomerBalanceTransactionCreateParams as CustomerBalanceTransactionCreateParams,
+ CustomerBalanceTransactionCreateParamsAppliedToInvoice as CustomerBalanceTransactionCreateParamsAppliedToInvoice,
)
from stripe.params._customer_balance_transaction_list_params import (
CustomerBalanceTransactionListParams as CustomerBalanceTransactionListParams,
@@ -1157,6 +1160,7 @@
)
from stripe.params._customer_create_balance_transaction_params import (
CustomerCreateBalanceTransactionParams as CustomerCreateBalanceTransactionParams,
+ CustomerCreateBalanceTransactionParamsAppliedToInvoice as CustomerCreateBalanceTransactionParamsAppliedToInvoice,
)
from stripe.params._customer_create_funding_instructions_params import (
CustomerCreateFundingInstructionsParams as CustomerCreateFundingInstructionsParams,
@@ -9389,6 +9393,11 @@
"stripe.params._coupon_create_params",
False,
),
+ "CouponCreateParamsCustom": ("stripe.params._coupon_create_params", False),
+ "CouponCreateParamsCustomExtension": (
+ "stripe.params._coupon_create_params",
+ False,
+ ),
"CouponCreateParamsScript": ("stripe.params._coupon_create_params", False),
"CouponDeleteParams": ("stripe.params._coupon_delete_params", False),
"CouponListParams": ("stripe.params._coupon_list_params", False),
@@ -9533,6 +9542,10 @@
"stripe.params._customer_balance_transaction_create_params",
False,
),
+ "CustomerBalanceTransactionCreateParamsAppliedToInvoice": (
+ "stripe.params._customer_balance_transaction_create_params",
+ False,
+ ),
"CustomerBalanceTransactionListParams": (
"stripe.params._customer_balance_transaction_list_params",
False,
@@ -9573,6 +9586,10 @@
"stripe.params._customer_create_balance_transaction_params",
False,
),
+ "CustomerCreateBalanceTransactionParamsAppliedToInvoice": (
+ "stripe.params._customer_create_balance_transaction_params",
+ False,
+ ),
"CustomerCreateFundingInstructionsParams": (
"stripe.params._customer_create_funding_instructions_params",
False,
diff --git a/stripe/params/_coupon_create_params.py b/stripe/params/_coupon_create_params.py
index 0164fb2c8..52b173f16 100644
--- a/stripe/params/_coupon_create_params.py
+++ b/stripe/params/_coupon_create_params.py
@@ -25,6 +25,10 @@ class CouponCreateParams(RequestOptions):
"""
Coupons defined in each available currency option (only supported if `amount_off` is passed). Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
"""
+ custom: NotRequired["CouponCreateParamsCustom"]
+ """
+ The custom coupon calculation configuration.
+ """
duration: NotRequired["Literal['forever', 'once', 'repeating']|str"]
"""
Specifies how long the discount will be in effect if used on a subscription. Defaults to `once`.
@@ -67,12 +71,16 @@ class CouponCreateParams(RequestOptions):
"""
Configuration of the [script](https://docs.stripe.com/billing/subscriptions/script-coupons) used to calculate the discount.
"""
+ type: NotRequired[Literal["custom"]]
+ """
+ The coupon calculation type. Must be `custom` when `custom` is provided.
+ """
class CouponCreateParamsAppliesTo(TypedDict):
products: NotRequired[List[str]]
"""
- An array of Product IDs that this Coupon will apply to.
+ An array of up to 100 Product IDs that this Coupon will apply to.
"""
@@ -83,6 +91,28 @@ class CouponCreateParamsCurrencyOptions(TypedDict):
"""
+class CouponCreateParamsCustom(TypedDict):
+ configuration: NotRequired["Dict[str, Any]|UntypedStripeObject[Any]"]
+ """
+ The configuration values of the extension. The keys and values are specific to the extension implementation. May be omitted for extensions that have no configuration schema, in which case an empty configuration is used.
+ """
+ extension: "CouponCreateParamsCustomExtension"
+ """
+ The extension used to calculate the coupon.
+ """
+
+
+class CouponCreateParamsCustomExtension(TypedDict):
+ id: str
+ """
+ The Extension Prototype ID.
+ """
+ version: NotRequired[str]
+ """
+ The semantic version of the extension.
+ """
+
+
class CouponCreateParamsScript(TypedDict):
configuration: "Dict[str, Any]|UntypedStripeObject[Any]"
"""
diff --git a/stripe/params/_customer_balance_transaction_create_params.py b/stripe/params/_customer_balance_transaction_create_params.py
index 80acdcf8f..c39ba6453 100644
--- a/stripe/params/_customer_balance_transaction_create_params.py
+++ b/stripe/params/_customer_balance_transaction_create_params.py
@@ -10,6 +10,12 @@ class CustomerBalanceTransactionCreateParams(TypedDict):
"""
The integer amount in **cents (or local equivalent)** to apply to the customer's credit balance.
"""
+ applied_to_invoice: NotRequired[
+ "CustomerBalanceTransactionCreateParamsAppliedToInvoice"
+ ]
+ """
+ Required when `type` is `applied_to_invoice`. Identifies the open invoice to apply the customer's balance credit to.
+ """
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). Specifies the [`invoice_credit_balance`](https://docs.stripe.com/api/customers/object#customer_object-invoice_credit_balance) that this transaction will apply to. If the customer's `currency` is not set, it will be updated to this value.
@@ -28,3 +34,14 @@ class CustomerBalanceTransactionCreateParams(TypedDict):
"""
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. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
"""
+ type: NotRequired["Literal['adjustment', 'applied_to_invoice']|str"]
+ """
+ The type of customer balance transaction. Defaults to `adjustment`, which updates the customer's credit balance directly. Set to `applied_to_invoice` to apply the customer's existing credit balance to a specific open invoice.
+ """
+
+
+class CustomerBalanceTransactionCreateParamsAppliedToInvoice(TypedDict):
+ invoice: str
+ """
+ The ID of the open invoice to apply the customer's balance credit to.
+ """
diff --git a/stripe/params/_customer_create_balance_transaction_params.py b/stripe/params/_customer_create_balance_transaction_params.py
index b2b17c6df..4107c1e82 100644
--- a/stripe/params/_customer_create_balance_transaction_params.py
+++ b/stripe/params/_customer_create_balance_transaction_params.py
@@ -3,7 +3,7 @@
from stripe._request_options import RequestOptions
from stripe._stripe_object import UntypedStripeObject
from typing import Dict, List
-from typing_extensions import Literal, NotRequired
+from typing_extensions import Literal, NotRequired, TypedDict
class CustomerCreateBalanceTransactionParams(RequestOptions):
@@ -11,6 +11,12 @@ class CustomerCreateBalanceTransactionParams(RequestOptions):
"""
The integer amount in **cents (or local equivalent)** to apply to the customer's credit balance.
"""
+ applied_to_invoice: NotRequired[
+ "CustomerCreateBalanceTransactionParamsAppliedToInvoice"
+ ]
+ """
+ Required when `type` is `applied_to_invoice`. Identifies the open invoice to apply the customer's balance credit to.
+ """
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). Specifies the [`invoice_credit_balance`](https://docs.stripe.com/api/customers/object#customer_object-invoice_credit_balance) that this transaction will apply to. If the customer's `currency` is not set, it will be updated to this value.
@@ -29,3 +35,14 @@ class CustomerCreateBalanceTransactionParams(RequestOptions):
"""
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. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
"""
+ type: NotRequired["Literal['adjustment', 'applied_to_invoice']|str"]
+ """
+ The type of customer balance transaction. Defaults to `adjustment`, which updates the customer's credit balance directly. Set to `applied_to_invoice` to apply the customer's existing credit balance to a specific open invoice.
+ """
+
+
+class CustomerCreateBalanceTransactionParamsAppliedToInvoice(TypedDict):
+ invoice: str
+ """
+ The ID of the open invoice to apply the customer's balance credit to.
+ """
diff --git a/stripe/params/_fx_quote_create_params.py b/stripe/params/_fx_quote_create_params.py
index a6163d467..7711a72f9 100644
--- a/stripe/params/_fx_quote_create_params.py
+++ b/stripe/params/_fx_quote_create_params.py
@@ -12,7 +12,7 @@ class FxQuoteCreateParams(RequestOptions):
"""
from_currencies: List[str]
"""
- A list of three letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be [supported currencies](https://stripe.com/docs/currencies).
+ A list of three letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be [supported currencies](https://stripe.com/docs/currencies). Payout-only currencies are also supported, but only for informational quotes (`lock_duration=none`).
"""
lock_duration: Union[Literal["day", "five_minutes", "hour", "none"], str]
"""
@@ -20,7 +20,7 @@ class FxQuoteCreateParams(RequestOptions):
"""
to_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).
+ 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). Payout-only currencies are also supported, but only for informational quotes (`lock_duration=none`).
"""
usage: NotRequired["FxQuoteCreateParamsUsage"]
"""
@@ -40,8 +40,6 @@ class FxQuoteCreateParamsUsage(TypedDict):
type: Union[Literal["payment", "transfer"], str]
"""
Which transaction the FX Quote will be used for
-
- Can be “payment” | “transfer”
"""
diff --git a/stripe/params/_invoice_item_create_params.py b/stripe/params/_invoice_item_create_params.py
index 2c123526c..e9c1addda 100644
--- a/stripe/params/_invoice_item_create_params.py
+++ b/stripe/params/_invoice_item_create_params.py
@@ -76,7 +76,7 @@ class InvoiceItemCreateParams(RequestOptions):
"""
subscription: NotRequired[str]
"""
- The ID of a subscription to add this invoice item to. When left blank, the invoice item is added to the next upcoming scheduled invoice. When set, scheduled invoices for subscriptions other than the specified subscription will ignore the invoice item. Use this when you want to express that an invoice item has been accrued within the context of a particular subscription.
+ The ID of a subscription to add this invoice item to. When left blank, the invoice item is added to the next upcoming scheduled invoice. When set, scheduled invoices for subscriptions other than the specified subscription will ignore the invoice item. Use this when you want to express that an invoice item has been accrued within the context of a particular subscription. You can use this parameter with either `customer` or `customer_account`. The subscription must belong to the customer you specify.
"""
tax_behavior: NotRequired[
"Literal['exclusive', 'inclusive', 'unspecified']|str"
diff --git a/stripe/params/_payment_intent_create_params.py b/stripe/params/_payment_intent_create_params.py
index b35abb5ba..c8aa548b5 100644
--- a/stripe/params/_payment_intent_create_params.py
+++ b/stripe/params/_payment_intent_create_params.py
@@ -360,7 +360,7 @@ class PaymentIntentCreateParams(RequestOptions):
"""
statement_descriptor_suffix: NotRequired[str]
"""
- Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement.
+ Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. A suffix longer than 22 characters returns an error. If a valid suffix makes the complete statement descriptor longer than 22 characters, Stripe truncates the descriptor instead of returning an error. Learn how to [fit the suffix in the complete descriptor](https://docs.stripe.com/get-started/account/statement-descriptors#suffix-length).
"""
transfer_data: NotRequired["PaymentIntentCreateParamsTransferData"]
"""
diff --git a/stripe/params/_payment_intent_modify_params.py b/stripe/params/_payment_intent_modify_params.py
index cc06e7d45..60daa38ab 100644
--- a/stripe/params/_payment_intent_modify_params.py
+++ b/stripe/params/_payment_intent_modify_params.py
@@ -245,7 +245,7 @@ class PaymentIntentModifyParams(RequestOptions):
"""
statement_descriptor_suffix: NotRequired[str]
"""
- Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement.
+ Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. A suffix longer than 22 characters returns an error. If a valid suffix makes the complete statement descriptor longer than 22 characters, Stripe truncates the descriptor instead of returning an error. Learn how to [fit the suffix in the complete descriptor](https://docs.stripe.com/get-started/account/statement-descriptors#suffix-length).
"""
transfer_data: NotRequired["PaymentIntentModifyParamsTransferData"]
"""
diff --git a/stripe/params/_payment_intent_update_params.py b/stripe/params/_payment_intent_update_params.py
index 7c915461a..423a632f7 100644
--- a/stripe/params/_payment_intent_update_params.py
+++ b/stripe/params/_payment_intent_update_params.py
@@ -244,7 +244,7 @@ class PaymentIntentUpdateParams(TypedDict):
"""
statement_descriptor_suffix: NotRequired[str]
"""
- Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement.
+ Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. A suffix longer than 22 characters returns an error. If a valid suffix makes the complete statement descriptor longer than 22 characters, Stripe truncates the descriptor instead of returning an error. Learn how to [fit the suffix in the complete descriptor](https://docs.stripe.com/get-started/account/statement-descriptors#suffix-length).
"""
transfer_data: NotRequired["PaymentIntentUpdateParamsTransferData"]
"""
diff --git a/stripe/params/_payment_link_create_params.py b/stripe/params/_payment_link_create_params.py
index 4a9df815d..e993fe323 100644
--- a/stripe/params/_payment_link_create_params.py
+++ b/stripe/params/_payment_link_create_params.py
@@ -739,7 +739,7 @@ class PaymentLinkCreateParamsOptionalItemAdjustableQuantity(TypedDict):
class PaymentLinkCreateParamsPaymentIntentData(TypedDict):
capture_method: NotRequired[
- "Literal['automatic', 'automatic_async', 'manual']|str"
+ "Literal['']|Literal['automatic', 'automatic_async', 'manual']|str"
]
"""
Controls when the funds will be captured from the customer's account.
diff --git a/stripe/params/_payment_link_modify_params.py b/stripe/params/_payment_link_modify_params.py
index d7f3ee6f7..a393f21fb 100644
--- a/stripe/params/_payment_link_modify_params.py
+++ b/stripe/params/_payment_link_modify_params.py
@@ -586,6 +586,12 @@ class PaymentLinkModifyParamsOptionalItemAdjustableQuantity(TypedDict):
class PaymentLinkModifyParamsPaymentIntentData(TypedDict):
+ capture_method: NotRequired[
+ "Literal['']|Literal['automatic', 'automatic_async', 'manual']|str"
+ ]
+ """
+ Controls when the funds will be captured from the customer's account.
+ """
description: NotRequired["Literal['']|str"]
"""
An arbitrary string attached to the object. Often useful for displaying to users.
diff --git a/stripe/params/_payment_link_update_params.py b/stripe/params/_payment_link_update_params.py
index 60ba2157d..c62c3c711 100644
--- a/stripe/params/_payment_link_update_params.py
+++ b/stripe/params/_payment_link_update_params.py
@@ -585,6 +585,12 @@ class PaymentLinkUpdateParamsOptionalItemAdjustableQuantity(TypedDict):
class PaymentLinkUpdateParamsPaymentIntentData(TypedDict):
+ capture_method: NotRequired[
+ "Literal['']|Literal['automatic', 'automatic_async', 'manual']|str"
+ ]
+ """
+ Controls when the funds will be captured from the customer's account.
+ """
description: NotRequired["Literal['']|str"]
"""
An arbitrary string attached to the object. Often useful for displaying to users.
diff --git a/stripe/params/_product_create_params.py b/stripe/params/_product_create_params.py
index 70db0ded7..eb5185ef5 100644
--- a/stripe/params/_product_create_params.py
+++ b/stripe/params/_product_create_params.py
@@ -228,6 +228,10 @@ class ProductCreateParamsDefaultPriceDataRecurring(TypedDict):
class ProductCreateParamsMarketingFeature(TypedDict):
+ loss_message: NotRequired["Literal['']|str"]
+ """
+ Optional text that describes what a customer loses by canceling, shown for this marketing feature in the Customer Portal cancellation flow. Up to 80 characters long. If you omit it when you update `marketing_features`, Stripe keeps the message stored for the feature with the same name. Duplicate names are matched in order. Set it to an empty string to remove the override. When no override is stored, eligible cancellation flows use the marketing feature name. A renamed feature is treated as a new feature, so send the message again to keep it.
+ """
name: str
"""
The marketing feature name. Up to 80 characters long.
diff --git a/stripe/params/_product_modify_params.py b/stripe/params/_product_modify_params.py
index 6aab00d0a..9e9c76a38 100644
--- a/stripe/params/_product_modify_params.py
+++ b/stripe/params/_product_modify_params.py
@@ -79,6 +79,10 @@ class ProductModifyParams(RequestOptions):
class ProductModifyParamsMarketingFeature(TypedDict):
+ loss_message: NotRequired["Literal['']|str"]
+ """
+ Optional text that describes what a customer loses by canceling, shown for this marketing feature in the Customer Portal cancellation flow. Up to 80 characters long. If you omit it when you update `marketing_features`, Stripe keeps the message stored for the feature with the same name. Duplicate names are matched in order. Set it to an empty string to remove the override. When no override is stored, eligible cancellation flows use the marketing feature name. A renamed feature is treated as a new feature, so send the message again to keep it.
+ """
name: str
"""
The marketing feature name. Up to 80 characters long.
diff --git a/stripe/params/_product_update_params.py b/stripe/params/_product_update_params.py
index a3605914f..47383ab40 100644
--- a/stripe/params/_product_update_params.py
+++ b/stripe/params/_product_update_params.py
@@ -78,6 +78,10 @@ class ProductUpdateParams(TypedDict):
class ProductUpdateParamsMarketingFeature(TypedDict):
+ loss_message: NotRequired["Literal['']|str"]
+ """
+ Optional text that describes what a customer loses by canceling, shown for this marketing feature in the Customer Portal cancellation flow. Up to 80 characters long. If you omit it when you update `marketing_features`, Stripe keeps the message stored for the feature with the same name. Duplicate names are matched in order. Set it to an empty string to remove the override. When no override is stored, eligible cancellation flows use the marketing feature name. A renamed feature is treated as a new feature, so send the message again to keep it.
+ """
name: str
"""
The marketing feature name. Up to 80 characters long.
diff --git a/stripe/params/_quote_create_params.py b/stripe/params/_quote_create_params.py
index eeb0a3399..190d2047e 100644
--- a/stripe/params/_quote_create_params.py
+++ b/stripe/params/_quote_create_params.py
@@ -240,7 +240,7 @@ class QuoteCreateParamsLineItem(TypedDict):
"Literal['']|List[QuoteCreateParamsLineItemDiscount]"
]
"""
- The discounts applied to this line item.
+ The discounts applied to this line item. Repeating coupons are only supported for recurring prices.
"""
price: NotRequired[str]
"""
diff --git a/stripe/params/_quote_modify_params.py b/stripe/params/_quote_modify_params.py
index 590c23cbc..68023d538 100644
--- a/stripe/params/_quote_modify_params.py
+++ b/stripe/params/_quote_modify_params.py
@@ -221,7 +221,7 @@ class QuoteModifyParamsLineItem(TypedDict):
"Literal['']|List[QuoteModifyParamsLineItemDiscount]"
]
"""
- The discounts applied to this line item.
+ The discounts applied to this line item. Repeating coupons are only supported for recurring prices.
"""
id: NotRequired[str]
"""
diff --git a/stripe/params/_quote_update_params.py b/stripe/params/_quote_update_params.py
index 32cc3154e..aa8cd9605 100644
--- a/stripe/params/_quote_update_params.py
+++ b/stripe/params/_quote_update_params.py
@@ -220,7 +220,7 @@ class QuoteUpdateParamsLineItem(TypedDict):
"Literal['']|List[QuoteUpdateParamsLineItemDiscount]"
]
"""
- The discounts applied to this line item.
+ The discounts applied to this line item. Repeating coupons are only supported for recurring prices.
"""
id: NotRequired[str]
"""
diff --git a/stripe/params/_webhook_endpoint_create_params.py b/stripe/params/_webhook_endpoint_create_params.py
index 4dd01374d..b9ee3e1b4 100644
--- a/stripe/params/_webhook_endpoint_create_params.py
+++ b/stripe/params/_webhook_endpoint_create_params.py
@@ -138,6 +138,7 @@ class WebhookEndpointCreateParams(RequestOptions):
"2026-08-26.dahlia",
"2026-09-30.endive",
"2026-10-28.endive",
+ "2026-11-18.endive",
]
]
"""
diff --git a/stripe/params/billing_portal/_configuration_create_params.py b/stripe/params/billing_portal/_configuration_create_params.py
index ce572f74e..d880749f5 100644
--- a/stripe/params/billing_portal/_configuration_create_params.py
+++ b/stripe/params/billing_portal/_configuration_create_params.py
@@ -243,7 +243,7 @@ class ConfigurationCreateParamsFeaturesSubscriptionUpdate(TypedDict):
"Literal['always_invoice', 'create_prorations', 'none']|str"
]
"""
- Determines how to handle prorations resulting from subscription updates. Valid values are `none`, `create_prorations`, and `always_invoice`.
+ Determines how to handle prorations resulting from subscription updates. Valid values are `none`, `create_prorations`, and `always_invoice`. Defaults to `none`.
"""
schedule_at_period_end: NotRequired[
"ConfigurationCreateParamsFeaturesSubscriptionUpdateScheduleAtPeriodEnd"
diff --git a/stripe/params/billing_portal/_configuration_modify_params.py b/stripe/params/billing_portal/_configuration_modify_params.py
index 9ecbaa883..527160b53 100644
--- a/stripe/params/billing_portal/_configuration_modify_params.py
+++ b/stripe/params/billing_portal/_configuration_modify_params.py
@@ -234,7 +234,7 @@ class ConfigurationModifyParamsFeaturesSubscriptionUpdate(TypedDict):
"Literal['always_invoice', 'create_prorations', 'none']|str"
]
"""
- Determines how to handle prorations resulting from subscription updates. Valid values are `none`, `create_prorations`, and `always_invoice`.
+ Determines how to handle prorations resulting from subscription updates. Valid values are `none`, `create_prorations`, and `always_invoice`. If omitted, the proration behavior is unchanged.
"""
schedule_at_period_end: NotRequired[
"ConfigurationModifyParamsFeaturesSubscriptionUpdateScheduleAtPeriodEnd"
diff --git a/stripe/params/billing_portal/_configuration_update_params.py b/stripe/params/billing_portal/_configuration_update_params.py
index 59675a905..907382b5e 100644
--- a/stripe/params/billing_portal/_configuration_update_params.py
+++ b/stripe/params/billing_portal/_configuration_update_params.py
@@ -233,7 +233,7 @@ class ConfigurationUpdateParamsFeaturesSubscriptionUpdate(TypedDict):
"Literal['always_invoice', 'create_prorations', 'none']|str"
]
"""
- Determines how to handle prorations resulting from subscription updates. Valid values are `none`, `create_prorations`, and `always_invoice`.
+ Determines how to handle prorations resulting from subscription updates. Valid values are `none`, `create_prorations`, and `always_invoice`. If omitted, the proration behavior is unchanged.
"""
schedule_at_period_end: NotRequired[
"ConfigurationUpdateParamsFeaturesSubscriptionUpdateScheduleAtPeriodEnd"
diff --git a/stripe/params/capital/__init__.py b/stripe/params/capital/__init__.py
index fbc2f7974..9663e6565 100644
--- a/stripe/params/capital/__init__.py
+++ b/stripe/params/capital/__init__.py
@@ -4,6 +4,9 @@
from typing_extensions import TYPE_CHECKING
if TYPE_CHECKING:
+ from stripe.params.capital._financing_offer_create_params import (
+ FinancingOfferCreateParams as FinancingOfferCreateParams,
+ )
from stripe.params.capital._financing_offer_list_params import (
FinancingOfferListParams as FinancingOfferListParams,
FinancingOfferListParamsCreated as FinancingOfferListParamsCreated,
@@ -11,6 +14,9 @@
from stripe.params.capital._financing_offer_mark_delivered_params import (
FinancingOfferMarkDeliveredParams as FinancingOfferMarkDeliveredParams,
)
+ from stripe.params.capital._financing_offer_refill_params import (
+ FinancingOfferRefillParams as FinancingOfferRefillParams,
+ )
from stripe.params.capital._financing_offer_retrieve_params import (
FinancingOfferRetrieveParams as FinancingOfferRetrieveParams,
)
@@ -26,6 +32,10 @@
# name -> (import_target, is_submodule)
_import_map = {
+ "FinancingOfferCreateParams": (
+ "stripe.params.capital._financing_offer_create_params",
+ False,
+ ),
"FinancingOfferListParams": (
"stripe.params.capital._financing_offer_list_params",
False,
@@ -38,6 +48,10 @@
"stripe.params.capital._financing_offer_mark_delivered_params",
False,
),
+ "FinancingOfferRefillParams": (
+ "stripe.params.capital._financing_offer_refill_params",
+ False,
+ ),
"FinancingOfferRetrieveParams": (
"stripe.params.capital._financing_offer_retrieve_params",
False,
diff --git a/stripe/params/capital/_financing_offer_create_params.py b/stripe/params/capital/_financing_offer_create_params.py
new file mode 100644
index 000000000..8c0cf1b2a
--- /dev/null
+++ b/stripe/params/capital/_financing_offer_create_params.py
@@ -0,0 +1,36 @@
+# -*- coding: utf-8 -*-
+# File generated from our OpenAPI spec
+from stripe._request_options import RequestOptions
+from typing import List, Union
+from typing_extensions import Literal, NotRequired
+
+
+class FinancingOfferCreateParams(RequestOptions):
+ advance_amount: int
+ """
+ Amount of financing offered, in minor units. For example, 1,000 USD is represented as 100000.
+ """
+ expand: NotRequired[List[str]]
+ """
+ Specifies which fields in the response should be expanded.
+ """
+ fee_amount: int
+ """
+ Fixed fee amount, in minor units. For example, 100 USD is represented as 10000.
+ """
+ financing_type: Union[
+ Literal["cash_advance", "fixed_term_loan", "flex_loan"], str
+ ]
+ """
+ The type of financing offer.
+ """
+ status: NotRequired[
+ "Literal['accepted', 'accepted_other_offer', 'canceled', 'completed', 'delivered', 'expired', 'fully_repaid', 'paid_out', 'rejected', 'replaced', 'undelivered']|str"
+ ]
+ """
+ The status of the financing offer.
+ """
+ withhold_rate: float
+ """
+ Per-transaction rate at which Stripe withholds funds to repay the financing.
+ """
diff --git a/stripe/params/capital/_financing_offer_refill_params.py b/stripe/params/capital/_financing_offer_refill_params.py
new file mode 100644
index 000000000..55042c718
--- /dev/null
+++ b/stripe/params/capital/_financing_offer_refill_params.py
@@ -0,0 +1,36 @@
+# -*- coding: utf-8 -*-
+# File generated from our OpenAPI spec
+from stripe._request_options import RequestOptions
+from typing import List, Union
+from typing_extensions import Literal, NotRequired
+
+
+class FinancingOfferRefillParams(RequestOptions):
+ advance_amount: int
+ """
+ Amount of financing offered, in minor units. For example, 1,000 USD is represented as 100000.
+ """
+ expand: NotRequired[List[str]]
+ """
+ Specifies which fields in the response should be expanded.
+ """
+ fee_amount: int
+ """
+ Fixed fee amount, in minor units. For example, 100 USD is represented as 10000.
+ """
+ financing_type: Union[
+ Literal["cash_advance", "fixed_term_loan", "flex_loan"], str
+ ]
+ """
+ The type of financing offer
+ """
+ status: NotRequired[
+ "Literal['accepted', 'accepted_other_offer', 'canceled', 'completed', 'delivered', 'expired', 'fully_repaid', 'paid_out', 'rejected', 'replaced', 'undelivered']|str"
+ ]
+ """
+ The status of the financing offer
+ """
+ withhold_rate: float
+ """
+ Per-transaction rate at which Stripe withholds funds to repay the financing.
+ """
diff --git a/stripe/params/checkout/_session_create_params.py b/stripe/params/checkout/_session_create_params.py
index 585bcffd9..84a9480f1 100644
--- a/stripe/params/checkout/_session_create_params.py
+++ b/stripe/params/checkout/_session_create_params.py
@@ -461,6 +461,14 @@ class SessionCreateParamsAfterExpirationRecovery(TypedDict):
class SessionCreateParamsAutomaticTax(TypedDict):
+ address_collection_precision: NotRequired[Literal["full", "minimal"]]
+ """
+ Controls how much address information Checkout collects when [automatic_tax](https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-automatic_tax-enabled) is enabled.
+
+ Defaults to `full`, which collects the address fields needed for the most accurate tax calculation. Set to `minimal` to collect only the fields required for tax in the buyer's country, accepting potentially less precise tax calculation in exchange for a streamlined form.
+
+ Only honored when `automatic_tax.enabled` is `true`, `billing_address_collection` is `auto`, the resolved tax address source is the session billing address, and `ui_mode` is `form`.
+ """
enabled: bool
"""
Set to `true` to [calculate tax automatically](https://docs.stripe.com/tax) using the customer's location.
diff --git a/stripe/params/financial_connections/_session_create_params.py b/stripe/params/financial_connections/_session_create_params.py
index a7a4d990f..03e0d3eed 100644
--- a/stripe/params/financial_connections/_session_create_params.py
+++ b/stripe/params/financial_connections/_session_create_params.py
@@ -110,7 +110,7 @@ class SessionCreateParamsFilters(TypedDict):
"""
country: NotRequired[str]
"""
- Country from which to collect accounts.
+ Country from which to collect accounts. Supported values are `US` and `CA`.
"""
institution: NotRequired[str]
"""
diff --git a/stripe/params/reporting/_report_run_create_params.py b/stripe/params/reporting/_report_run_create_params.py
index d18cd5cea..e93153d79 100644
--- a/stripe/params/reporting/_report_run_create_params.py
+++ b/stripe/params/reporting/_report_run_create_params.py
@@ -51,6 +51,10 @@ class ReportRunCreateParamsParameters(TypedDict):
"""
Category of balance transactions to be included in the report run.
"""
+ tax_invoice_month: NotRequired[str]
+ """
+ The tax invoice month in YYYY-MM format.
+ """
timezone: NotRequired[
"Literal['Africa/Abidjan', 'Africa/Accra', 'Africa/Addis_Ababa', 'Africa/Algiers', 'Africa/Asmara', 'Africa/Asmera', 'Africa/Bamako', 'Africa/Bangui', 'Africa/Banjul', 'Africa/Bissau', 'Africa/Blantyre', 'Africa/Brazzaville', 'Africa/Bujumbura', 'Africa/Cairo', 'Africa/Casablanca', 'Africa/Ceuta', 'Africa/Conakry', 'Africa/Dakar', 'Africa/Dar_es_Salaam', 'Africa/Djibouti', 'Africa/Douala', 'Africa/El_Aaiun', 'Africa/Freetown', 'Africa/Gaborone', 'Africa/Harare', 'Africa/Johannesburg', 'Africa/Juba', 'Africa/Kampala', 'Africa/Khartoum', 'Africa/Kigali', 'Africa/Kinshasa', 'Africa/Lagos', 'Africa/Libreville', 'Africa/Lome', 'Africa/Luanda', 'Africa/Lubumbashi', 'Africa/Lusaka', 'Africa/Malabo', 'Africa/Maputo', 'Africa/Maseru', 'Africa/Mbabane', 'Africa/Mogadishu', 'Africa/Monrovia', 'Africa/Nairobi', 'Africa/Ndjamena', 'Africa/Niamey', 'Africa/Nouakchott', 'Africa/Ouagadougou', 'Africa/Porto-Novo', 'Africa/Sao_Tome', 'Africa/Timbuktu', 'Africa/Tripoli', 'Africa/Tunis', 'Africa/Windhoek', 'America/Adak', 'America/Anchorage', 'America/Anguilla', 'America/Antigua', 'America/Araguaina', 'America/Argentina/Buenos_Aires', 'America/Argentina/Catamarca', 'America/Argentina/ComodRivadavia', 'America/Argentina/Cordoba', 'America/Argentina/Jujuy', 'America/Argentina/La_Rioja', 'America/Argentina/Mendoza', 'America/Argentina/Rio_Gallegos', 'America/Argentina/Salta', 'America/Argentina/San_Juan', 'America/Argentina/San_Luis', 'America/Argentina/Tucuman', 'America/Argentina/Ushuaia', 'America/Aruba', 'America/Asuncion', 'America/Atikokan', 'America/Atka', 'America/Bahia', 'America/Bahia_Banderas', 'America/Barbados', 'America/Belem', 'America/Belize', 'America/Blanc-Sablon', 'America/Boa_Vista', 'America/Bogota', 'America/Boise', 'America/Buenos_Aires', 'America/Cambridge_Bay', 'America/Campo_Grande', 'America/Cancun', 'America/Caracas', 'America/Catamarca', 'America/Cayenne', 'America/Cayman', 'America/Chicago', 'America/Chihuahua', 'America/Ciudad_Juarez', 'America/Coral_Harbour', 'America/Cordoba', 'America/Costa_Rica', 'America/Coyhaique', 'America/Creston', 'America/Cuiaba', 'America/Curacao', 'America/Danmarkshavn', 'America/Dawson', 'America/Dawson_Creek', 'America/Denver', 'America/Detroit', 'America/Dominica', 'America/Edmonton', 'America/Eirunepe', 'America/El_Salvador', 'America/Ensenada', 'America/Fort_Nelson', 'America/Fort_Wayne', 'America/Fortaleza', 'America/Glace_Bay', 'America/Godthab', 'America/Goose_Bay', 'America/Grand_Turk', 'America/Grenada', 'America/Guadeloupe', 'America/Guatemala', 'America/Guayaquil', 'America/Guyana', 'America/Halifax', 'America/Havana', 'America/Hermosillo', 'America/Indiana/Indianapolis', 'America/Indiana/Knox', 'America/Indiana/Marengo', 'America/Indiana/Petersburg', 'America/Indiana/Tell_City', 'America/Indiana/Vevay', 'America/Indiana/Vincennes', 'America/Indiana/Winamac', 'America/Indianapolis', 'America/Inuvik', 'America/Iqaluit', 'America/Jamaica', 'America/Jujuy', 'America/Juneau', 'America/Kentucky/Louisville', 'America/Kentucky/Monticello', 'America/Knox_IN', 'America/Kralendijk', 'America/La_Paz', 'America/Lima', 'America/Los_Angeles', 'America/Louisville', 'America/Lower_Princes', 'America/Maceio', 'America/Managua', 'America/Manaus', 'America/Marigot', 'America/Martinique', 'America/Matamoros', 'America/Mazatlan', 'America/Mendoza', 'America/Menominee', 'America/Merida', 'America/Metlakatla', 'America/Mexico_City', 'America/Miquelon', 'America/Moncton', 'America/Monterrey', 'America/Montevideo', 'America/Montreal', 'America/Montserrat', 'America/Nassau', 'America/New_York', 'America/Nipigon', 'America/Nome', 'America/Noronha', 'America/North_Dakota/Beulah', 'America/North_Dakota/Center', 'America/North_Dakota/New_Salem', 'America/Nuuk', 'America/Ojinaga', 'America/Panama', 'America/Pangnirtung', 'America/Paramaribo', 'America/Phoenix', 'America/Port-au-Prince', 'America/Port_of_Spain', 'America/Porto_Acre', 'America/Porto_Velho', 'America/Puerto_Rico', 'America/Punta_Arenas', 'America/Rainy_River', 'America/Rankin_Inlet', 'America/Recife', 'America/Regina', 'America/Resolute', 'America/Rio_Branco', 'America/Rosario', 'America/Santa_Isabel', 'America/Santarem', 'America/Santiago', 'America/Santo_Domingo', 'America/Sao_Paulo', 'America/Scoresbysund', 'America/Shiprock', 'America/Sitka', 'America/St_Barthelemy', 'America/St_Johns', 'America/St_Kitts', 'America/St_Lucia', 'America/St_Thomas', 'America/St_Vincent', 'America/Swift_Current', 'America/Tegucigalpa', 'America/Thule', 'America/Thunder_Bay', 'America/Tijuana', 'America/Toronto', 'America/Tortola', 'America/Vancouver', 'America/Virgin', 'America/Whitehorse', 'America/Winnipeg', 'America/Yakutat', 'America/Yellowknife', 'Antarctica/Casey', 'Antarctica/Davis', 'Antarctica/DumontDUrville', 'Antarctica/Macquarie', 'Antarctica/Mawson', 'Antarctica/McMurdo', 'Antarctica/Palmer', 'Antarctica/Rothera', 'Antarctica/South_Pole', 'Antarctica/Syowa', 'Antarctica/Troll', 'Antarctica/Vostok', 'Arctic/Longyearbyen', 'Asia/Aden', 'Asia/Almaty', 'Asia/Amman', 'Asia/Anadyr', 'Asia/Aqtau', 'Asia/Aqtobe', 'Asia/Ashgabat', 'Asia/Ashkhabad', 'Asia/Atyrau', 'Asia/Baghdad', 'Asia/Bahrain', 'Asia/Baku', 'Asia/Bangkok', 'Asia/Barnaul', 'Asia/Beirut', 'Asia/Bishkek', 'Asia/Brunei', 'Asia/Calcutta', 'Asia/Chita', 'Asia/Choibalsan', 'Asia/Chongqing', 'Asia/Chungking', 'Asia/Colombo', 'Asia/Dacca', 'Asia/Damascus', 'Asia/Dhaka', 'Asia/Dili', 'Asia/Dubai', 'Asia/Dushanbe', 'Asia/Famagusta', 'Asia/Gaza', 'Asia/Harbin', 'Asia/Hebron', 'Asia/Ho_Chi_Minh', 'Asia/Hong_Kong', 'Asia/Hovd', 'Asia/Irkutsk', 'Asia/Istanbul', 'Asia/Jakarta', 'Asia/Jayapura', 'Asia/Jerusalem', 'Asia/Kabul', 'Asia/Kamchatka', 'Asia/Karachi', 'Asia/Kashgar', 'Asia/Kathmandu', 'Asia/Katmandu', 'Asia/Khandyga', 'Asia/Kolkata', 'Asia/Krasnoyarsk', 'Asia/Kuala_Lumpur', 'Asia/Kuching', 'Asia/Kuwait', 'Asia/Macao', 'Asia/Macau', 'Asia/Magadan', 'Asia/Makassar', 'Asia/Manila', 'Asia/Muscat', 'Asia/Nicosia', 'Asia/Novokuznetsk', 'Asia/Novosibirsk', 'Asia/Omsk', 'Asia/Oral', 'Asia/Phnom_Penh', 'Asia/Pontianak', 'Asia/Pyongyang', 'Asia/Qatar', 'Asia/Qostanay', 'Asia/Qyzylorda', 'Asia/Rangoon', 'Asia/Riyadh', 'Asia/Saigon', 'Asia/Sakhalin', 'Asia/Samarkand', 'Asia/Seoul', 'Asia/Shanghai', 'Asia/Singapore', 'Asia/Srednekolymsk', 'Asia/Taipei', 'Asia/Tashkent', 'Asia/Tbilisi', 'Asia/Tehran', 'Asia/Tel_Aviv', 'Asia/Thimbu', 'Asia/Thimphu', 'Asia/Tokyo', 'Asia/Tomsk', 'Asia/Ujung_Pandang', 'Asia/Ulaanbaatar', 'Asia/Ulan_Bator', 'Asia/Urumqi', 'Asia/Ust-Nera', 'Asia/Vientiane', 'Asia/Vladivostok', 'Asia/Yakutsk', 'Asia/Yangon', 'Asia/Yekaterinburg', 'Asia/Yerevan', 'Atlantic/Azores', 'Atlantic/Bermuda', 'Atlantic/Canary', 'Atlantic/Cape_Verde', 'Atlantic/Faeroe', 'Atlantic/Faroe', 'Atlantic/Jan_Mayen', 'Atlantic/Madeira', 'Atlantic/Reykjavik', 'Atlantic/South_Georgia', 'Atlantic/St_Helena', 'Atlantic/Stanley', 'Australia/ACT', 'Australia/Adelaide', 'Australia/Brisbane', 'Australia/Broken_Hill', 'Australia/Canberra', 'Australia/Currie', 'Australia/Darwin', 'Australia/Eucla', 'Australia/Hobart', 'Australia/LHI', 'Australia/Lindeman', 'Australia/Lord_Howe', 'Australia/Melbourne', 'Australia/NSW', 'Australia/North', 'Australia/Perth', 'Australia/Queensland', 'Australia/South', 'Australia/Sydney', 'Australia/Tasmania', 'Australia/Victoria', 'Australia/West', 'Australia/Yancowinna', 'Brazil/Acre', 'Brazil/DeNoronha', 'Brazil/East', 'Brazil/West', 'CET', 'CST6CDT', 'Canada/Atlantic', 'Canada/Central', 'Canada/Eastern', 'Canada/Mountain', 'Canada/Newfoundland', 'Canada/Pacific', 'Canada/Saskatchewan', 'Canada/Yukon', 'Chile/Continental', 'Chile/EasterIsland', 'Cuba', 'EET', 'EST', 'EST5EDT', 'Egypt', 'Eire', 'Etc/GMT', 'Etc/GMT+0', 'Etc/GMT+1', 'Etc/GMT+10', 'Etc/GMT+11', 'Etc/GMT+12', 'Etc/GMT+2', 'Etc/GMT+3', 'Etc/GMT+4', 'Etc/GMT+5', 'Etc/GMT+6', 'Etc/GMT+7', 'Etc/GMT+8', 'Etc/GMT+9', 'Etc/GMT-0', 'Etc/GMT-1', 'Etc/GMT-10', 'Etc/GMT-11', 'Etc/GMT-12', 'Etc/GMT-13', 'Etc/GMT-14', 'Etc/GMT-2', 'Etc/GMT-3', 'Etc/GMT-4', 'Etc/GMT-5', 'Etc/GMT-6', 'Etc/GMT-7', 'Etc/GMT-8', 'Etc/GMT-9', 'Etc/GMT0', 'Etc/Greenwich', 'Etc/UCT', 'Etc/UTC', 'Etc/Universal', 'Etc/Zulu', 'Europe/Amsterdam', 'Europe/Andorra', 'Europe/Astrakhan', 'Europe/Athens', 'Europe/Belfast', 'Europe/Belgrade', 'Europe/Berlin', 'Europe/Bratislava', 'Europe/Brussels', 'Europe/Bucharest', 'Europe/Budapest', 'Europe/Busingen', 'Europe/Chisinau', 'Europe/Copenhagen', 'Europe/Dublin', 'Europe/Gibraltar', 'Europe/Guernsey', 'Europe/Helsinki', 'Europe/Isle_of_Man', 'Europe/Istanbul', 'Europe/Jersey', 'Europe/Kaliningrad', 'Europe/Kiev', 'Europe/Kirov', 'Europe/Kyiv', 'Europe/Lisbon', 'Europe/Ljubljana', 'Europe/London', 'Europe/Luxembourg', 'Europe/Madrid', 'Europe/Malta', 'Europe/Mariehamn', 'Europe/Minsk', 'Europe/Monaco', 'Europe/Moscow', 'Europe/Nicosia', 'Europe/Oslo', 'Europe/Paris', 'Europe/Podgorica', 'Europe/Prague', 'Europe/Riga', 'Europe/Rome', 'Europe/Samara', 'Europe/San_Marino', 'Europe/Sarajevo', 'Europe/Saratov', 'Europe/Simferopol', 'Europe/Skopje', 'Europe/Sofia', 'Europe/Stockholm', 'Europe/Tallinn', 'Europe/Tirane', 'Europe/Tiraspol', 'Europe/Ulyanovsk', 'Europe/Uzhgorod', 'Europe/Vaduz', 'Europe/Vatican', 'Europe/Vienna', 'Europe/Vilnius', 'Europe/Volgograd', 'Europe/Warsaw', 'Europe/Zagreb', 'Europe/Zaporozhye', 'Europe/Zurich', 'Factory', 'GB', 'GB-Eire', 'GMT', 'GMT+0', 'GMT-0', 'GMT0', 'Greenwich', 'HST', 'Hongkong', 'Iceland', 'Indian/Antananarivo', 'Indian/Chagos', 'Indian/Christmas', 'Indian/Cocos', 'Indian/Comoro', 'Indian/Kerguelen', 'Indian/Mahe', 'Indian/Maldives', 'Indian/Mauritius', 'Indian/Mayotte', 'Indian/Reunion', 'Iran', 'Israel', 'Jamaica', 'Japan', 'Kwajalein', 'Libya', 'MET', 'MST', 'MST7MDT', 'Mexico/BajaNorte', 'Mexico/BajaSur', 'Mexico/General', 'NZ', 'NZ-CHAT', 'Navajo', 'PRC', 'PST8PDT', 'Pacific/Apia', 'Pacific/Auckland', 'Pacific/Bougainville', 'Pacific/Chatham', 'Pacific/Chuuk', 'Pacific/Easter', 'Pacific/Efate', 'Pacific/Enderbury', 'Pacific/Fakaofo', 'Pacific/Fiji', 'Pacific/Funafuti', 'Pacific/Galapagos', 'Pacific/Gambier', 'Pacific/Guadalcanal', 'Pacific/Guam', 'Pacific/Honolulu', 'Pacific/Johnston', 'Pacific/Kanton', 'Pacific/Kiritimati', 'Pacific/Kosrae', 'Pacific/Kwajalein', 'Pacific/Majuro', 'Pacific/Marquesas', 'Pacific/Midway', 'Pacific/Nauru', 'Pacific/Niue', 'Pacific/Norfolk', 'Pacific/Noumea', 'Pacific/Pago_Pago', 'Pacific/Palau', 'Pacific/Pitcairn', 'Pacific/Pohnpei', 'Pacific/Ponape', 'Pacific/Port_Moresby', 'Pacific/Rarotonga', 'Pacific/Saipan', 'Pacific/Samoa', 'Pacific/Tahiti', 'Pacific/Tarawa', 'Pacific/Tongatapu', 'Pacific/Truk', 'Pacific/Wake', 'Pacific/Wallis', 'Pacific/Yap', 'Poland', 'Portugal', 'ROC', 'ROK', 'Singapore', 'Turkey', 'UCT', 'US/Alaska', 'US/Aleutian', 'US/Arizona', 'US/Central', 'US/East-Indiana', 'US/Eastern', 'US/Hawaii', 'US/Indiana-Starke', 'US/Michigan', 'US/Mountain', 'US/Pacific', 'US/Pacific-New', 'US/Samoa', 'UTC', 'Universal', 'W-SU', 'WET', 'Zulu']|str"
]
diff --git a/stripe/params/terminal/_reader_list_params.py b/stripe/params/terminal/_reader_list_params.py
index caeaa5c8f..e27226260 100644
--- a/stripe/params/terminal/_reader_list_params.py
+++ b/stripe/params/terminal/_reader_list_params.py
@@ -7,7 +7,7 @@
class ReaderListParams(RequestOptions):
device_type: NotRequired[
- "Literal['bbpos_chipper2x', 'bbpos_wisepad3', 'bbpos_wisepos_e', 'mobile_phone_reader', 'simulated_stripe_s700', 'simulated_stripe_s710', 'simulated_stripe_t600', 'simulated_verifone_m425', 'simulated_verifone_p630', 'simulated_verifone_ux700', 'simulated_verifone_v660p', 'simulated_wisepos_e', 'stripe_m2', 'stripe_s700', 'stripe_s710', 'stripe_t600', 'verifone_P400', 'verifone_m425', 'verifone_p630', 'verifone_ux700', 'verifone_v660p']|str"
+ "Literal['bbpos_chipper2x', 'bbpos_wisepad3', 'bbpos_wisepos_e', 'mobile_phone_reader', 'simulated_stripe_s700', 'simulated_stripe_s710', 'simulated_stripe_t600', 'simulated_verifone_m425', 'simulated_verifone_p630', 'simulated_verifone_ux700', 'simulated_verifone_v660p', 'simulated_wisepos_e', 'stripe_m2', 'stripe_s700', 'stripe_s700_devkit', 'stripe_s710', 'stripe_s710_devkit', 'stripe_t600', 'stripe_t600_devkit', 'verifone_P400', 'verifone_m425', 'verifone_p630', 'verifone_ux700', 'verifone_ux700_devkit', 'verifone_v660p', 'verifone_v660p_devkit']|str"
]
"""
Filters readers by device type
diff --git a/stripe/params/test_helpers/__init__.py b/stripe/params/test_helpers/__init__.py
index 8c73c2d2c..96c9662a7 100644
--- a/stripe/params/test_helpers/__init__.py
+++ b/stripe/params/test_helpers/__init__.py
@@ -5,6 +5,7 @@
if TYPE_CHECKING:
from stripe.params.test_helpers import (
+ capital as capital,
issuing as issuing,
shared_payment as shared_payment,
terminal as terminal,
@@ -114,6 +115,7 @@
# name -> (import_target, is_submodule)
_import_map = {
+ "capital": ("stripe.params.test_helpers.capital", True),
"issuing": ("stripe.params.test_helpers.issuing", True),
"shared_payment": ("stripe.params.test_helpers.shared_payment", True),
"terminal": ("stripe.params.test_helpers.terminal", True),
diff --git a/stripe/params/test_helpers/capital/__init__.py b/stripe/params/test_helpers/capital/__init__.py
new file mode 100644
index 000000000..35f6ade0d
--- /dev/null
+++ b/stripe/params/test_helpers/capital/__init__.py
@@ -0,0 +1,39 @@
+# -*- coding: utf-8 -*-
+# File generated from our OpenAPI spec
+from importlib import import_module
+from typing_extensions import TYPE_CHECKING
+
+if TYPE_CHECKING:
+ from stripe.params.test_helpers.capital._financing_offer_create_params import (
+ FinancingOfferCreateParams as FinancingOfferCreateParams,
+ )
+ from stripe.params.test_helpers.capital._financing_offer_refill_params import (
+ FinancingOfferRefillParams as FinancingOfferRefillParams,
+ )
+
+# name -> (import_target, is_submodule)
+_import_map = {
+ "FinancingOfferCreateParams": (
+ "stripe.params.test_helpers.capital._financing_offer_create_params",
+ False,
+ ),
+ "FinancingOfferRefillParams": (
+ "stripe.params.test_helpers.capital._financing_offer_refill_params",
+ False,
+ ),
+}
+if not TYPE_CHECKING:
+
+ def __getattr__(name):
+ try:
+ target, is_submodule = _import_map[name]
+ module = import_module(target)
+ if is_submodule:
+ return module
+
+ return getattr(
+ module,
+ name,
+ )
+ except KeyError:
+ raise AttributeError()
diff --git a/stripe/params/test_helpers/capital/_financing_offer_create_params.py b/stripe/params/test_helpers/capital/_financing_offer_create_params.py
new file mode 100644
index 000000000..07a6264a6
--- /dev/null
+++ b/stripe/params/test_helpers/capital/_financing_offer_create_params.py
@@ -0,0 +1,35 @@
+# -*- coding: utf-8 -*-
+# File generated from our OpenAPI spec
+from typing import List, Union
+from typing_extensions import Literal, NotRequired, TypedDict
+
+
+class FinancingOfferCreateParams(TypedDict):
+ advance_amount: int
+ """
+ Amount of financing offered, in minor units. For example, 1,000 USD is represented as 100000.
+ """
+ expand: NotRequired[List[str]]
+ """
+ Specifies which fields in the response should be expanded.
+ """
+ fee_amount: int
+ """
+ Fixed fee amount, in minor units. For example, 100 USD is represented as 10000.
+ """
+ financing_type: Union[
+ Literal["cash_advance", "fixed_term_loan", "flex_loan"], str
+ ]
+ """
+ The type of financing offer.
+ """
+ status: NotRequired[
+ "Literal['accepted', 'accepted_other_offer', 'canceled', 'completed', 'delivered', 'expired', 'fully_repaid', 'paid_out', 'rejected', 'replaced', 'undelivered']|str"
+ ]
+ """
+ The status of the financing offer.
+ """
+ withhold_rate: float
+ """
+ Per-transaction rate at which Stripe withholds funds to repay the financing.
+ """
diff --git a/stripe/params/test_helpers/capital/_financing_offer_refill_params.py b/stripe/params/test_helpers/capital/_financing_offer_refill_params.py
new file mode 100644
index 000000000..48a61191b
--- /dev/null
+++ b/stripe/params/test_helpers/capital/_financing_offer_refill_params.py
@@ -0,0 +1,35 @@
+# -*- coding: utf-8 -*-
+# File generated from our OpenAPI spec
+from typing import List, Union
+from typing_extensions import Literal, NotRequired, TypedDict
+
+
+class FinancingOfferRefillParams(TypedDict):
+ advance_amount: int
+ """
+ Amount of financing offered, in minor units. For example, 1,000 USD is represented as 100000.
+ """
+ expand: NotRequired[List[str]]
+ """
+ Specifies which fields in the response should be expanded.
+ """
+ fee_amount: int
+ """
+ Fixed fee amount, in minor units. For example, 100 USD is represented as 10000.
+ """
+ financing_type: Union[
+ Literal["cash_advance", "fixed_term_loan", "flex_loan"], str
+ ]
+ """
+ The type of financing offer
+ """
+ status: NotRequired[
+ "Literal['accepted', 'accepted_other_offer', 'canceled', 'completed', 'delivered', 'expired', 'fully_repaid', 'paid_out', 'rejected', 'replaced', 'undelivered']|str"
+ ]
+ """
+ The status of the financing offer
+ """
+ withhold_rate: float
+ """
+ Per-transaction rate at which Stripe withholds funds to repay the financing.
+ """
diff --git a/stripe/params/test_helpers/treasury/__init__.py b/stripe/params/test_helpers/treasury/__init__.py
index 2f45ae0e7..a216e5cb0 100644
--- a/stripe/params/test_helpers/treasury/__init__.py
+++ b/stripe/params/test_helpers/treasury/__init__.py
@@ -7,9 +7,14 @@
from stripe.params.test_helpers.treasury._inbound_transfer_fail_params import (
InboundTransferFailParams as InboundTransferFailParams,
InboundTransferFailParamsFailureDetails as InboundTransferFailParamsFailureDetails,
+ InboundTransferFailParamsFailureDetailsNetworkDetails as InboundTransferFailParamsFailureDetailsNetworkDetails,
+ InboundTransferFailParamsFailureDetailsNetworkDetailsAch as InboundTransferFailParamsFailureDetailsNetworkDetailsAch,
)
from stripe.params.test_helpers.treasury._inbound_transfer_return_inbound_transfer_params import (
InboundTransferReturnInboundTransferParams as InboundTransferReturnInboundTransferParams,
+ InboundTransferReturnInboundTransferParamsFailureDetails as InboundTransferReturnInboundTransferParamsFailureDetails,
+ InboundTransferReturnInboundTransferParamsFailureDetailsNetworkDetails as InboundTransferReturnInboundTransferParamsFailureDetailsNetworkDetails,
+ InboundTransferReturnInboundTransferParamsFailureDetailsNetworkDetailsAch as InboundTransferReturnInboundTransferParamsFailureDetailsNetworkDetailsAch,
)
from stripe.params.test_helpers.treasury._inbound_transfer_succeed_params import (
InboundTransferSucceedParams as InboundTransferSucceedParams,
@@ -71,10 +76,30 @@
"stripe.params.test_helpers.treasury._inbound_transfer_fail_params",
False,
),
+ "InboundTransferFailParamsFailureDetailsNetworkDetails": (
+ "stripe.params.test_helpers.treasury._inbound_transfer_fail_params",
+ False,
+ ),
+ "InboundTransferFailParamsFailureDetailsNetworkDetailsAch": (
+ "stripe.params.test_helpers.treasury._inbound_transfer_fail_params",
+ False,
+ ),
"InboundTransferReturnInboundTransferParams": (
"stripe.params.test_helpers.treasury._inbound_transfer_return_inbound_transfer_params",
False,
),
+ "InboundTransferReturnInboundTransferParamsFailureDetails": (
+ "stripe.params.test_helpers.treasury._inbound_transfer_return_inbound_transfer_params",
+ False,
+ ),
+ "InboundTransferReturnInboundTransferParamsFailureDetailsNetworkDetails": (
+ "stripe.params.test_helpers.treasury._inbound_transfer_return_inbound_transfer_params",
+ False,
+ ),
+ "InboundTransferReturnInboundTransferParamsFailureDetailsNetworkDetailsAch": (
+ "stripe.params.test_helpers.treasury._inbound_transfer_return_inbound_transfer_params",
+ False,
+ ),
"InboundTransferSucceedParams": (
"stripe.params.test_helpers.treasury._inbound_transfer_succeed_params",
False,
diff --git a/stripe/params/test_helpers/treasury/_inbound_transfer_fail_params.py b/stripe/params/test_helpers/treasury/_inbound_transfer_fail_params.py
index 515241848..fbf7f9ade 100644
--- a/stripe/params/test_helpers/treasury/_inbound_transfer_fail_params.py
+++ b/stripe/params/test_helpers/treasury/_inbound_transfer_fail_params.py
@@ -22,3 +22,29 @@ class InboundTransferFailParamsFailureDetails(TypedDict):
"""
Reason for the failure.
"""
+ network_details: NotRequired[
+ "InboundTransferFailParamsFailureDetailsNetworkDetails"
+ ]
+ """
+ Network specific details for the failure.
+ """
+
+
+class InboundTransferFailParamsFailureDetailsNetworkDetails(TypedDict):
+ ach: NotRequired[
+ "InboundTransferFailParamsFailureDetailsNetworkDetailsAch"
+ ]
+ """
+ ACH network failure details.
+ """
+ type: Literal["ach"]
+ """
+ The network used to transfer funds.
+ """
+
+
+class InboundTransferFailParamsFailureDetailsNetworkDetailsAch(TypedDict):
+ return_code: str
+ """
+ NACHA ACH return code.
+ """
diff --git a/stripe/params/test_helpers/treasury/_inbound_transfer_return_inbound_transfer_params.py b/stripe/params/test_helpers/treasury/_inbound_transfer_return_inbound_transfer_params.py
index 1a61dde96..30540f01e 100644
--- a/stripe/params/test_helpers/treasury/_inbound_transfer_return_inbound_transfer_params.py
+++ b/stripe/params/test_helpers/treasury/_inbound_transfer_return_inbound_transfer_params.py
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
# File generated from our OpenAPI spec
from typing import List
-from typing_extensions import NotRequired, TypedDict
+from typing_extensions import Literal, NotRequired, TypedDict
class InboundTransferReturnInboundTransferParams(TypedDict):
@@ -9,3 +9,48 @@ class InboundTransferReturnInboundTransferParams(TypedDict):
"""
Specifies which fields in the response should be expanded.
"""
+ failure_details: NotRequired[
+ "InboundTransferReturnInboundTransferParamsFailureDetails"
+ ]
+ """
+ Details about a returned InboundTransfer.
+ """
+
+
+class InboundTransferReturnInboundTransferParamsFailureDetails(TypedDict):
+ code: NotRequired[
+ "Literal['account_closed', 'account_frozen', 'bank_account_restricted', 'bank_ownership_changed', 'debit_not_authorized', 'incorrect_account_holder_address', 'incorrect_account_holder_name', 'incorrect_account_holder_tax_id', 'insufficient_funds', 'invalid_account_number', 'invalid_currency', 'no_account', 'other']|str"
+ ]
+ """
+ Reason for the failure.
+ """
+ network_details: NotRequired[
+ "InboundTransferReturnInboundTransferParamsFailureDetailsNetworkDetails"
+ ]
+ """
+ Network specific details for the failure.
+ """
+
+
+class InboundTransferReturnInboundTransferParamsFailureDetailsNetworkDetails(
+ TypedDict,
+):
+ ach: NotRequired[
+ "InboundTransferReturnInboundTransferParamsFailureDetailsNetworkDetailsAch"
+ ]
+ """
+ ACH network failure details.
+ """
+ type: Literal["ach"]
+ """
+ The network used to transfer funds.
+ """
+
+
+class InboundTransferReturnInboundTransferParamsFailureDetailsNetworkDetailsAch(
+ TypedDict,
+):
+ return_code: str
+ """
+ NACHA ACH return code.
+ """
diff --git a/stripe/params/treasury/__init__.py b/stripe/params/treasury/__init__.py
index c2312a8d9..60b915c01 100644
--- a/stripe/params/treasury/__init__.py
+++ b/stripe/params/treasury/__init__.py
@@ -136,6 +136,8 @@
from stripe.params.treasury._inbound_transfer_fail_params import (
InboundTransferFailParams as InboundTransferFailParams,
InboundTransferFailParamsFailureDetails as InboundTransferFailParamsFailureDetails,
+ InboundTransferFailParamsFailureDetailsNetworkDetails as InboundTransferFailParamsFailureDetailsNetworkDetails,
+ InboundTransferFailParamsFailureDetailsNetworkDetailsAch as InboundTransferFailParamsFailureDetailsNetworkDetailsAch,
)
from stripe.params.treasury._inbound_transfer_list_params import (
InboundTransferListParams as InboundTransferListParams,
@@ -145,6 +147,9 @@
)
from stripe.params.treasury._inbound_transfer_return_inbound_transfer_params import (
InboundTransferReturnInboundTransferParams as InboundTransferReturnInboundTransferParams,
+ InboundTransferReturnInboundTransferParamsFailureDetails as InboundTransferReturnInboundTransferParamsFailureDetails,
+ InboundTransferReturnInboundTransferParamsFailureDetailsNetworkDetails as InboundTransferReturnInboundTransferParamsFailureDetailsNetworkDetails,
+ InboundTransferReturnInboundTransferParamsFailureDetailsNetworkDetailsAch as InboundTransferReturnInboundTransferParamsFailureDetailsNetworkDetailsAch,
)
from stripe.params.treasury._inbound_transfer_succeed_params import (
InboundTransferSucceedParams as InboundTransferSucceedParams,
@@ -646,6 +651,14 @@
"stripe.params.treasury._inbound_transfer_fail_params",
False,
),
+ "InboundTransferFailParamsFailureDetailsNetworkDetails": (
+ "stripe.params.treasury._inbound_transfer_fail_params",
+ False,
+ ),
+ "InboundTransferFailParamsFailureDetailsNetworkDetailsAch": (
+ "stripe.params.treasury._inbound_transfer_fail_params",
+ False,
+ ),
"InboundTransferListParams": (
"stripe.params.treasury._inbound_transfer_list_params",
False,
@@ -658,6 +671,18 @@
"stripe.params.treasury._inbound_transfer_return_inbound_transfer_params",
False,
),
+ "InboundTransferReturnInboundTransferParamsFailureDetails": (
+ "stripe.params.treasury._inbound_transfer_return_inbound_transfer_params",
+ False,
+ ),
+ "InboundTransferReturnInboundTransferParamsFailureDetailsNetworkDetails": (
+ "stripe.params.treasury._inbound_transfer_return_inbound_transfer_params",
+ False,
+ ),
+ "InboundTransferReturnInboundTransferParamsFailureDetailsNetworkDetailsAch": (
+ "stripe.params.treasury._inbound_transfer_return_inbound_transfer_params",
+ False,
+ ),
"InboundTransferSucceedParams": (
"stripe.params.treasury._inbound_transfer_succeed_params",
False,
diff --git a/stripe/params/treasury/_inbound_transfer_fail_params.py b/stripe/params/treasury/_inbound_transfer_fail_params.py
index 02f8bb4fc..16f8284f6 100644
--- a/stripe/params/treasury/_inbound_transfer_fail_params.py
+++ b/stripe/params/treasury/_inbound_transfer_fail_params.py
@@ -23,3 +23,29 @@ class InboundTransferFailParamsFailureDetails(TypedDict):
"""
Reason for the failure.
"""
+ network_details: NotRequired[
+ "InboundTransferFailParamsFailureDetailsNetworkDetails"
+ ]
+ """
+ Network specific details for the failure.
+ """
+
+
+class InboundTransferFailParamsFailureDetailsNetworkDetails(TypedDict):
+ ach: NotRequired[
+ "InboundTransferFailParamsFailureDetailsNetworkDetailsAch"
+ ]
+ """
+ ACH network failure details.
+ """
+ type: Literal["ach"]
+ """
+ The network used to transfer funds.
+ """
+
+
+class InboundTransferFailParamsFailureDetailsNetworkDetailsAch(TypedDict):
+ return_code: str
+ """
+ NACHA ACH return code.
+ """
diff --git a/stripe/params/treasury/_inbound_transfer_return_inbound_transfer_params.py b/stripe/params/treasury/_inbound_transfer_return_inbound_transfer_params.py
index ada9cdfae..6f36ab78b 100644
--- a/stripe/params/treasury/_inbound_transfer_return_inbound_transfer_params.py
+++ b/stripe/params/treasury/_inbound_transfer_return_inbound_transfer_params.py
@@ -2,7 +2,7 @@
# File generated from our OpenAPI spec
from stripe._request_options import RequestOptions
from typing import List
-from typing_extensions import NotRequired
+from typing_extensions import Literal, NotRequired, TypedDict
class InboundTransferReturnInboundTransferParams(RequestOptions):
@@ -10,3 +10,48 @@ class InboundTransferReturnInboundTransferParams(RequestOptions):
"""
Specifies which fields in the response should be expanded.
"""
+ failure_details: NotRequired[
+ "InboundTransferReturnInboundTransferParamsFailureDetails"
+ ]
+ """
+ Details about a returned InboundTransfer.
+ """
+
+
+class InboundTransferReturnInboundTransferParamsFailureDetails(TypedDict):
+ code: NotRequired[
+ "Literal['account_closed', 'account_frozen', 'bank_account_restricted', 'bank_ownership_changed', 'debit_not_authorized', 'incorrect_account_holder_address', 'incorrect_account_holder_name', 'incorrect_account_holder_tax_id', 'insufficient_funds', 'invalid_account_number', 'invalid_currency', 'no_account', 'other']|str"
+ ]
+ """
+ Reason for the failure.
+ """
+ network_details: NotRequired[
+ "InboundTransferReturnInboundTransferParamsFailureDetailsNetworkDetails"
+ ]
+ """
+ Network specific details for the failure.
+ """
+
+
+class InboundTransferReturnInboundTransferParamsFailureDetailsNetworkDetails(
+ TypedDict,
+):
+ ach: NotRequired[
+ "InboundTransferReturnInboundTransferParamsFailureDetailsNetworkDetailsAch"
+ ]
+ """
+ ACH network failure details.
+ """
+ type: Literal["ach"]
+ """
+ The network used to transfer funds.
+ """
+
+
+class InboundTransferReturnInboundTransferParamsFailureDetailsNetworkDetailsAch(
+ TypedDict,
+):
+ return_code: str
+ """
+ NACHA ACH return code.
+ """
diff --git a/stripe/params/v2/billing/__init__.py b/stripe/params/v2/billing/__init__.py
index e62691214..342852c11 100644
--- a/stripe/params/v2/billing/__init__.py
+++ b/stripe/params/v2/billing/__init__.py
@@ -28,39 +28,6 @@
BillSettingUpdateParamsInvoice as BillSettingUpdateParamsInvoice,
BillSettingUpdateParamsInvoiceTimeUntilDue as BillSettingUpdateParamsInvoiceTimeUntilDue,
)
- from stripe.params.v2.billing._cadence_cancel_params import (
- CadenceCancelParams as CadenceCancelParams,
- )
- from stripe.params.v2.billing._cadence_create_params import (
- CadenceCreateParams as CadenceCreateParams,
- CadenceCreateParamsBillingCycle as CadenceCreateParamsBillingCycle,
- CadenceCreateParamsBillingCycleDay as CadenceCreateParamsBillingCycleDay,
- CadenceCreateParamsBillingCycleDayTime as CadenceCreateParamsBillingCycleDayTime,
- CadenceCreateParamsBillingCycleMonth as CadenceCreateParamsBillingCycleMonth,
- CadenceCreateParamsBillingCycleMonthTime as CadenceCreateParamsBillingCycleMonthTime,
- CadenceCreateParamsBillingCycleWeek as CadenceCreateParamsBillingCycleWeek,
- CadenceCreateParamsBillingCycleWeekTime as CadenceCreateParamsBillingCycleWeekTime,
- CadenceCreateParamsBillingCycleYear as CadenceCreateParamsBillingCycleYear,
- CadenceCreateParamsBillingCycleYearTime as CadenceCreateParamsBillingCycleYearTime,
- CadenceCreateParamsPayer as CadenceCreateParamsPayer,
- CadenceCreateParamsSettings as CadenceCreateParamsSettings,
- CadenceCreateParamsSettingsBill as CadenceCreateParamsSettingsBill,
- CadenceCreateParamsSettingsCollection as CadenceCreateParamsSettingsCollection,
- )
- from stripe.params.v2.billing._cadence_list_params import (
- CadenceListParams as CadenceListParams,
- CadenceListParamsPayer as CadenceListParamsPayer,
- )
- from stripe.params.v2.billing._cadence_retrieve_params import (
- CadenceRetrieveParams as CadenceRetrieveParams,
- )
- from stripe.params.v2.billing._cadence_update_params import (
- CadenceUpdateParams as CadenceUpdateParams,
- CadenceUpdateParamsPayer as CadenceUpdateParamsPayer,
- CadenceUpdateParamsSettings as CadenceUpdateParamsSettings,
- CadenceUpdateParamsSettingsBill as CadenceUpdateParamsSettingsBill,
- CadenceUpdateParamsSettingsCollection as CadenceUpdateParamsSettingsCollection,
- )
from stripe.params.v2.billing._collection_setting_create_params import (
CollectionSettingCreateParams as CollectionSettingCreateParams,
CollectionSettingCreateParamsEmailDelivery as CollectionSettingCreateParamsEmailDelivery,
@@ -187,98 +154,6 @@
"stripe.params.v2.billing._bill_setting_update_params",
False,
),
- "CadenceCancelParams": (
- "stripe.params.v2.billing._cadence_cancel_params",
- False,
- ),
- "CadenceCreateParams": (
- "stripe.params.v2.billing._cadence_create_params",
- False,
- ),
- "CadenceCreateParamsBillingCycle": (
- "stripe.params.v2.billing._cadence_create_params",
- False,
- ),
- "CadenceCreateParamsBillingCycleDay": (
- "stripe.params.v2.billing._cadence_create_params",
- False,
- ),
- "CadenceCreateParamsBillingCycleDayTime": (
- "stripe.params.v2.billing._cadence_create_params",
- False,
- ),
- "CadenceCreateParamsBillingCycleMonth": (
- "stripe.params.v2.billing._cadence_create_params",
- False,
- ),
- "CadenceCreateParamsBillingCycleMonthTime": (
- "stripe.params.v2.billing._cadence_create_params",
- False,
- ),
- "CadenceCreateParamsBillingCycleWeek": (
- "stripe.params.v2.billing._cadence_create_params",
- False,
- ),
- "CadenceCreateParamsBillingCycleWeekTime": (
- "stripe.params.v2.billing._cadence_create_params",
- False,
- ),
- "CadenceCreateParamsBillingCycleYear": (
- "stripe.params.v2.billing._cadence_create_params",
- False,
- ),
- "CadenceCreateParamsBillingCycleYearTime": (
- "stripe.params.v2.billing._cadence_create_params",
- False,
- ),
- "CadenceCreateParamsPayer": (
- "stripe.params.v2.billing._cadence_create_params",
- False,
- ),
- "CadenceCreateParamsSettings": (
- "stripe.params.v2.billing._cadence_create_params",
- False,
- ),
- "CadenceCreateParamsSettingsBill": (
- "stripe.params.v2.billing._cadence_create_params",
- False,
- ),
- "CadenceCreateParamsSettingsCollection": (
- "stripe.params.v2.billing._cadence_create_params",
- False,
- ),
- "CadenceListParams": (
- "stripe.params.v2.billing._cadence_list_params",
- False,
- ),
- "CadenceListParamsPayer": (
- "stripe.params.v2.billing._cadence_list_params",
- False,
- ),
- "CadenceRetrieveParams": (
- "stripe.params.v2.billing._cadence_retrieve_params",
- False,
- ),
- "CadenceUpdateParams": (
- "stripe.params.v2.billing._cadence_update_params",
- False,
- ),
- "CadenceUpdateParamsPayer": (
- "stripe.params.v2.billing._cadence_update_params",
- False,
- ),
- "CadenceUpdateParamsSettings": (
- "stripe.params.v2.billing._cadence_update_params",
- False,
- ),
- "CadenceUpdateParamsSettingsBill": (
- "stripe.params.v2.billing._cadence_update_params",
- False,
- ),
- "CadenceUpdateParamsSettingsCollection": (
- "stripe.params.v2.billing._cadence_update_params",
- False,
- ),
"CollectionSettingCreateParams": (
"stripe.params.v2.billing._collection_setting_create_params",
False,
diff --git a/stripe/params/v2/billing/_cadence_cancel_params.py b/stripe/params/v2/billing/_cadence_cancel_params.py
deleted file mode 100644
index 6125e76d8..000000000
--- a/stripe/params/v2/billing/_cadence_cancel_params.py
+++ /dev/null
@@ -1,7 +0,0 @@
-# -*- coding: utf-8 -*-
-# File generated from our OpenAPI spec
-from typing_extensions import TypedDict
-
-
-class CadenceCancelParams(TypedDict):
- pass
diff --git a/stripe/params/v2/billing/_cadence_create_params.py b/stripe/params/v2/billing/_cadence_create_params.py
deleted file mode 100644
index 7abcde279..000000000
--- a/stripe/params/v2/billing/_cadence_create_params.py
+++ /dev/null
@@ -1,248 +0,0 @@
-# -*- coding: utf-8 -*-
-# File generated from our OpenAPI spec
-from stripe._stripe_object import UntypedStripeObject
-from typing import Dict, Union
-from typing_extensions import Literal, NotRequired, TypedDict
-
-
-class CadenceCreateParams(TypedDict):
- billing_cycle: "CadenceCreateParamsBillingCycle"
- """
- The billing cycle is the object that defines future billing cycle dates.
- """
- lookup_key: NotRequired[str]
- """
- A lookup key used to retrieve cadences dynamically from a static string. Maximum length of 200 characters.
- """
- metadata: NotRequired["Dict[str, str]|UntypedStripeObject[str]"]
- """
- Set of [key-value pairs](https://docs.stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
- """
- payer: "CadenceCreateParamsPayer"
- """
- The payer determines the entity financially responsible for the bill.
- """
- settings: NotRequired["CadenceCreateParamsSettings"]
- """
- The settings associated with the cadence.
- """
-
-
-class CadenceCreateParamsBillingCycle(TypedDict):
- day: NotRequired["CadenceCreateParamsBillingCycleDay"]
- """
- Specific configuration for determining billing dates when type=day.
- """
- interval_count: NotRequired[int]
- """
- The number of intervals (specified in the interval attribute) between
- cadence billings. For example, type=month and interval_count=3 bills every
- 3 months. If not provided, this defaults to 1.
- """
- month: NotRequired["CadenceCreateParamsBillingCycleMonth"]
- """
- Specific configuration for determining billing dates when type=month.
- """
- type: Union[Literal["day", "month", "week", "year"], str]
- """
- The frequency at which a cadence bills.
- """
- week: NotRequired["CadenceCreateParamsBillingCycleWeek"]
- """
- Specific configuration for determining billing dates when type=week.
- """
- year: NotRequired["CadenceCreateParamsBillingCycleYear"]
- """
- Specific configuration for determining billing dates when type=year.
- """
-
-
-class CadenceCreateParamsBillingCycleDay(TypedDict):
- time: NotRequired["CadenceCreateParamsBillingCycleDayTime"]
- """
- The time at which the billing cycle ends.
- This field is optional, and if not provided, it defaults to
- the time at which the cadence was created in UTC timezone.
- """
-
-
-class CadenceCreateParamsBillingCycleDayTime(TypedDict):
- hour: int
- """
- The hour at which the billing cycle ends.
- This must be an integer between 0 and 23, inclusive.
- 0 represents midnight, and 23 represents 11 PM.
- """
- minute: int
- """
- The minute at which the billing cycle ends.
- Must be an integer between 0 and 59, inclusive.
- """
- second: int
- """
- The second at which the billing cycle ends.
- Must be an integer between 0 and 59, inclusive.
- """
-
-
-class CadenceCreateParamsBillingCycleMonth(TypedDict):
- day_of_month: int
- """
- The day to anchor the billing on for a type="month" billing cycle from
- 1-31. If this number is greater than the number of days in the month being
- billed, this anchors to the last day of the month. If not provided,
- this defaults to the day the cadence was created.
- """
- month_of_year: NotRequired[int]
- """
- The month to anchor the billing on for a type="month" billing cycle from
- 1-12. If not provided, this defaults to the month the cadence was created.
- This setting can only be used for monthly billing cycles with `interval_count` of 2, 3, 4 or 6.
- All occurrences are calculated from the month provided.
- """
- time: NotRequired["CadenceCreateParamsBillingCycleMonthTime"]
- """
- The time at which the billing cycle ends.
- This field is optional, and if not provided, it defaults to
- the time at which the cadence was created in UTC timezone.
- """
-
-
-class CadenceCreateParamsBillingCycleMonthTime(TypedDict):
- hour: int
- """
- The hour at which the billing cycle ends.
- This must be an integer between 0 and 23, inclusive.
- 0 represents midnight, and 23 represents 11 PM.
- """
- minute: int
- """
- The minute at which the billing cycle ends.
- Must be an integer between 0 and 59, inclusive.
- """
- second: int
- """
- The second at which the billing cycle ends.
- Must be an integer between 0 and 59, inclusive.
- """
-
-
-class CadenceCreateParamsBillingCycleWeek(TypedDict):
- day_of_week: int
- """
- The day of the week to bill the type=week billing cycle on.
- Numbered from 1-7 for Monday to Sunday respectively, based on the ISO-8601
- week day numbering. If not provided, this defaults to the day the
- cadence was created.
- """
- time: NotRequired["CadenceCreateParamsBillingCycleWeekTime"]
- """
- The time at which the billing cycle ends.
- This field is optional, and if not provided, it defaults to
- the time at which the cadence was created in UTC timezone.
- """
-
-
-class CadenceCreateParamsBillingCycleWeekTime(TypedDict):
- hour: int
- """
- The hour at which the billing cycle ends.
- This must be an integer between 0 and 23, inclusive.
- 0 represents midnight, and 23 represents 11 PM.
- """
- minute: int
- """
- The minute at which the billing cycle ends.
- Must be an integer between 0 and 59, inclusive.
- """
- second: int
- """
- The second at which the billing cycle ends.
- Must be an integer between 0 and 59, inclusive.
- """
-
-
-class CadenceCreateParamsBillingCycleYear(TypedDict):
- day_of_month: NotRequired[int]
- """
- The day to anchor the billing on for a type="month" billing cycle from
- 1-31. If this number is greater than the number of days in the month being
- billed, this anchors to the last day of the month. If not provided,
- this defaults to the day the cadence was created.
- """
- month_of_year: NotRequired[int]
- """
- The month to bill on from 1-12. If not provided, this defaults to the
- month the cadence was created.
- """
- time: NotRequired["CadenceCreateParamsBillingCycleYearTime"]
- """
- The time at which the billing cycle ends.
- This field is optional, and if not provided, it defaults to
- the time at which the cadence was created in UTC timezone.
- """
-
-
-class CadenceCreateParamsBillingCycleYearTime(TypedDict):
- hour: int
- """
- The hour at which the billing cycle ends.
- This must be an integer between 0 and 23, inclusive.
- 0 represents midnight, and 23 represents 11 PM.
- """
- minute: int
- """
- The minute at which the billing cycle ends.
- Must be an integer between 0 and 59, inclusive.
- """
- second: int
- """
- The second at which the billing cycle ends.
- Must be an integer between 0 and 59, inclusive.
- """
-
-
-class CadenceCreateParamsPayer(TypedDict):
- billing_profile: str
- """
- The ID of the Billing Profile object which determines how a bill is paid.
- """
-
-
-class CadenceCreateParamsSettings(TypedDict):
- bill: NotRequired["CadenceCreateParamsSettingsBill"]
- """
- Settings that configure bill generation, which includes calculating totals, tax, and presenting invoices.
- If no setting is provided here, the settings from the customer referenced on the payer will be used.
- If no customer settings are present, the merchant default settings will be used.
- """
- collection: NotRequired["CadenceCreateParamsSettingsCollection"]
- """
- Settings that configure and manage the behavior of collecting payments.
- If no setting is provided here, the settings from the customer referenced from the payer will be used if they exist.
- If no customer settings are present, the merchant default settings will be used.
- """
-
-
-class CadenceCreateParamsSettingsBill(TypedDict):
- id: str
- """
- The ID of the referenced settings object.
- """
- version: NotRequired[str]
- """
- An optional field to specify the version of the Settings to use.
- If not provided, this defaults to the live version any time the settings are used.
- """
-
-
-class CadenceCreateParamsSettingsCollection(TypedDict):
- id: str
- """
- The ID of the referenced settings object.
- """
- version: NotRequired[str]
- """
- An optional field to specify the version of the Settings to use.
- If not provided, this defaults to the live version any time the settings are used.
- """
diff --git a/stripe/params/v2/billing/_cadence_list_params.py b/stripe/params/v2/billing/_cadence_list_params.py
deleted file mode 100644
index 8b87cbb0f..000000000
--- a/stripe/params/v2/billing/_cadence_list_params.py
+++ /dev/null
@@ -1,41 +0,0 @@
-# -*- coding: utf-8 -*-
-# File generated from our OpenAPI spec
-from typing import List, Union
-from typing_extensions import Literal, NotRequired, TypedDict
-
-
-class CadenceListParams(TypedDict):
- include: NotRequired[List[Union[Literal["settings_data"], str]]]
- """
- Additional resource to include in the response.
- """
- limit: NotRequired[int]
- """
- Optionally set the maximum number of results per page. Defaults to 20.
- """
- lookup_keys: NotRequired[List[str]]
- """
- Only return the cadences with these lookup_keys, if any exist. You can specify up to 10 lookup_keys.
- Mutually exclusive with `test_clock` and `payer`.
- """
- payer: NotRequired["CadenceListParamsPayer"]
- """
- If provided, only cadences that specifically reference the payer will be returned. Mutually exclusive with `test_clock` and `lookup_keys`.
- """
- test_clock: NotRequired[str]
- """
- If provided, only cadences that specifically reference the provided test clock ID (via the
- customer's test clock) will be returned.
- Mutually exclusive with `payer`.
- """
-
-
-class CadenceListParamsPayer(TypedDict):
- customer: NotRequired[str]
- """
- The ID of the Customer object. If provided, only cadences that specifically reference the provided customer ID will be returned.
- """
- type: Union[Literal["customer"], str]
- """
- A string identifying the type of the payer. Currently the only supported value is `customer`.
- """
diff --git a/stripe/params/v2/billing/_cadence_retrieve_params.py b/stripe/params/v2/billing/_cadence_retrieve_params.py
deleted file mode 100644
index 2629799cc..000000000
--- a/stripe/params/v2/billing/_cadence_retrieve_params.py
+++ /dev/null
@@ -1,11 +0,0 @@
-# -*- coding: utf-8 -*-
-# File generated from our OpenAPI spec
-from typing import List, Union
-from typing_extensions import Literal, NotRequired, TypedDict
-
-
-class CadenceRetrieveParams(TypedDict):
- include: NotRequired[List[Union[Literal["settings_data"], str]]]
- """
- Additional resource to include in the response.
- """
diff --git a/stripe/params/v2/billing/_cadence_update_params.py b/stripe/params/v2/billing/_cadence_update_params.py
deleted file mode 100644
index e4c91722f..000000000
--- a/stripe/params/v2/billing/_cadence_update_params.py
+++ /dev/null
@@ -1,72 +0,0 @@
-# -*- coding: utf-8 -*-
-# File generated from our OpenAPI spec
-from stripe._stripe_object import UntypedStripeObject
-from typing import Dict, Optional
-from typing_extensions import NotRequired, TypedDict
-
-
-class CadenceUpdateParams(TypedDict):
- lookup_key: NotRequired[str]
- """
- A lookup key used to retrieve cadences dynamically from a static string. Maximum length of 200 characters.
- """
- metadata: NotRequired[
- "Dict[str, Optional[str]]|UntypedStripeObject[Optional[str]]"
- ]
- """
- Set of [key-value pairs](https://docs.stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
- """
- payer: NotRequired["CadenceUpdateParamsPayer"]
- """
- The payer determines the entity financially responsible for the bill.
- """
- settings: NotRequired["CadenceUpdateParamsSettings"]
- """
- The settings associated with the cadence.
- """
-
-
-class CadenceUpdateParamsPayer(TypedDict):
- billing_profile: NotRequired[str]
- """
- The ID of the Billing Profile object which determines how a bill is paid.
- """
-
-
-class CadenceUpdateParamsSettings(TypedDict):
- bill: NotRequired["CadenceUpdateParamsSettingsBill"]
- """
- Settings that configure bills generation, which includes calculating totals, tax, and presenting invoices. If null is provided, the current bill settings will be removed from the billing cadence.
- """
- collection: NotRequired["CadenceUpdateParamsSettingsCollection"]
- """
- Settings that configure and manage the behavior of collecting payments. If null is provided, the current collection settings will be removed from the billing cadence.
- """
-
-
-class CadenceUpdateParamsSettingsBill(TypedDict):
- id: str
- """
- The ID of the referenced settings object.
- """
- version: NotRequired[str]
- """
- An optional field to specify the version of Settings to use.
- If not provided, this defaults to the `live_version` specified on the setting, any time the settings are used.
- Using a specific version here prevents the settings from updating, and is discouraged for cadences.
- To clear a pinned version, set the version to null.
- """
-
-
-class CadenceUpdateParamsSettingsCollection(TypedDict):
- id: str
- """
- The ID of the referenced settings object.
- """
- version: NotRequired[str]
- """
- An optional field to specify the version of Settings to use.
- If not provided, this defaults to the `live_version` specified on the setting, any time the settings are used.
- Using a specific version here prevents the settings from updating, and is discouraged for cadences.
- To clear a pinned version, set the version to null.
- """
diff --git a/stripe/params/v2/core/__init__.py b/stripe/params/v2/core/__init__.py
index ee1fef844..da1ce569e 100644
--- a/stripe/params/v2/core/__init__.py
+++ b/stripe/params/v2/core/__init__.py
@@ -34,6 +34,7 @@
AccountCreateParamsConfigurationMerchantCapabilitiesAuBecsDebitPayments as AccountCreateParamsConfigurationMerchantCapabilitiesAuBecsDebitPayments,
AccountCreateParamsConfigurationMerchantCapabilitiesBacsDebitPayments as AccountCreateParamsConfigurationMerchantCapabilitiesBacsDebitPayments,
AccountCreateParamsConfigurationMerchantCapabilitiesBancontactPayments as AccountCreateParamsConfigurationMerchantCapabilitiesBancontactPayments,
+ AccountCreateParamsConfigurationMerchantCapabilitiesBilliePayments as AccountCreateParamsConfigurationMerchantCapabilitiesBilliePayments,
AccountCreateParamsConfigurationMerchantCapabilitiesBlikPayments as AccountCreateParamsConfigurationMerchantCapabilitiesBlikPayments,
AccountCreateParamsConfigurationMerchantCapabilitiesBlikRecurringPayments as AccountCreateParamsConfigurationMerchantCapabilitiesBlikRecurringPayments,
AccountCreateParamsConfigurationMerchantCapabilitiesBoletoPayments as AccountCreateParamsConfigurationMerchantCapabilitiesBoletoPayments,
@@ -52,15 +53,19 @@
AccountCreateParamsConfigurationMerchantCapabilitiesKonbiniPayments as AccountCreateParamsConfigurationMerchantCapabilitiesKonbiniPayments,
AccountCreateParamsConfigurationMerchantCapabilitiesKrCardPayments as AccountCreateParamsConfigurationMerchantCapabilitiesKrCardPayments,
AccountCreateParamsConfigurationMerchantCapabilitiesLinkPayments as AccountCreateParamsConfigurationMerchantCapabilitiesLinkPayments,
+ AccountCreateParamsConfigurationMerchantCapabilitiesMbWayPayments as AccountCreateParamsConfigurationMerchantCapabilitiesMbWayPayments,
AccountCreateParamsConfigurationMerchantCapabilitiesMobilepayPayments as AccountCreateParamsConfigurationMerchantCapabilitiesMobilepayPayments,
AccountCreateParamsConfigurationMerchantCapabilitiesMultibancoPayments as AccountCreateParamsConfigurationMerchantCapabilitiesMultibancoPayments,
AccountCreateParamsConfigurationMerchantCapabilitiesMxBankTransferPayments as AccountCreateParamsConfigurationMerchantCapabilitiesMxBankTransferPayments,
AccountCreateParamsConfigurationMerchantCapabilitiesNaverPayPayments as AccountCreateParamsConfigurationMerchantCapabilitiesNaverPayPayments,
+ AccountCreateParamsConfigurationMerchantCapabilitiesNzBankAccountBecsDebitPayments as AccountCreateParamsConfigurationMerchantCapabilitiesNzBankAccountBecsDebitPayments,
AccountCreateParamsConfigurationMerchantCapabilitiesOxxoPayments as AccountCreateParamsConfigurationMerchantCapabilitiesOxxoPayments,
AccountCreateParamsConfigurationMerchantCapabilitiesP24Payments as AccountCreateParamsConfigurationMerchantCapabilitiesP24Payments,
AccountCreateParamsConfigurationMerchantCapabilitiesPayByBankPayments as AccountCreateParamsConfigurationMerchantCapabilitiesPayByBankPayments,
AccountCreateParamsConfigurationMerchantCapabilitiesPaycoPayments as AccountCreateParamsConfigurationMerchantCapabilitiesPaycoPayments,
AccountCreateParamsConfigurationMerchantCapabilitiesPaynowPayments as AccountCreateParamsConfigurationMerchantCapabilitiesPaynowPayments,
+ AccountCreateParamsConfigurationMerchantCapabilitiesPaypayPayments as AccountCreateParamsConfigurationMerchantCapabilitiesPaypayPayments,
+ AccountCreateParamsConfigurationMerchantCapabilitiesPixPayments as AccountCreateParamsConfigurationMerchantCapabilitiesPixPayments,
AccountCreateParamsConfigurationMerchantCapabilitiesPromptpayPayments as AccountCreateParamsConfigurationMerchantCapabilitiesPromptpayPayments,
AccountCreateParamsConfigurationMerchantCapabilitiesRevolutPayPayments as AccountCreateParamsConfigurationMerchantCapabilitiesRevolutPayPayments,
AccountCreateParamsConfigurationMerchantCapabilitiesSamsungPayPayments as AccountCreateParamsConfigurationMerchantCapabilitiesSamsungPayPayments,
@@ -78,6 +83,11 @@
AccountCreateParamsConfigurationMerchantKonbiniPayments as AccountCreateParamsConfigurationMerchantKonbiniPayments,
AccountCreateParamsConfigurationMerchantKonbiniPaymentsSupport as AccountCreateParamsConfigurationMerchantKonbiniPaymentsSupport,
AccountCreateParamsConfigurationMerchantKonbiniPaymentsSupportHours as AccountCreateParamsConfigurationMerchantKonbiniPaymentsSupportHours,
+ AccountCreateParamsConfigurationMerchantPaypayPayments as AccountCreateParamsConfigurationMerchantPaypayPayments,
+ AccountCreateParamsConfigurationMerchantPaypayPaymentsSite as AccountCreateParamsConfigurationMerchantPaypayPaymentsSite,
+ AccountCreateParamsConfigurationMerchantPaypayPaymentsSiteAccessible as AccountCreateParamsConfigurationMerchantPaypayPaymentsSiteAccessible,
+ AccountCreateParamsConfigurationMerchantPaypayPaymentsSiteInDevelopment as AccountCreateParamsConfigurationMerchantPaypayPaymentsSiteInDevelopment,
+ AccountCreateParamsConfigurationMerchantPaypayPaymentsSiteRestricted as AccountCreateParamsConfigurationMerchantPaypayPaymentsSiteRestricted,
AccountCreateParamsConfigurationMerchantScriptStatementDescriptor as AccountCreateParamsConfigurationMerchantScriptStatementDescriptor,
AccountCreateParamsConfigurationMerchantScriptStatementDescriptorKana as AccountCreateParamsConfigurationMerchantScriptStatementDescriptorKana,
AccountCreateParamsConfigurationMerchantScriptStatementDescriptorKanji as AccountCreateParamsConfigurationMerchantScriptStatementDescriptorKanji,
@@ -194,6 +204,7 @@
from stripe.params.v2.core._account_link_create_params import (
AccountLinkCreateParams as AccountLinkCreateParams,
AccountLinkCreateParamsUseCase as AccountLinkCreateParamsUseCase,
+ AccountLinkCreateParamsUseCaseAccountDashboard as AccountLinkCreateParamsUseCaseAccountDashboard,
AccountLinkCreateParamsUseCaseAccountOnboarding as AccountLinkCreateParamsUseCaseAccountOnboarding,
AccountLinkCreateParamsUseCaseAccountOnboardingCollectionOptions as AccountLinkCreateParamsUseCaseAccountOnboardingCollectionOptions,
AccountLinkCreateParamsUseCaseAccountUpdate as AccountLinkCreateParamsUseCaseAccountUpdate,
@@ -295,6 +306,7 @@
AccountUpdateParamsConfigurationMerchantCapabilitiesAuBecsDebitPayments as AccountUpdateParamsConfigurationMerchantCapabilitiesAuBecsDebitPayments,
AccountUpdateParamsConfigurationMerchantCapabilitiesBacsDebitPayments as AccountUpdateParamsConfigurationMerchantCapabilitiesBacsDebitPayments,
AccountUpdateParamsConfigurationMerchantCapabilitiesBancontactPayments as AccountUpdateParamsConfigurationMerchantCapabilitiesBancontactPayments,
+ AccountUpdateParamsConfigurationMerchantCapabilitiesBilliePayments as AccountUpdateParamsConfigurationMerchantCapabilitiesBilliePayments,
AccountUpdateParamsConfigurationMerchantCapabilitiesBlikPayments as AccountUpdateParamsConfigurationMerchantCapabilitiesBlikPayments,
AccountUpdateParamsConfigurationMerchantCapabilitiesBlikRecurringPayments as AccountUpdateParamsConfigurationMerchantCapabilitiesBlikRecurringPayments,
AccountUpdateParamsConfigurationMerchantCapabilitiesBoletoPayments as AccountUpdateParamsConfigurationMerchantCapabilitiesBoletoPayments,
@@ -313,15 +325,19 @@
AccountUpdateParamsConfigurationMerchantCapabilitiesKonbiniPayments as AccountUpdateParamsConfigurationMerchantCapabilitiesKonbiniPayments,
AccountUpdateParamsConfigurationMerchantCapabilitiesKrCardPayments as AccountUpdateParamsConfigurationMerchantCapabilitiesKrCardPayments,
AccountUpdateParamsConfigurationMerchantCapabilitiesLinkPayments as AccountUpdateParamsConfigurationMerchantCapabilitiesLinkPayments,
+ AccountUpdateParamsConfigurationMerchantCapabilitiesMbWayPayments as AccountUpdateParamsConfigurationMerchantCapabilitiesMbWayPayments,
AccountUpdateParamsConfigurationMerchantCapabilitiesMobilepayPayments as AccountUpdateParamsConfigurationMerchantCapabilitiesMobilepayPayments,
AccountUpdateParamsConfigurationMerchantCapabilitiesMultibancoPayments as AccountUpdateParamsConfigurationMerchantCapabilitiesMultibancoPayments,
AccountUpdateParamsConfigurationMerchantCapabilitiesMxBankTransferPayments as AccountUpdateParamsConfigurationMerchantCapabilitiesMxBankTransferPayments,
AccountUpdateParamsConfigurationMerchantCapabilitiesNaverPayPayments as AccountUpdateParamsConfigurationMerchantCapabilitiesNaverPayPayments,
+ AccountUpdateParamsConfigurationMerchantCapabilitiesNzBankAccountBecsDebitPayments as AccountUpdateParamsConfigurationMerchantCapabilitiesNzBankAccountBecsDebitPayments,
AccountUpdateParamsConfigurationMerchantCapabilitiesOxxoPayments as AccountUpdateParamsConfigurationMerchantCapabilitiesOxxoPayments,
AccountUpdateParamsConfigurationMerchantCapabilitiesP24Payments as AccountUpdateParamsConfigurationMerchantCapabilitiesP24Payments,
AccountUpdateParamsConfigurationMerchantCapabilitiesPayByBankPayments as AccountUpdateParamsConfigurationMerchantCapabilitiesPayByBankPayments,
AccountUpdateParamsConfigurationMerchantCapabilitiesPaycoPayments as AccountUpdateParamsConfigurationMerchantCapabilitiesPaycoPayments,
AccountUpdateParamsConfigurationMerchantCapabilitiesPaynowPayments as AccountUpdateParamsConfigurationMerchantCapabilitiesPaynowPayments,
+ AccountUpdateParamsConfigurationMerchantCapabilitiesPaypayPayments as AccountUpdateParamsConfigurationMerchantCapabilitiesPaypayPayments,
+ AccountUpdateParamsConfigurationMerchantCapabilitiesPixPayments as AccountUpdateParamsConfigurationMerchantCapabilitiesPixPayments,
AccountUpdateParamsConfigurationMerchantCapabilitiesPromptpayPayments as AccountUpdateParamsConfigurationMerchantCapabilitiesPromptpayPayments,
AccountUpdateParamsConfigurationMerchantCapabilitiesRevolutPayPayments as AccountUpdateParamsConfigurationMerchantCapabilitiesRevolutPayPayments,
AccountUpdateParamsConfigurationMerchantCapabilitiesSamsungPayPayments as AccountUpdateParamsConfigurationMerchantCapabilitiesSamsungPayPayments,
@@ -339,6 +355,11 @@
AccountUpdateParamsConfigurationMerchantKonbiniPayments as AccountUpdateParamsConfigurationMerchantKonbiniPayments,
AccountUpdateParamsConfigurationMerchantKonbiniPaymentsSupport as AccountUpdateParamsConfigurationMerchantKonbiniPaymentsSupport,
AccountUpdateParamsConfigurationMerchantKonbiniPaymentsSupportHours as AccountUpdateParamsConfigurationMerchantKonbiniPaymentsSupportHours,
+ AccountUpdateParamsConfigurationMerchantPaypayPayments as AccountUpdateParamsConfigurationMerchantPaypayPayments,
+ AccountUpdateParamsConfigurationMerchantPaypayPaymentsSite as AccountUpdateParamsConfigurationMerchantPaypayPaymentsSite,
+ AccountUpdateParamsConfigurationMerchantPaypayPaymentsSiteAccessible as AccountUpdateParamsConfigurationMerchantPaypayPaymentsSiteAccessible,
+ AccountUpdateParamsConfigurationMerchantPaypayPaymentsSiteInDevelopment as AccountUpdateParamsConfigurationMerchantPaypayPaymentsSiteInDevelopment,
+ AccountUpdateParamsConfigurationMerchantPaypayPaymentsSiteRestricted as AccountUpdateParamsConfigurationMerchantPaypayPaymentsSiteRestricted,
AccountUpdateParamsConfigurationMerchantScriptStatementDescriptor as AccountUpdateParamsConfigurationMerchantScriptStatementDescriptor,
AccountUpdateParamsConfigurationMerchantScriptStatementDescriptorKana as AccountUpdateParamsConfigurationMerchantScriptStatementDescriptorKana,
AccountUpdateParamsConfigurationMerchantScriptStatementDescriptorKanji as AccountUpdateParamsConfigurationMerchantScriptStatementDescriptorKanji,
@@ -477,6 +498,18 @@
from stripe.params.v2.core._batch_job_retrieve_params import (
BatchJobRetrieveParams as BatchJobRetrieveParams,
)
+ from stripe.params.v2.core._claimable_sandbox_create_params import (
+ ClaimableSandboxCreateParams as ClaimableSandboxCreateParams,
+ ClaimableSandboxCreateParamsOnboardingLinkDetails as ClaimableSandboxCreateParamsOnboardingLinkDetails,
+ ClaimableSandboxCreateParamsPrefill as ClaimableSandboxCreateParamsPrefill,
+ )
+ from stripe.params.v2.core._claimable_sandbox_renew_onboarding_link_params import (
+ ClaimableSandboxRenewOnboardingLinkParams as ClaimableSandboxRenewOnboardingLinkParams,
+ ClaimableSandboxRenewOnboardingLinkParamsOnboardingLinkDetails as ClaimableSandboxRenewOnboardingLinkParamsOnboardingLinkDetails,
+ )
+ from stripe.params.v2.core._claimable_sandbox_retrieve_params import (
+ ClaimableSandboxRetrieveParams as ClaimableSandboxRetrieveParams,
+ )
from stripe.params.v2.core._event_destination_create_params import (
EventDestinationCreateParams as EventDestinationCreateParams,
EventDestinationCreateParamsAmazonEventbridge as EventDestinationCreateParamsAmazonEventbridge,
@@ -621,6 +654,10 @@
"stripe.params.v2.core._account_create_params",
False,
),
+ "AccountCreateParamsConfigurationMerchantCapabilitiesBilliePayments": (
+ "stripe.params.v2.core._account_create_params",
+ False,
+ ),
"AccountCreateParamsConfigurationMerchantCapabilitiesBlikPayments": (
"stripe.params.v2.core._account_create_params",
False,
@@ -693,6 +730,10 @@
"stripe.params.v2.core._account_create_params",
False,
),
+ "AccountCreateParamsConfigurationMerchantCapabilitiesMbWayPayments": (
+ "stripe.params.v2.core._account_create_params",
+ False,
+ ),
"AccountCreateParamsConfigurationMerchantCapabilitiesMobilepayPayments": (
"stripe.params.v2.core._account_create_params",
False,
@@ -709,6 +750,10 @@
"stripe.params.v2.core._account_create_params",
False,
),
+ "AccountCreateParamsConfigurationMerchantCapabilitiesNzBankAccountBecsDebitPayments": (
+ "stripe.params.v2.core._account_create_params",
+ False,
+ ),
"AccountCreateParamsConfigurationMerchantCapabilitiesOxxoPayments": (
"stripe.params.v2.core._account_create_params",
False,
@@ -729,6 +774,14 @@
"stripe.params.v2.core._account_create_params",
False,
),
+ "AccountCreateParamsConfigurationMerchantCapabilitiesPaypayPayments": (
+ "stripe.params.v2.core._account_create_params",
+ False,
+ ),
+ "AccountCreateParamsConfigurationMerchantCapabilitiesPixPayments": (
+ "stripe.params.v2.core._account_create_params",
+ False,
+ ),
"AccountCreateParamsConfigurationMerchantCapabilitiesPromptpayPayments": (
"stripe.params.v2.core._account_create_params",
False,
@@ -797,6 +850,26 @@
"stripe.params.v2.core._account_create_params",
False,
),
+ "AccountCreateParamsConfigurationMerchantPaypayPayments": (
+ "stripe.params.v2.core._account_create_params",
+ False,
+ ),
+ "AccountCreateParamsConfigurationMerchantPaypayPaymentsSite": (
+ "stripe.params.v2.core._account_create_params",
+ False,
+ ),
+ "AccountCreateParamsConfigurationMerchantPaypayPaymentsSiteAccessible": (
+ "stripe.params.v2.core._account_create_params",
+ False,
+ ),
+ "AccountCreateParamsConfigurationMerchantPaypayPaymentsSiteInDevelopment": (
+ "stripe.params.v2.core._account_create_params",
+ False,
+ ),
+ "AccountCreateParamsConfigurationMerchantPaypayPaymentsSiteRestricted": (
+ "stripe.params.v2.core._account_create_params",
+ False,
+ ),
"AccountCreateParamsConfigurationMerchantScriptStatementDescriptor": (
"stripe.params.v2.core._account_create_params",
False,
@@ -1253,6 +1326,10 @@
"stripe.params.v2.core._account_link_create_params",
False,
),
+ "AccountLinkCreateParamsUseCaseAccountDashboard": (
+ "stripe.params.v2.core._account_link_create_params",
+ False,
+ ),
"AccountLinkCreateParamsUseCaseAccountOnboarding": (
"stripe.params.v2.core._account_link_create_params",
False,
@@ -1614,6 +1691,10 @@
"stripe.params.v2.core._account_update_params",
False,
),
+ "AccountUpdateParamsConfigurationMerchantCapabilitiesBilliePayments": (
+ "stripe.params.v2.core._account_update_params",
+ False,
+ ),
"AccountUpdateParamsConfigurationMerchantCapabilitiesBlikPayments": (
"stripe.params.v2.core._account_update_params",
False,
@@ -1686,6 +1767,10 @@
"stripe.params.v2.core._account_update_params",
False,
),
+ "AccountUpdateParamsConfigurationMerchantCapabilitiesMbWayPayments": (
+ "stripe.params.v2.core._account_update_params",
+ False,
+ ),
"AccountUpdateParamsConfigurationMerchantCapabilitiesMobilepayPayments": (
"stripe.params.v2.core._account_update_params",
False,
@@ -1702,6 +1787,10 @@
"stripe.params.v2.core._account_update_params",
False,
),
+ "AccountUpdateParamsConfigurationMerchantCapabilitiesNzBankAccountBecsDebitPayments": (
+ "stripe.params.v2.core._account_update_params",
+ False,
+ ),
"AccountUpdateParamsConfigurationMerchantCapabilitiesOxxoPayments": (
"stripe.params.v2.core._account_update_params",
False,
@@ -1722,6 +1811,14 @@
"stripe.params.v2.core._account_update_params",
False,
),
+ "AccountUpdateParamsConfigurationMerchantCapabilitiesPaypayPayments": (
+ "stripe.params.v2.core._account_update_params",
+ False,
+ ),
+ "AccountUpdateParamsConfigurationMerchantCapabilitiesPixPayments": (
+ "stripe.params.v2.core._account_update_params",
+ False,
+ ),
"AccountUpdateParamsConfigurationMerchantCapabilitiesPromptpayPayments": (
"stripe.params.v2.core._account_update_params",
False,
@@ -1790,6 +1887,26 @@
"stripe.params.v2.core._account_update_params",
False,
),
+ "AccountUpdateParamsConfigurationMerchantPaypayPayments": (
+ "stripe.params.v2.core._account_update_params",
+ False,
+ ),
+ "AccountUpdateParamsConfigurationMerchantPaypayPaymentsSite": (
+ "stripe.params.v2.core._account_update_params",
+ False,
+ ),
+ "AccountUpdateParamsConfigurationMerchantPaypayPaymentsSiteAccessible": (
+ "stripe.params.v2.core._account_update_params",
+ False,
+ ),
+ "AccountUpdateParamsConfigurationMerchantPaypayPaymentsSiteInDevelopment": (
+ "stripe.params.v2.core._account_update_params",
+ False,
+ ),
+ "AccountUpdateParamsConfigurationMerchantPaypayPaymentsSiteRestricted": (
+ "stripe.params.v2.core._account_update_params",
+ False,
+ ),
"AccountUpdateParamsConfigurationMerchantScriptStatementDescriptor": (
"stripe.params.v2.core._account_update_params",
False,
@@ -2282,6 +2399,30 @@
"stripe.params.v2.core._batch_job_retrieve_params",
False,
),
+ "ClaimableSandboxCreateParams": (
+ "stripe.params.v2.core._claimable_sandbox_create_params",
+ False,
+ ),
+ "ClaimableSandboxCreateParamsOnboardingLinkDetails": (
+ "stripe.params.v2.core._claimable_sandbox_create_params",
+ False,
+ ),
+ "ClaimableSandboxCreateParamsPrefill": (
+ "stripe.params.v2.core._claimable_sandbox_create_params",
+ False,
+ ),
+ "ClaimableSandboxRenewOnboardingLinkParams": (
+ "stripe.params.v2.core._claimable_sandbox_renew_onboarding_link_params",
+ False,
+ ),
+ "ClaimableSandboxRenewOnboardingLinkParamsOnboardingLinkDetails": (
+ "stripe.params.v2.core._claimable_sandbox_renew_onboarding_link_params",
+ False,
+ ),
+ "ClaimableSandboxRetrieveParams": (
+ "stripe.params.v2.core._claimable_sandbox_retrieve_params",
+ False,
+ ),
"EventDestinationCreateParams": (
"stripe.params.v2.core._event_destination_create_params",
False,
diff --git a/stripe/params/v2/core/_account_create_params.py b/stripe/params/v2/core/_account_create_params.py
index 0dd84e67c..188b3028a 100644
--- a/stripe/params/v2/core/_account_create_params.py
+++ b/stripe/params/v2/core/_account_create_params.py
@@ -26,7 +26,7 @@ class AccountCreateParams(TypedDict):
"""
dashboard: NotRequired[Literal["express", "full", "none"]]
"""
- A value indicating the Stripe dashboard this Account has access to. This will depend on which configurations are enabled for this account.
+ Specifies the account's Stripe-hosted Dashboard access. Available values depend on the configurations enabled for the account. Learn more about [configuring Dashboard access](https://docs.stripe.com/connect/accounts-v2/connected-account-configuration#set-dashboard-access).
"""
defaults: NotRequired["AccountCreateParamsDefaults"]
"""
@@ -292,6 +292,12 @@ class AccountCreateParamsConfigurationMerchant(TypedDict):
"""
The Merchant Category Code (MCC) for the Merchant Configuration. MCCs classify businesses based on the goods or services they provide.
"""
+ paypay_payments: NotRequired[
+ "AccountCreateParamsConfigurationMerchantPaypayPayments"
+ ]
+ """
+ Settings for PayPay payments.
+ """
script_statement_descriptor: NotRequired[
"AccountCreateParamsConfigurationMerchantScriptStatementDescriptor"
]
@@ -403,6 +409,12 @@ class AccountCreateParamsConfigurationMerchantCapabilities(TypedDict):
"""
Allow the merchant to process Bancontact payments.
"""
+ billie_payments: NotRequired[
+ "AccountCreateParamsConfigurationMerchantCapabilitiesBilliePayments"
+ ]
+ """
+ Allow the merchant to process Billie payments.
+ """
blik_payments: NotRequired[
"AccountCreateParamsConfigurationMerchantCapabilitiesBlikPayments"
]
@@ -511,6 +523,12 @@ class AccountCreateParamsConfigurationMerchantCapabilities(TypedDict):
"""
Allow the merchant to process Link payments.
"""
+ mb_way_payments: NotRequired[
+ "AccountCreateParamsConfigurationMerchantCapabilitiesMbWayPayments"
+ ]
+ """
+ Allow the merchant to process MB WAY payments.
+ """
mobilepay_payments: NotRequired[
"AccountCreateParamsConfigurationMerchantCapabilitiesMobilepayPayments"
]
@@ -535,6 +553,12 @@ class AccountCreateParamsConfigurationMerchantCapabilities(TypedDict):
"""
Allow the merchant to process Naver Pay payments.
"""
+ nz_bank_account_becs_debit_payments: NotRequired[
+ "AccountCreateParamsConfigurationMerchantCapabilitiesNzBankAccountBecsDebitPayments"
+ ]
+ """
+ Allow the merchant to process New Zealand BECS Direct Debit payments.
+ """
oxxo_payments: NotRequired[
"AccountCreateParamsConfigurationMerchantCapabilitiesOxxoPayments"
]
@@ -565,6 +589,18 @@ class AccountCreateParamsConfigurationMerchantCapabilities(TypedDict):
"""
Allow the merchant to process PayNow payments.
"""
+ paypay_payments: NotRequired[
+ "AccountCreateParamsConfigurationMerchantCapabilitiesPaypayPayments"
+ ]
+ """
+ Allow the merchant to process PayPay payments.
+ """
+ pix_payments: NotRequired[
+ "AccountCreateParamsConfigurationMerchantCapabilitiesPixPayments"
+ ]
+ """
+ Allow the merchant to process Pix payments.
+ """
promptpay_payments: NotRequired[
"AccountCreateParamsConfigurationMerchantCapabilitiesPromptpayPayments"
]
@@ -720,6 +756,15 @@ class AccountCreateParamsConfigurationMerchantCapabilitiesBancontactPayments(
"""
+class AccountCreateParamsConfigurationMerchantCapabilitiesBilliePayments(
+ TypedDict,
+):
+ requested: bool
+ """
+ To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ """
+
+
class AccountCreateParamsConfigurationMerchantCapabilitiesBlikPayments(
TypedDict,
):
@@ -882,6 +927,15 @@ class AccountCreateParamsConfigurationMerchantCapabilitiesLinkPayments(
"""
+class AccountCreateParamsConfigurationMerchantCapabilitiesMbWayPayments(
+ TypedDict,
+):
+ requested: bool
+ """
+ To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ """
+
+
class AccountCreateParamsConfigurationMerchantCapabilitiesMobilepayPayments(
TypedDict,
):
@@ -918,6 +972,15 @@ class AccountCreateParamsConfigurationMerchantCapabilitiesNaverPayPayments(
"""
+class AccountCreateParamsConfigurationMerchantCapabilitiesNzBankAccountBecsDebitPayments(
+ TypedDict,
+):
+ requested: bool
+ """
+ To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ """
+
+
class AccountCreateParamsConfigurationMerchantCapabilitiesOxxoPayments(
TypedDict,
):
@@ -963,6 +1026,24 @@ class AccountCreateParamsConfigurationMerchantCapabilitiesPaynowPayments(
"""
+class AccountCreateParamsConfigurationMerchantCapabilitiesPaypayPayments(
+ TypedDict,
+):
+ requested: bool
+ """
+ To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ """
+
+
+class AccountCreateParamsConfigurationMerchantCapabilitiesPixPayments(
+ TypedDict,
+):
+ requested: bool
+ """
+ To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ """
+
+
class AccountCreateParamsConfigurationMerchantCapabilitiesPromptpayPayments(
TypedDict,
):
@@ -1092,6 +1173,10 @@ class AccountCreateParamsConfigurationMerchantCardPaymentsDeclineOn(TypedDict):
class AccountCreateParamsConfigurationMerchantKonbiniPayments(TypedDict):
+ additional_material: NotRequired[str]
+ """
+ Information provided to support the onboarding process for Konbini payments.
+ """
support: NotRequired[
"AccountCreateParamsConfigurationMerchantKonbiniPaymentsSupport"
]
@@ -1132,6 +1217,80 @@ class AccountCreateParamsConfigurationMerchantKonbiniPaymentsSupportHours(
"""
+class AccountCreateParamsConfigurationMerchantPaypayPayments(TypedDict):
+ additional_files: List[str]
+ """
+ Additional files supporting PayPay payments configuration.
+ """
+ goods_type: NotRequired[Literal["digital_content", "other"]]
+ """
+ The type of goods sold by the merchant for PayPay payments.
+ """
+ site: NotRequired[
+ "AccountCreateParamsConfigurationMerchantPaypayPaymentsSite"
+ ]
+ """
+ The business's website for PayPay payments.
+ """
+ specified_commercial_transactions_act_url: NotRequired[str]
+ """
+ URL to the Specified Commercial Transactions Act page for PayPay payments.
+ """
+
+
+class AccountCreateParamsConfigurationMerchantPaypayPaymentsSite(TypedDict):
+ accessible: NotRequired[
+ "AccountCreateParamsConfigurationMerchantPaypayPaymentsSiteAccessible"
+ ]
+ """
+ Additional information about the business's website when it's accessible.
+ """
+ in_development: NotRequired[
+ "AccountCreateParamsConfigurationMerchantPaypayPaymentsSiteInDevelopment"
+ ]
+ """
+ Additional information about the business's website when it's in development.
+ """
+ restricted: NotRequired[
+ "AccountCreateParamsConfigurationMerchantPaypayPaymentsSiteRestricted"
+ ]
+ """
+ Additional information about the business's website when it has restricted access.
+ """
+ type: NotRequired[Literal["accessible", "in_development", "restricted"]]
+ """
+ The status of the business's website.
+ """
+
+
+class AccountCreateParamsConfigurationMerchantPaypayPaymentsSiteAccessible(
+ TypedDict,
+):
+ pass
+
+
+class AccountCreateParamsConfigurationMerchantPaypayPaymentsSiteInDevelopment(
+ TypedDict,
+):
+ password: NotRequired[str]
+ """
+ The password needed to access the business's website.
+ """
+ username: NotRequired[str]
+ """
+ The username needed to access the business's website.
+ """
+
+
+class AccountCreateParamsConfigurationMerchantPaypayPaymentsSiteRestricted(
+ TypedDict,
+):
+ payment_flow_file: NotRequired[str]
+ """
+ The file explaining the payment flow for the business.
+ """
+
+
class AccountCreateParamsConfigurationMerchantScriptStatementDescriptor(
TypedDict,
):
@@ -1952,11 +2111,11 @@ class AccountCreateParamsDefaultsResponsibilities(TypedDict):
"application", "application_custom", "application_express", "stripe"
]
"""
- A value indicating the party responsible for collecting fees from this account.
+ Controls who pays Stripe fees for direct charges and other pricing-control-eligible Stripe products. For new integrations, setting `losses_collector=application` requires `fees_collector=application`; legacy Custom and Express accounts can also use `application_custom` or `application_express`. For destination charges and separate charges and transfers, Stripe bills the platform regardless of this setting. Learn more about [fee behavior on connected accounts](https://docs.stripe.com/connect/direct-charges-fee-payer-behavior), including application fees and pricing considerations.
"""
losses_collector: Literal["application", "stripe"]
"""
- A value indicating who is responsible for losses when this Account can't pay back negative balances from payments.
+ Controls who is responsible for payment-related negative balances on this account. The platform remains liable for negative balances on its own account. To use Stripe negative balance liability, your integration must meet [Managed Risk requirements](https://docs.stripe.com/connect/risk-management/managed-risk).
"""
diff --git a/stripe/params/v2/core/_account_link_create_params.py b/stripe/params/v2/core/_account_link_create_params.py
index 03bef84a6..40a63f401 100644
--- a/stripe/params/v2/core/_account_link_create_params.py
+++ b/stripe/params/v2/core/_account_link_create_params.py
@@ -18,6 +18,12 @@ class AccountLinkCreateParams(TypedDict):
class AccountLinkCreateParamsUseCase(TypedDict):
+ account_dashboard: NotRequired[
+ "AccountLinkCreateParamsUseCaseAccountDashboard"
+ ]
+ """
+ Hash containing configuration options for an Account Link that provides access to the account's Stripe-hosted Dashboard.
+ """
account_onboarding: NotRequired[
"AccountLinkCreateParamsUseCaseAccountOnboarding"
]
@@ -28,12 +34,23 @@ class AccountLinkCreateParamsUseCase(TypedDict):
"""
Hash containing configuration options for an Account Link that updates an existing account.
"""
- type: Union[Literal["account_onboarding", "account_update"], str]
+ type: Union[
+ Literal["account_dashboard", "account_onboarding", "account_update"],
+ str,
+ ]
"""
Open Enum. The type of Account Link the user is requesting.
"""
+class AccountLinkCreateParamsUseCaseAccountDashboard(TypedDict):
+ refresh_url: str
+ """
+ The URL to redirect to if the Account Link has expired or has already
+ been used. Authenticate the user before generating a replacement link.
+ """
+
+
class AccountLinkCreateParamsUseCaseAccountOnboarding(TypedDict):
collection_options: NotRequired[
"AccountLinkCreateParamsUseCaseAccountOnboardingCollectionOptions"
diff --git a/stripe/params/v2/core/_account_update_params.py b/stripe/params/v2/core/_account_update_params.py
index bec5cd64c..5d6f1360b 100644
--- a/stripe/params/v2/core/_account_update_params.py
+++ b/stripe/params/v2/core/_account_update_params.py
@@ -26,7 +26,7 @@ class AccountUpdateParams(TypedDict):
"""
dashboard: NotRequired[Literal["express", "full", "none"]]
"""
- A value indicating the Stripe dashboard this Account has access to. This will depend on which configurations are enabled for this account.
+ Specifies the account's Stripe-hosted Dashboard access. Available values depend on the configurations enabled for the account. Learn more about [configuring Dashboard access](https://docs.stripe.com/connect/accounts-v2/connected-account-configuration#set-dashboard-access).
"""
defaults: NotRequired["AccountUpdateParamsDefaults"]
"""
@@ -310,6 +310,12 @@ class AccountUpdateParamsConfigurationMerchant(TypedDict):
"""
The Merchant Category Code (MCC) for the merchant. MCCs classify businesses based on the goods or services they provide.
"""
+ paypay_payments: NotRequired[
+ "AccountUpdateParamsConfigurationMerchantPaypayPayments"
+ ]
+ """
+ Settings for PayPay payments.
+ """
script_statement_descriptor: NotRequired[
"AccountUpdateParamsConfigurationMerchantScriptStatementDescriptor"
]
@@ -421,6 +427,12 @@ class AccountUpdateParamsConfigurationMerchantCapabilities(TypedDict):
"""
Allow the merchant to process Bancontact payments.
"""
+ billie_payments: NotRequired[
+ "AccountUpdateParamsConfigurationMerchantCapabilitiesBilliePayments"
+ ]
+ """
+ Allow the merchant to process Billie payments.
+ """
blik_payments: NotRequired[
"AccountUpdateParamsConfigurationMerchantCapabilitiesBlikPayments"
]
@@ -529,6 +541,12 @@ class AccountUpdateParamsConfigurationMerchantCapabilities(TypedDict):
"""
Allow the merchant to process Link payments.
"""
+ mb_way_payments: NotRequired[
+ "AccountUpdateParamsConfigurationMerchantCapabilitiesMbWayPayments"
+ ]
+ """
+ Allow the merchant to process MB WAY payments.
+ """
mobilepay_payments: NotRequired[
"AccountUpdateParamsConfigurationMerchantCapabilitiesMobilepayPayments"
]
@@ -553,6 +571,12 @@ class AccountUpdateParamsConfigurationMerchantCapabilities(TypedDict):
"""
Allow the merchant to process Naver Pay payments.
"""
+ nz_bank_account_becs_debit_payments: NotRequired[
+ "AccountUpdateParamsConfigurationMerchantCapabilitiesNzBankAccountBecsDebitPayments"
+ ]
+ """
+ Allow the merchant to process New Zealand BECS Direct Debit payments.
+ """
oxxo_payments: NotRequired[
"AccountUpdateParamsConfigurationMerchantCapabilitiesOxxoPayments"
]
@@ -583,6 +607,18 @@ class AccountUpdateParamsConfigurationMerchantCapabilities(TypedDict):
"""
Allow the merchant to process PayNow payments.
"""
+ paypay_payments: NotRequired[
+ "AccountUpdateParamsConfigurationMerchantCapabilitiesPaypayPayments"
+ ]
+ """
+ Allow the merchant to process PayPay payments.
+ """
+ pix_payments: NotRequired[
+ "AccountUpdateParamsConfigurationMerchantCapabilitiesPixPayments"
+ ]
+ """
+ Allow the merchant to process Pix payments.
+ """
promptpay_payments: NotRequired[
"AccountUpdateParamsConfigurationMerchantCapabilitiesPromptpayPayments"
]
@@ -738,6 +774,15 @@ class AccountUpdateParamsConfigurationMerchantCapabilitiesBancontactPayments(
"""
+class AccountUpdateParamsConfigurationMerchantCapabilitiesBilliePayments(
+ TypedDict,
+):
+ requested: NotRequired[bool]
+ """
+ To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ """
+
+
class AccountUpdateParamsConfigurationMerchantCapabilitiesBlikPayments(
TypedDict,
):
@@ -900,6 +945,15 @@ class AccountUpdateParamsConfigurationMerchantCapabilitiesLinkPayments(
"""
+class AccountUpdateParamsConfigurationMerchantCapabilitiesMbWayPayments(
+ TypedDict,
+):
+ requested: NotRequired[bool]
+ """
+ To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ """
+
+
class AccountUpdateParamsConfigurationMerchantCapabilitiesMobilepayPayments(
TypedDict,
):
@@ -936,6 +990,15 @@ class AccountUpdateParamsConfigurationMerchantCapabilitiesNaverPayPayments(
"""
+class AccountUpdateParamsConfigurationMerchantCapabilitiesNzBankAccountBecsDebitPayments(
+ TypedDict,
+):
+ requested: NotRequired[bool]
+ """
+ To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ """
+
+
class AccountUpdateParamsConfigurationMerchantCapabilitiesOxxoPayments(
TypedDict,
):
@@ -981,6 +1044,24 @@ class AccountUpdateParamsConfigurationMerchantCapabilitiesPaynowPayments(
"""
+class AccountUpdateParamsConfigurationMerchantCapabilitiesPaypayPayments(
+ TypedDict,
+):
+ requested: NotRequired[bool]
+ """
+ To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ """
+
+
+class AccountUpdateParamsConfigurationMerchantCapabilitiesPixPayments(
+ TypedDict,
+):
+ requested: NotRequired[bool]
+ """
+ To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active.
+ """
+
+
class AccountUpdateParamsConfigurationMerchantCapabilitiesPromptpayPayments(
TypedDict,
):
@@ -1110,6 +1191,10 @@ class AccountUpdateParamsConfigurationMerchantCardPaymentsDeclineOn(TypedDict):
class AccountUpdateParamsConfigurationMerchantKonbiniPayments(TypedDict):
+ additional_material: NotRequired[str]
+ """
+ Information provided to support the onboarding process for Konbini payments.
+ """
support: NotRequired[
"AccountUpdateParamsConfigurationMerchantKonbiniPaymentsSupport"
]
@@ -1150,6 +1235,80 @@ class AccountUpdateParamsConfigurationMerchantKonbiniPaymentsSupportHours(
"""
+class AccountUpdateParamsConfigurationMerchantPaypayPayments(TypedDict):
+ additional_files: NotRequired[List[str]]
+ """
+ Additional files supporting PayPay payments configuration.
+ """
+ goods_type: NotRequired[Literal["digital_content", "other"]]
+ """
+ The type of goods sold by the merchant for PayPay payments.
+ """
+ site: NotRequired[
+ "AccountUpdateParamsConfigurationMerchantPaypayPaymentsSite"
+ ]
+ """
+ The business's website for PayPay payments.
+ """
+ specified_commercial_transactions_act_url: NotRequired[str]
+ """
+ URL to the Specified Commercial Transactions Act page for PayPay payments.
+ """
+
+
+class AccountUpdateParamsConfigurationMerchantPaypayPaymentsSite(TypedDict):
+ accessible: NotRequired[
+ "AccountUpdateParamsConfigurationMerchantPaypayPaymentsSiteAccessible"
+ ]
+ """
+ Additional information about the business's website when it's accessible.
+ """
+ in_development: NotRequired[
+ "AccountUpdateParamsConfigurationMerchantPaypayPaymentsSiteInDevelopment"
+ ]
+ """
+ Additional information about the business's website when it's in development.
+ """
+ restricted: NotRequired[
+ "AccountUpdateParamsConfigurationMerchantPaypayPaymentsSiteRestricted"
+ ]
+ """
+ Additional information about the business's website when it has restricted access.
+ """
+ type: NotRequired[Literal["accessible", "in_development", "restricted"]]
+ """
+ The status of the business's website.
+ """
+
+
+class AccountUpdateParamsConfigurationMerchantPaypayPaymentsSiteAccessible(
+ TypedDict,
+):
+ pass
+
+
+class AccountUpdateParamsConfigurationMerchantPaypayPaymentsSiteInDevelopment(
+ TypedDict,
+):
+ password: NotRequired[str]
+ """
+ The password needed to access the business's website.
+ """
+ username: NotRequired[str]
+ """
+ The username needed to access the business's website.
+ """
+
+
+class AccountUpdateParamsConfigurationMerchantPaypayPaymentsSiteRestricted(
+ TypedDict,
+):
+ payment_flow_file: NotRequired[str]
+ """
+ The file explaining the payment flow for the business.
+ """
+
+
class AccountUpdateParamsConfigurationMerchantScriptStatementDescriptor(
TypedDict,
):
@@ -1982,11 +2141,11 @@ class AccountUpdateParamsDefaultsResponsibilities(TypedDict):
"application", "application_custom", "application_express", "stripe"
]
"""
- A value indicating the party responsible for collecting fees from this account.
+ Controls who pays Stripe fees for direct charges and other pricing-control-eligible Stripe products. For new integrations, setting `losses_collector=application` requires `fees_collector=application`; legacy Custom and Express accounts can also use `application_custom` or `application_express`. For destination charges and separate charges and transfers, Stripe bills the platform regardless of this setting. Learn more about [fee behavior on connected accounts](https://docs.stripe.com/connect/direct-charges-fee-payer-behavior), including application fees and pricing considerations. Set this value when adding an applicable configuration to the account. You can't change it after it's set.
"""
losses_collector: Literal["application", "stripe"]
"""
- A value indicating who is responsible for losses when this Account can't pay back negative balances from payments.
+ Controls who is responsible for payment-related negative balances on this account. The platform remains liable for negative balances on its own account. To use Stripe negative balance liability, your integration must meet [Managed Risk requirements](https://docs.stripe.com/connect/risk-management/managed-risk). Set this value when adding an applicable configuration to the account. You can't change it after it's set.
"""
diff --git a/stripe/params/v2/core/_claimable_sandbox_create_params.py b/stripe/params/v2/core/_claimable_sandbox_create_params.py
new file mode 100644
index 000000000..8d782bcb8
--- /dev/null
+++ b/stripe/params/v2/core/_claimable_sandbox_create_params.py
@@ -0,0 +1,56 @@
+# -*- coding: utf-8 -*-
+# File generated from our OpenAPI spec
+from typing_extensions import Literal, NotRequired, TypedDict
+
+
+class ClaimableSandboxCreateParams(TypedDict):
+ channel: NotRequired[Literal["public", "testing"]]
+ """
+ The distribution channel used to pre-install your Stripe App on the claimable sandbox.
+ Use `testing` to install your app's external test version or `public` to install its published version.
+ This field defaults to `public` if omitted.
+ """
+ enable_mcp_access: bool
+ """
+ If true, returns a key that can be used with [Stripe's MCP server](https://docs.stripe.com/mcp).
+ """
+ onboarding_link_details: (
+ "ClaimableSandboxCreateParamsOnboardingLinkDetails"
+ )
+ """
+ Details about the onboarding link.
+ """
+ prefill: "ClaimableSandboxCreateParamsPrefill"
+ """
+ Values that are prefilled when a user claims the sandbox. When a user claims the sandbox, they will be able to update these values.
+ """
+
+
+class ClaimableSandboxCreateParamsOnboardingLinkDetails(TypedDict):
+ refresh_url: str
+ """
+ The URL the user will be redirected to if the onboarding link is expired or invalid.
+ The URL specified should attempt to generate a new onboarding link,
+ and re-direct the user to this new onboarding link so that they can proceed with the onboarding flow.
+ """
+ return_url: NotRequired[str]
+ """
+ The URL offered to the user as a way back to your app after they claim the sandbox.
+ """
+
+
+class ClaimableSandboxCreateParamsPrefill(TypedDict):
+ country: str
+ """
+ Country in which the account holder resides, or in which the business is legally established.
+ Use two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ """
+ email: str
+ """
+ Email address of the user who will claim the sandbox.
+ Stripe sends this address an invitation to claim the sandbox and a reminder before the unclaimed sandbox expires.
+ """
+ name: NotRequired[str]
+ """
+ Name for the sandbox.
+ """
diff --git a/stripe/params/v2/core/_claimable_sandbox_renew_onboarding_link_params.py b/stripe/params/v2/core/_claimable_sandbox_renew_onboarding_link_params.py
new file mode 100644
index 000000000..10e765b83
--- /dev/null
+++ b/stripe/params/v2/core/_claimable_sandbox_renew_onboarding_link_params.py
@@ -0,0 +1,29 @@
+# -*- coding: utf-8 -*-
+# File generated from our OpenAPI spec
+from typing_extensions import NotRequired, TypedDict
+
+
+class ClaimableSandboxRenewOnboardingLinkParams(TypedDict):
+ onboarding_link_details: NotRequired[
+ "ClaimableSandboxRenewOnboardingLinkParamsOnboardingLinkDetails"
+ ]
+ """
+ Details about the onboarding link. If omitted, existing details are reused.
+ Omitted URL fields retain their existing values.
+ """
+
+
+class ClaimableSandboxRenewOnboardingLinkParamsOnboardingLinkDetails(
+ TypedDict
+):
+ refresh_url: NotRequired[str]
+ """
+ The URL the user will be redirected to if the onboarding link is expired or invalid.
+ If omitted, the existing refresh URL is retained.
+ The URL should generate a new onboarding link and redirect the user to it.
+ """
+ return_url: NotRequired[str]
+ """
+ The URL offered to the user as a way back to your app after they claim the sandbox.
+ If omitted, the existing return URL is retained. Set to null to clear it.
+ """
diff --git a/stripe/params/v2/core/_claimable_sandbox_retrieve_params.py b/stripe/params/v2/core/_claimable_sandbox_retrieve_params.py
new file mode 100644
index 000000000..5e124a038
--- /dev/null
+++ b/stripe/params/v2/core/_claimable_sandbox_retrieve_params.py
@@ -0,0 +1,11 @@
+# -*- coding: utf-8 -*-
+# File generated from our OpenAPI spec
+from typing import List
+from typing_extensions import Literal, NotRequired, TypedDict
+
+
+class ClaimableSandboxRetrieveParams(TypedDict):
+ include: NotRequired[List[Literal["sandbox_details.api_keys"]]]
+ """
+ Additional fields to include in the response.
+ """
diff --git a/stripe/params/v2/iam/_activity_log_list_params.py b/stripe/params/v2/iam/_activity_log_list_params.py
index f4cf3cbfe..5c9356494 100644
--- a/stripe/params/v2/iam/_activity_log_list_params.py
+++ b/stripe/params/v2/iam/_activity_log_list_params.py
@@ -11,11 +11,17 @@ class ActivityLogListParams(TypedDict):
Literal[
"account_security",
"api_key",
+ "app",
"authentication",
+ "connect",
+ "data_export",
+ "event_destination",
"issuing",
"payout",
+ "radar",
"scim",
"sso",
+ "user_access",
"user_invite",
"user_profile",
"user_roles",
@@ -36,6 +42,20 @@ class ActivityLogListParams(TypedDict):
"api_key_deleted",
"api_key_updated",
"api_key_viewed",
+ "application_authorized",
+ "application_created",
+ "application_deauthorized",
+ "app_installed",
+ "app_uninstalled",
+ "connect_express_branding_updated",
+ "connect_oauth_disabled",
+ "connect_oauth_enabled",
+ "connect_settings_updated",
+ "connect_site_link_updated",
+ "data_export_requested",
+ "event_destination_added",
+ "event_destination_removed",
+ "event_destination_updated",
"issuing_activated",
"issuing_balance_transfer_created",
"issuing_cardholder_created",
@@ -53,6 +73,17 @@ class ActivityLogListParams(TypedDict):
"payout_destination_updated",
"payout_schedule_edits_disabled",
"payout_schedule_edits_enabled",
+ "payout_schedule_updated",
+ "radar_adaptive_3ds_disabled",
+ "radar_dynamic_risk_thresholds_disabled",
+ "radar_early_fraud_warning_disabled",
+ "radar_for_setup_intents_disabled",
+ "radar_fraud_dispute_protection_disabled",
+ "radar_rule_added",
+ "radar_rule_disabled",
+ "radar_rule_enabled",
+ "radar_rule_removed",
+ "radar_rule_updated",
"scim_group_deleted",
"scim_group_member_added",
"scim_group_member_removed",
@@ -64,6 +95,7 @@ class ActivityLogListParams(TypedDict):
"sso_settings_updated",
"two_step_authentication_mandate_disabled",
"two_step_authentication_mandate_enabled",
+ "user_access_started",
"user_auth_challenge_failed",
"user_email_changed",
"user_email_verified",
@@ -102,3 +134,7 @@ class ActivityLogListParams(TypedDict):
"""
Maximum number of results to return per page.
"""
+ logs_from: NotRequired[List[str]]
+ """
+ Controls which activity logs an organization-level request returns. Specify `@self` to return logs recorded in the organization context and `@organization_members` to return logs recorded in accounts that belong to the organization. Specify both values to return logs from both sources. Defaults to `["@self"]` when omitted. Cannot be empty.
+ """
diff --git a/stripe/params/v2/money_management/__init__.py b/stripe/params/v2/money_management/__init__.py
index 19daedb2c..f2b4c76e0 100644
--- a/stripe/params/v2/money_management/__init__.py
+++ b/stripe/params/v2/money_management/__init__.py
@@ -91,6 +91,7 @@
from stripe.params.v2.money_management._outbound_setup_intent_create_params import (
OutboundSetupIntentCreateParams as OutboundSetupIntentCreateParams,
OutboundSetupIntentCreateParamsPayoutMethodData as OutboundSetupIntentCreateParamsPayoutMethodData,
+ OutboundSetupIntentCreateParamsPayoutMethodDataApplePay as OutboundSetupIntentCreateParamsPayoutMethodDataApplePay,
OutboundSetupIntentCreateParamsPayoutMethodDataBankAccount as OutboundSetupIntentCreateParamsPayoutMethodDataBankAccount,
OutboundSetupIntentCreateParamsPayoutMethodDataCard as OutboundSetupIntentCreateParamsPayoutMethodDataCard,
OutboundSetupIntentCreateParamsPayoutMethodDataCryptoWallet as OutboundSetupIntentCreateParamsPayoutMethodDataCryptoWallet,
@@ -193,6 +194,7 @@
)
from stripe.params.v2.money_management._received_debit_list_params import (
ReceivedDebitListParams as ReceivedDebitListParams,
+ ReceivedDebitListParamsCreated as ReceivedDebitListParamsCreated,
)
from stripe.params.v2.money_management._received_debit_retrieve_params import (
ReceivedDebitRetrieveParams as ReceivedDebitRetrieveParams,
@@ -410,6 +412,10 @@
"stripe.params.v2.money_management._outbound_setup_intent_create_params",
False,
),
+ "OutboundSetupIntentCreateParamsPayoutMethodDataApplePay": (
+ "stripe.params.v2.money_management._outbound_setup_intent_create_params",
+ False,
+ ),
"OutboundSetupIntentCreateParamsPayoutMethodDataBankAccount": (
"stripe.params.v2.money_management._outbound_setup_intent_create_params",
False,
@@ -626,6 +632,10 @@
"stripe.params.v2.money_management._received_debit_list_params",
False,
),
+ "ReceivedDebitListParamsCreated": (
+ "stripe.params.v2.money_management._received_debit_list_params",
+ False,
+ ),
"ReceivedDebitRetrieveParams": (
"stripe.params.v2.money_management._received_debit_retrieve_params",
False,
diff --git a/stripe/params/v2/money_management/_financial_account_list_params.py b/stripe/params/v2/money_management/_financial_account_list_params.py
index 8d6a12796..528bd5beb 100644
--- a/stripe/params/v2/money_management/_financial_account_list_params.py
+++ b/stripe/params/v2/money_management/_financial_account_list_params.py
@@ -13,7 +13,7 @@ class FinancialAccountListParams(TypedDict):
"""
limit: NotRequired[int]
"""
- The page limit.
+ Maximum number of results to return. Default: 10. Valid range: 1-20.
"""
statuses: NotRequired[List[Literal["closed", "open", "pending"]]]
"""
diff --git a/stripe/params/v2/money_management/_financial_address_create_params.py b/stripe/params/v2/money_management/_financial_address_create_params.py
index 138ab0f7a..417cc41f2 100644
--- a/stripe/params/v2/money_management/_financial_address_create_params.py
+++ b/stripe/params/v2/money_management/_financial_address_create_params.py
@@ -22,9 +22,9 @@ class FinancialAddressCreateParams(TypedDict):
class FinancialAddressCreateParamsBankAccount(TypedDict):
country: NotRequired[str]
"""
- The country for the bank account. Used to select the appropriate rails (e.g. for SEPA).
+ The country where Stripe provisions the bank account. Each currency supports the country listed in its description. If omitted, Stripe selects that country.
"""
currency: Union[Literal["eur", "gbp", "usd"], str]
"""
- The currency of the bank account to provision. Available currencies depend on your account's enabled features and rollout access; `eur` requires the Financial Address Global Payouts EU preview.
+ The currency of the bank account to provision. Some currencies require preview or rollout access, as configured for your account.
"""
diff --git a/stripe/params/v2/money_management/_outbound_setup_intent_create_params.py b/stripe/params/v2/money_management/_outbound_setup_intent_create_params.py
index 337b74317..a8c6df153 100644
--- a/stripe/params/v2/money_management/_outbound_setup_intent_create_params.py
+++ b/stripe/params/v2/money_management/_outbound_setup_intent_create_params.py
@@ -25,6 +25,12 @@ class OutboundSetupIntentCreateParams(TypedDict):
class OutboundSetupIntentCreateParamsPayoutMethodData(TypedDict):
+ apple_pay: NotRequired[
+ "OutboundSetupIntentCreateParamsPayoutMethodDataApplePay"
+ ]
+ """
+ The type specific details of the Apple Pay payout method.
+ """
bank_account: NotRequired[
"OutboundSetupIntentCreateParamsPayoutMethodDataBankAccount"
]
@@ -41,12 +47,25 @@ class OutboundSetupIntentCreateParamsPayoutMethodData(TypedDict):
"""
The type specific details of the crypto wallet payout method.
"""
- type: Union[Literal["bank_account", "card", "crypto_wallet"], str]
+ type: Union[
+ Literal["apple_pay", "bank_account", "card", "crypto_wallet"], str
+ ]
"""
Open Enum. The type of payout method to be created.
"""
+class OutboundSetupIntentCreateParamsPayoutMethodDataApplePay(TypedDict):
+ pk_token: NotRequired[str]
+ """
+ The paymentData property of the Apple-provided PKPaymentToken (or ApplePayPaymentToken, for Apple Pay on the Web) as a UTF-8 encoded serialization of a JSON dictionary.
+ """
+ pk_token_display_name: str
+ """
+ The paymentMethod.displayName property of the Apple-provided PKPaymentToken (or ApplePayPaymentToken, for Apple Pay on the Web), e.g. "Visa 1234".
+ """
+
+
class OutboundSetupIntentCreateParamsPayoutMethodDataBankAccount(TypedDict):
account_number: str
"""
diff --git a/stripe/params/v2/money_management/_outbound_setup_intent_update_params.py b/stripe/params/v2/money_management/_outbound_setup_intent_update_params.py
index bd126683a..1c4953957 100644
--- a/stripe/params/v2/money_management/_outbound_setup_intent_update_params.py
+++ b/stripe/params/v2/money_management/_outbound_setup_intent_update_params.py
@@ -30,7 +30,9 @@ class OutboundSetupIntentUpdateParamsPayoutMethodData(TypedDict):
"""
The type specific details of the card payout method.
"""
- type: Union[Literal["bank_account", "card", "crypto_wallet"], str]
+ type: Union[
+ Literal["apple_pay", "bank_account", "card", "crypto_wallet"], str
+ ]
"""
Open Enum. The type of payout method to be created/updated.
"""
diff --git a/stripe/params/v2/money_management/_received_debit_list_params.py b/stripe/params/v2/money_management/_received_debit_list_params.py
index 043e8e2b6..58df1164c 100644
--- a/stripe/params/v2/money_management/_received_debit_list_params.py
+++ b/stripe/params/v2/money_management/_received_debit_list_params.py
@@ -4,7 +4,30 @@
class ReceivedDebitListParams(TypedDict):
+ created: NotRequired["ReceivedDebitListParamsCreated"]
+ """
+ Filter ReceivedDebits by their creation time.
+ """
limit: NotRequired[int]
"""
The page limit.
"""
+
+
+class ReceivedDebitListParamsCreated(TypedDict):
+ gt: NotRequired[str]
+ """
+ Return ReceivedDebits created after this timestamp.
+ """
+ gte: NotRequired[str]
+ """
+ Return ReceivedDebits created on or after this timestamp.
+ """
+ lt: NotRequired[str]
+ """
+ Return ReceivedDebits created before this timestamp.
+ """
+ lte: NotRequired[str]
+ """
+ Return ReceivedDebits created on or before this timestamp.
+ """
diff --git a/stripe/radar/_payment_evaluation.py b/stripe/radar/_payment_evaluation.py
index 6e0ea1ea9..7cb36ac2e 100644
--- a/stripe/radar/_payment_evaluation.py
+++ b/stripe/radar/_payment_evaluation.py
@@ -614,7 +614,7 @@ class FraudulentPayment(StripeObject):
"""
recommended_action: Union[Literal["block", "continue"], str]
"""
- Recommended action based on the score of the `fraudulent_payment` signal. Possible values are `block`, `continue` and `request_three_d_secure`.
+ Recommended action for this payment based on its evaluated signals and rules.
"""
signals: Signals
"""
diff --git a/stripe/reporting/_report_run.py b/stripe/reporting/_report_run.py
index 3eda46c25..be428df7e 100644
--- a/stripe/reporting/_report_run.py
+++ b/stripe/reporting/_report_run.py
@@ -68,6 +68,10 @@ class Parameters(StripeObject):
"""
Category of balance transactions to be included in the report run.
"""
+ tax_invoice_month: Optional[str]
+ """
+ The tax invoice month in YYYY-MM format.
+ """
timezone: Optional[str]
"""
Defaults to `Etc/UTC`. The output timezone for all timestamps in the report. A list of possible time zone values is maintained at the [IANA Time Zone Database](http://www.iana.org/time-zones). Has no effect on `interval_start` or `interval_end`.
diff --git a/stripe/reserve/_hold.py b/stripe/reserve/_hold.py
index 878db9dbf..c449398fc 100644
--- a/stripe/reserve/_hold.py
+++ b/stripe/reserve/_hold.py
@@ -16,7 +16,7 @@
class Hold(ListableAPIResource["Hold"]):
"""
- ReserveHolds are used to place a temporary ReserveHold on a merchant's funds.
+ A ReserveHold holds a portion of an account's funds until it's released. Stripe or the account's platform can create a ReserveHold directly, and a ReservePlan creates ReserveHolds automatically from incoming Charges.
"""
OBJECT_NAME: ClassVar[Literal["reserve.hold"]] = "reserve.hold"
@@ -110,7 +110,7 @@ class ReleaseSchedule(StripeObject):
@classmethod
def list(cls, **params: Unpack["HoldListParams"]) -> ListObject["Hold"]:
"""
- Returns a list of ReserveHolds previously created. The ReserveHolds are returned in sorted order, with the most recent ReserveHolds appearing first.
+ Returns a list of ReserveHolds on your account or on one of your connected accounts. The ReserveHolds are returned in sorted order, with the most recent ReserveHolds appearing first.
"""
result = cls._static_request(
"get",
@@ -130,7 +130,7 @@ async def list_async(
cls, **params: Unpack["HoldListParams"]
) -> ListObject["Hold"]:
"""
- Returns a list of ReserveHolds previously created. The ReserveHolds are returned in sorted order, with the most recent ReserveHolds appearing first.
+ Returns a list of ReserveHolds on your account or on one of your connected accounts. The ReserveHolds are returned in sorted order, with the most recent ReserveHolds appearing first.
"""
result = await cls._static_request_async(
"get",
@@ -150,7 +150,7 @@ def retrieve(
cls, id: str, **params: Unpack["HoldRetrieveParams"]
) -> "Hold":
"""
- Retrieve a ReserveHold.
+ Retrieve a ReserveHold on your account or on one of your connected accounts.
"""
instance = cls(id, **params)
instance.refresh()
@@ -161,7 +161,7 @@ async def retrieve_async(
cls, id: str, **params: Unpack["HoldRetrieveParams"]
) -> "Hold":
"""
- Retrieve a ReserveHold.
+ Retrieve a ReserveHold on your account or on one of your connected accounts.
"""
instance = cls(id, **params)
await instance.refresh_async()
diff --git a/stripe/reserve/_hold_service.py b/stripe/reserve/_hold_service.py
index 552d912b0..a6ad058bb 100644
--- a/stripe/reserve/_hold_service.py
+++ b/stripe/reserve/_hold_service.py
@@ -20,7 +20,7 @@ def list(
options: Optional["RequestOptions"] = None,
) -> "ListObject[Hold]":
"""
- Returns a list of ReserveHolds previously created. The ReserveHolds are returned in sorted order, with the most recent ReserveHolds appearing first.
+ Returns a list of ReserveHolds on your account or on one of your connected accounts. The ReserveHolds are returned in sorted order, with the most recent ReserveHolds appearing first.
"""
return cast(
"ListObject[Hold]",
@@ -39,7 +39,7 @@ async def list_async(
options: Optional["RequestOptions"] = None,
) -> "ListObject[Hold]":
"""
- Returns a list of ReserveHolds previously created. The ReserveHolds are returned in sorted order, with the most recent ReserveHolds appearing first.
+ Returns a list of ReserveHolds on your account or on one of your connected accounts. The ReserveHolds are returned in sorted order, with the most recent ReserveHolds appearing first.
"""
return cast(
"ListObject[Hold]",
@@ -60,7 +60,7 @@ def retrieve(
options: Optional["RequestOptions"] = None,
) -> "Hold":
"""
- Retrieve a ReserveHold.
+ Retrieve a ReserveHold on your account or on one of your connected accounts.
"""
return cast(
"Hold",
@@ -81,7 +81,7 @@ async def retrieve_async(
options: Optional["RequestOptions"] = None,
) -> "Hold":
"""
- Retrieve a ReserveHold.
+ Retrieve a ReserveHold on your account or on one of your connected accounts.
"""
return cast(
"Hold",
diff --git a/stripe/reserve/_plan.py b/stripe/reserve/_plan.py
index 25f54030d..ce9cc20ec 100644
--- a/stripe/reserve/_plan.py
+++ b/stripe/reserve/_plan.py
@@ -98,7 +98,7 @@ class RollingRelease(StripeObject):
@classmethod
def list(cls, **params: Unpack["PlanListParams"]) -> ListObject["Plan"]:
"""
- Returns a list of ReservePlans previously created. The ReservePlans are returned in sorted order, with the most recent ReservePlans appearing first.
+ Returns a list of ReservePlans on your account or on one of your connected accounts. The ReservePlans are returned in sorted order, with the most recent ReservePlans appearing first.
"""
result = cls._static_request(
"get",
@@ -118,7 +118,7 @@ async def list_async(
cls, **params: Unpack["PlanListParams"]
) -> ListObject["Plan"]:
"""
- Returns a list of ReservePlans previously created. The ReservePlans are returned in sorted order, with the most recent ReservePlans appearing first.
+ Returns a list of ReservePlans on your account or on one of your connected accounts. The ReservePlans are returned in sorted order, with the most recent ReservePlans appearing first.
"""
result = await cls._static_request_async(
"get",
@@ -138,7 +138,7 @@ def retrieve(
cls, id: str, **params: Unpack["PlanRetrieveParams"]
) -> "Plan":
"""
- Retrieve a ReservePlan.
+ Retrieve a ReservePlan on your account or on one of your connected accounts.
"""
instance = cls(id, **params)
instance.refresh()
@@ -149,7 +149,7 @@ async def retrieve_async(
cls, id: str, **params: Unpack["PlanRetrieveParams"]
) -> "Plan":
"""
- Retrieve a ReservePlan.
+ Retrieve a ReservePlan on your account or on one of your connected accounts.
"""
instance = cls(id, **params)
await instance.refresh_async()
diff --git a/stripe/reserve/_plan_service.py b/stripe/reserve/_plan_service.py
index c987e6507..c1796a4c4 100644
--- a/stripe/reserve/_plan_service.py
+++ b/stripe/reserve/_plan_service.py
@@ -20,7 +20,7 @@ def list(
options: Optional["RequestOptions"] = None,
) -> "ListObject[Plan]":
"""
- Returns a list of ReservePlans previously created. The ReservePlans are returned in sorted order, with the most recent ReservePlans appearing first.
+ Returns a list of ReservePlans on your account or on one of your connected accounts. The ReservePlans are returned in sorted order, with the most recent ReservePlans appearing first.
"""
return cast(
"ListObject[Plan]",
@@ -39,7 +39,7 @@ async def list_async(
options: Optional["RequestOptions"] = None,
) -> "ListObject[Plan]":
"""
- Returns a list of ReservePlans previously created. The ReservePlans are returned in sorted order, with the most recent ReservePlans appearing first.
+ Returns a list of ReservePlans on your account or on one of your connected accounts. The ReservePlans are returned in sorted order, with the most recent ReservePlans appearing first.
"""
return cast(
"ListObject[Plan]",
@@ -60,7 +60,7 @@ def retrieve(
options: Optional["RequestOptions"] = None,
) -> "Plan":
"""
- Retrieve a ReservePlan.
+ Retrieve a ReservePlan on your account or on one of your connected accounts.
"""
return cast(
"Plan",
@@ -81,7 +81,7 @@ async def retrieve_async(
options: Optional["RequestOptions"] = None,
) -> "Plan":
"""
- Retrieve a ReservePlan.
+ Retrieve a ReservePlan on your account or on one of your connected accounts.
"""
return cast(
"Plan",
diff --git a/stripe/reserve/_release.py b/stripe/reserve/_release.py
index 222f02ed9..d0eb5386d 100644
--- a/stripe/reserve/_release.py
+++ b/stripe/reserve/_release.py
@@ -106,7 +106,7 @@ def list(
cls, **params: Unpack["ReleaseListParams"]
) -> ListObject["Release"]:
"""
- Returns a list of ReserveReleases previously created. The ReserveReleases are returned in sorted order, with the most recent ReserveReleases appearing first.
+ Returns a list of ReserveReleases on your account or on one of your connected accounts. The ReserveReleases are returned in sorted order, with the most recent ReserveReleases appearing first.
"""
result = cls._static_request(
"get",
@@ -126,7 +126,7 @@ async def list_async(
cls, **params: Unpack["ReleaseListParams"]
) -> ListObject["Release"]:
"""
- Returns a list of ReserveReleases previously created. The ReserveReleases are returned in sorted order, with the most recent ReserveReleases appearing first.
+ Returns a list of ReserveReleases on your account or on one of your connected accounts. The ReserveReleases are returned in sorted order, with the most recent ReserveReleases appearing first.
"""
result = await cls._static_request_async(
"get",
@@ -146,7 +146,7 @@ def retrieve(
cls, id: str, **params: Unpack["ReleaseRetrieveParams"]
) -> "Release":
"""
- Retrieve a ReserveRelease.
+ Retrieve a ReserveRelease on your account or on one of your connected accounts.
"""
instance = cls(id, **params)
instance.refresh()
@@ -157,7 +157,7 @@ async def retrieve_async(
cls, id: str, **params: Unpack["ReleaseRetrieveParams"]
) -> "Release":
"""
- Retrieve a ReserveRelease.
+ Retrieve a ReserveRelease on your account or on one of your connected accounts.
"""
instance = cls(id, **params)
await instance.refresh_async()
diff --git a/stripe/reserve/_release_service.py b/stripe/reserve/_release_service.py
index f453e927c..fc3ea847e 100644
--- a/stripe/reserve/_release_service.py
+++ b/stripe/reserve/_release_service.py
@@ -22,7 +22,7 @@ def list(
options: Optional["RequestOptions"] = None,
) -> "ListObject[Release]":
"""
- Returns a list of ReserveReleases previously created. The ReserveReleases are returned in sorted order, with the most recent ReserveReleases appearing first.
+ Returns a list of ReserveReleases on your account or on one of your connected accounts. The ReserveReleases are returned in sorted order, with the most recent ReserveReleases appearing first.
"""
return cast(
"ListObject[Release]",
@@ -41,7 +41,7 @@ async def list_async(
options: Optional["RequestOptions"] = None,
) -> "ListObject[Release]":
"""
- Returns a list of ReserveReleases previously created. The ReserveReleases are returned in sorted order, with the most recent ReserveReleases appearing first.
+ Returns a list of ReserveReleases on your account or on one of your connected accounts. The ReserveReleases are returned in sorted order, with the most recent ReserveReleases appearing first.
"""
return cast(
"ListObject[Release]",
@@ -62,7 +62,7 @@ def retrieve(
options: Optional["RequestOptions"] = None,
) -> "Release":
"""
- Retrieve a ReserveRelease.
+ Retrieve a ReserveRelease on your account or on one of your connected accounts.
"""
return cast(
"Release",
@@ -83,7 +83,7 @@ async def retrieve_async(
options: Optional["RequestOptions"] = None,
) -> "Release":
"""
- Retrieve a ReserveRelease.
+ Retrieve a ReserveRelease on your account or on one of your connected accounts.
"""
return cast(
"Release",
diff --git a/stripe/shared_payment/_granted_token.py b/stripe/shared_payment/_granted_token.py
index f101d25cd..33d1739d4 100644
--- a/stripe/shared_payment/_granted_token.py
+++ b/stripe/shared_payment/_granted_token.py
@@ -92,11 +92,11 @@ class Card(StripeObject):
class Checks(StripeObject):
address_line1_check: Optional[str]
"""
- If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
+ If an address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
"""
address_postal_code_check: Optional[str]
"""
- If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
+ If an address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
"""
cvc_check: Optional[str]
"""
diff --git a/stripe/terminal/_reader.py b/stripe/terminal/_reader.py
index 9ea316e6e..bf01beaab 100644
--- a/stripe/terminal/_reader.py
+++ b/stripe/terminal/_reader.py
@@ -166,6 +166,7 @@ class ApiError(StripeObject):
"forwarding_api_upstream_connection_timeout",
"forwarding_api_upstream_error",
"idempotency_key_in_use",
+ "inactive_api_operation_confirmation_required",
"incorrect_address",
"incorrect_cvc",
"incorrect_number",
@@ -940,13 +941,18 @@ class LineItem(StripeObject):
"simulated_wisepos_e",
"stripe_m2",
"stripe_s700",
+ "stripe_s700_devkit",
"stripe_s710",
+ "stripe_s710_devkit",
"stripe_t600",
+ "stripe_t600_devkit",
"verifone_P400",
"verifone_m425",
"verifone_p630",
"verifone_ux700",
+ "verifone_ux700_devkit",
"verifone_v660p",
+ "verifone_v660p_devkit",
],
str,
]
diff --git a/stripe/test_helpers/__init__.py b/stripe/test_helpers/__init__.py
index 5d9492927..9c0ff51f4 100644
--- a/stripe/test_helpers/__init__.py
+++ b/stripe/test_helpers/__init__.py
@@ -5,11 +5,15 @@
if TYPE_CHECKING:
from stripe.test_helpers import (
+ capital as capital,
issuing as issuing,
shared_payment as shared_payment,
terminal as terminal,
treasury as treasury,
)
+ from stripe.test_helpers._capital_service import (
+ CapitalService as CapitalService,
+ )
from stripe.test_helpers._confirmation_token_service import (
ConfirmationTokenService as ConfirmationTokenService,
)
@@ -38,10 +42,12 @@
# name -> (import_target, is_submodule)
_import_map = {
+ "capital": ("stripe.test_helpers.capital", True),
"issuing": ("stripe.test_helpers.issuing", True),
"shared_payment": ("stripe.test_helpers.shared_payment", True),
"terminal": ("stripe.test_helpers.terminal", True),
"treasury": ("stripe.test_helpers.treasury", True),
+ "CapitalService": ("stripe.test_helpers._capital_service", False),
"ConfirmationTokenService": (
"stripe.test_helpers._confirmation_token_service",
False,
diff --git a/stripe/test_helpers/_capital_service.py b/stripe/test_helpers/_capital_service.py
new file mode 100644
index 000000000..b528574bb
--- /dev/null
+++ b/stripe/test_helpers/_capital_service.py
@@ -0,0 +1,40 @@
+# -*- coding: utf-8 -*-
+# File generated from our OpenAPI spec
+from stripe._stripe_service import StripeService
+from importlib import import_module
+from typing_extensions import TYPE_CHECKING
+
+if TYPE_CHECKING:
+ from stripe.test_helpers.capital._financing_offer_service import (
+ FinancingOfferService,
+ )
+
+_subservices = {
+ "financing_offers": [
+ "stripe.test_helpers.capital._financing_offer_service",
+ "FinancingOfferService",
+ ],
+}
+
+
+class CapitalService(StripeService):
+ financing_offers: "FinancingOfferService"
+
+ def __init__(self, requestor):
+ super().__init__(requestor)
+
+ def __getattr__(self, name):
+ try:
+ import_from, service = _subservices[name]
+ service_class = getattr(
+ import_module(import_from),
+ service,
+ )
+ setattr(
+ self,
+ name,
+ service_class(self._requestor),
+ )
+ return getattr(self, name)
+ except KeyError:
+ raise AttributeError()
diff --git a/stripe/test_helpers/capital/__init__.py b/stripe/test_helpers/capital/__init__.py
new file mode 100644
index 000000000..cfc715912
--- /dev/null
+++ b/stripe/test_helpers/capital/__init__.py
@@ -0,0 +1,32 @@
+# -*- coding: utf-8 -*-
+# File generated from our OpenAPI spec
+from importlib import import_module
+from typing_extensions import TYPE_CHECKING
+
+if TYPE_CHECKING:
+ from stripe.test_helpers.capital._financing_offer_service import (
+ FinancingOfferService as FinancingOfferService,
+ )
+
+# name -> (import_target, is_submodule)
+_import_map = {
+ "FinancingOfferService": (
+ "stripe.test_helpers.capital._financing_offer_service",
+ False,
+ ),
+}
+if not TYPE_CHECKING:
+
+ def __getattr__(name):
+ try:
+ target, is_submodule = _import_map[name]
+ module = import_module(target)
+ if is_submodule:
+ return module
+
+ return getattr(
+ module,
+ name,
+ )
+ except KeyError:
+ raise AttributeError()
diff --git a/stripe/test_helpers/capital/_financing_offer_service.py b/stripe/test_helpers/capital/_financing_offer_service.py
new file mode 100644
index 000000000..980007193
--- /dev/null
+++ b/stripe/test_helpers/capital/_financing_offer_service.py
@@ -0,0 +1,102 @@
+# -*- coding: utf-8 -*-
+# File generated from our OpenAPI spec
+from stripe._stripe_service import StripeService
+from stripe._util import sanitize_id
+from typing import Optional, cast
+from typing_extensions import TYPE_CHECKING
+
+if TYPE_CHECKING:
+ from stripe._request_options import RequestOptions
+ from stripe.capital._financing_offer import FinancingOffer
+ from stripe.params.test_helpers.capital._financing_offer_create_params import (
+ FinancingOfferCreateParams,
+ )
+ from stripe.params.test_helpers.capital._financing_offer_refill_params import (
+ FinancingOfferRefillParams,
+ )
+
+
+class FinancingOfferService(StripeService):
+ def create(
+ self,
+ params: "FinancingOfferCreateParams",
+ options: Optional["RequestOptions"] = None,
+ ) -> "FinancingOffer":
+ """
+ Creates a test financing offer for a connected account.
+ """
+ return cast(
+ "FinancingOffer",
+ self._request(
+ "post",
+ "/v1/test_helpers/capital/financing_offers",
+ base_address="api",
+ params=params,
+ options=options,
+ ),
+ )
+
+ async def create_async(
+ self,
+ params: "FinancingOfferCreateParams",
+ options: Optional["RequestOptions"] = None,
+ ) -> "FinancingOffer":
+ """
+ Creates a test financing offer for a connected account.
+ """
+ return cast(
+ "FinancingOffer",
+ await self._request_async(
+ "post",
+ "/v1/test_helpers/capital/financing_offers",
+ base_address="api",
+ params=params,
+ options=options,
+ ),
+ )
+
+ def refill(
+ self,
+ financing_offer: str,
+ /,
+ params: "FinancingOfferRefillParams",
+ options: Optional["RequestOptions"] = None,
+ ) -> "FinancingOffer":
+ """
+ Refills a test financing offer for a connected account.
+ """
+ return cast(
+ "FinancingOffer",
+ self._request(
+ "post",
+ "/v1/test_helpers/capital/financing_offers/{financing_offer}/refill".format(
+ financing_offer=sanitize_id(financing_offer),
+ ),
+ base_address="api",
+ params=params,
+ options=options,
+ ),
+ )
+
+ async def refill_async(
+ self,
+ financing_offer: str,
+ /,
+ params: "FinancingOfferRefillParams",
+ options: Optional["RequestOptions"] = None,
+ ) -> "FinancingOffer":
+ """
+ Refills a test financing offer for a connected account.
+ """
+ return cast(
+ "FinancingOffer",
+ await self._request_async(
+ "post",
+ "/v1/test_helpers/capital/financing_offers/{financing_offer}/refill".format(
+ financing_offer=sanitize_id(financing_offer),
+ ),
+ base_address="api",
+ params=params,
+ options=options,
+ ),
+ )
diff --git a/stripe/test_helpers/treasury/_inbound_transfer_service.py b/stripe/test_helpers/treasury/_inbound_transfer_service.py
index 13402c931..086debe86 100644
--- a/stripe/test_helpers/treasury/_inbound_transfer_service.py
+++ b/stripe/test_helpers/treasury/_inbound_transfer_service.py
@@ -28,7 +28,7 @@ def fail(
options: Optional["RequestOptions"] = None,
) -> "InboundTransfer":
"""
- Transitions a test mode created InboundTransfer to the failed status. The InboundTransfer must already be in the processing state.
+ Transitions a test InboundTransfer to the failed status. The InboundTransfer must already be in the processing state.
"""
return cast(
"InboundTransfer",
@@ -51,7 +51,7 @@ async def fail_async(
options: Optional["RequestOptions"] = None,
) -> "InboundTransfer":
"""
- Transitions a test mode created InboundTransfer to the failed status. The InboundTransfer must already be in the processing state.
+ Transitions a test InboundTransfer to the failed status. The InboundTransfer must already be in the processing state.
"""
return cast(
"InboundTransfer",
@@ -74,7 +74,7 @@ def return_inbound_transfer(
options: Optional["RequestOptions"] = None,
) -> "InboundTransfer":
"""
- Marks the test mode InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the succeeded state.
+ Marks the test InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the succeeded state.
"""
return cast(
"InboundTransfer",
@@ -97,7 +97,7 @@ async def return_inbound_transfer_async(
options: Optional["RequestOptions"] = None,
) -> "InboundTransfer":
"""
- Marks the test mode InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the succeeded state.
+ Marks the test InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the succeeded state.
"""
return cast(
"InboundTransfer",
@@ -120,7 +120,7 @@ def succeed(
options: Optional["RequestOptions"] = None,
) -> "InboundTransfer":
"""
- Transitions a test mode created InboundTransfer to the succeeded status. The InboundTransfer must already be in the processing state.
+ Transitions a test InboundTransfer to the succeeded status. The InboundTransfer must already be in the processing state.
"""
return cast(
"InboundTransfer",
@@ -143,7 +143,7 @@ async def succeed_async(
options: Optional["RequestOptions"] = None,
) -> "InboundTransfer":
"""
- Transitions a test mode created InboundTransfer to the succeeded status. The InboundTransfer must already be in the processing state.
+ Transitions a test InboundTransfer to the succeeded status. The InboundTransfer must already be in the processing state.
"""
return cast(
"InboundTransfer",
diff --git a/stripe/test_helpers/treasury/_outbound_payment_service.py b/stripe/test_helpers/treasury/_outbound_payment_service.py
index e3c187e54..7be2c5dcc 100644
--- a/stripe/test_helpers/treasury/_outbound_payment_service.py
+++ b/stripe/test_helpers/treasury/_outbound_payment_service.py
@@ -31,7 +31,7 @@ def update(
options: Optional["RequestOptions"] = None,
) -> "OutboundPayment":
"""
- Updates a test mode created OutboundPayment with tracking details. The OutboundPayment must not be cancelable, and cannot be in the canceled or failed states.
+ Updates a test OutboundPayment with tracking details. The OutboundPayment must not be cancelable, and can't be in the canceled or failed states.
"""
return cast(
"OutboundPayment",
@@ -54,7 +54,7 @@ async def update_async(
options: Optional["RequestOptions"] = None,
) -> "OutboundPayment":
"""
- Updates a test mode created OutboundPayment with tracking details. The OutboundPayment must not be cancelable, and cannot be in the canceled or failed states.
+ Updates a test OutboundPayment with tracking details. The OutboundPayment must not be cancelable, and can't be in the canceled or failed states.
"""
return cast(
"OutboundPayment",
@@ -77,7 +77,7 @@ def fail(
options: Optional["RequestOptions"] = None,
) -> "OutboundPayment":
"""
- Transitions a test mode created OutboundPayment to the failed status. The OutboundPayment must already be in the processing state.
+ Transitions a test OutboundPayment to the failed status. The OutboundPayment must already be in the processing state.
"""
return cast(
"OutboundPayment",
@@ -100,7 +100,7 @@ async def fail_async(
options: Optional["RequestOptions"] = None,
) -> "OutboundPayment":
"""
- Transitions a test mode created OutboundPayment to the failed status. The OutboundPayment must already be in the processing state.
+ Transitions a test OutboundPayment to the failed status. The OutboundPayment must already be in the processing state.
"""
return cast(
"OutboundPayment",
@@ -123,7 +123,7 @@ def post(
options: Optional["RequestOptions"] = None,
) -> "OutboundPayment":
"""
- Transitions a test mode created OutboundPayment to the posted status. The OutboundPayment must already be in the processing state.
+ Transitions a test OutboundPayment to the posted status. The OutboundPayment must already be in the processing state.
"""
return cast(
"OutboundPayment",
@@ -146,7 +146,7 @@ async def post_async(
options: Optional["RequestOptions"] = None,
) -> "OutboundPayment":
"""
- Transitions a test mode created OutboundPayment to the posted status. The OutboundPayment must already be in the processing state.
+ Transitions a test OutboundPayment to the posted status. The OutboundPayment must already be in the processing state.
"""
return cast(
"OutboundPayment",
@@ -169,7 +169,7 @@ def return_outbound_payment(
options: Optional["RequestOptions"] = None,
) -> "OutboundPayment":
"""
- Transitions a test mode created OutboundPayment to the returned status. The OutboundPayment must already be in the processing state.
+ Transitions a test OutboundPayment to the returned status. The OutboundPayment must already be in the posted state.
"""
return cast(
"OutboundPayment",
@@ -192,7 +192,7 @@ async def return_outbound_payment_async(
options: Optional["RequestOptions"] = None,
) -> "OutboundPayment":
"""
- Transitions a test mode created OutboundPayment to the returned status. The OutboundPayment must already be in the processing state.
+ Transitions a test OutboundPayment to the returned status. The OutboundPayment must already be in the posted state.
"""
return cast(
"OutboundPayment",
diff --git a/stripe/test_helpers/treasury/_outbound_transfer_service.py b/stripe/test_helpers/treasury/_outbound_transfer_service.py
index eca1872cd..1df1e5311 100644
--- a/stripe/test_helpers/treasury/_outbound_transfer_service.py
+++ b/stripe/test_helpers/treasury/_outbound_transfer_service.py
@@ -31,7 +31,7 @@ def update(
options: Optional["RequestOptions"] = None,
) -> "OutboundTransfer":
"""
- Updates a test mode created OutboundTransfer with tracking details. The OutboundTransfer must not be cancelable, and cannot be in the canceled or failed states.
+ Updates a test OutboundTransfer with tracking details. The OutboundTransfer must not be cancelable, and can't be in the canceled or failed states.
"""
return cast(
"OutboundTransfer",
@@ -54,7 +54,7 @@ async def update_async(
options: Optional["RequestOptions"] = None,
) -> "OutboundTransfer":
"""
- Updates a test mode created OutboundTransfer with tracking details. The OutboundTransfer must not be cancelable, and cannot be in the canceled or failed states.
+ Updates a test OutboundTransfer with tracking details. The OutboundTransfer must not be cancelable, and can't be in the canceled or failed states.
"""
return cast(
"OutboundTransfer",
@@ -77,7 +77,7 @@ def fail(
options: Optional["RequestOptions"] = None,
) -> "OutboundTransfer":
"""
- Transitions a test mode created OutboundTransfer to the failed status. The OutboundTransfer must already be in the processing state.
+ Transitions a test OutboundTransfer to the failed status. The OutboundTransfer must already be in the processing state.
"""
return cast(
"OutboundTransfer",
@@ -100,7 +100,7 @@ async def fail_async(
options: Optional["RequestOptions"] = None,
) -> "OutboundTransfer":
"""
- Transitions a test mode created OutboundTransfer to the failed status. The OutboundTransfer must already be in the processing state.
+ Transitions a test OutboundTransfer to the failed status. The OutboundTransfer must already be in the processing state.
"""
return cast(
"OutboundTransfer",
@@ -123,7 +123,7 @@ def post(
options: Optional["RequestOptions"] = None,
) -> "OutboundTransfer":
"""
- Transitions a test mode created OutboundTransfer to the posted status. The OutboundTransfer must already be in the processing state.
+ Transitions a test OutboundTransfer to the posted status. The OutboundTransfer must already be in the processing state.
"""
return cast(
"OutboundTransfer",
@@ -146,7 +146,7 @@ async def post_async(
options: Optional["RequestOptions"] = None,
) -> "OutboundTransfer":
"""
- Transitions a test mode created OutboundTransfer to the posted status. The OutboundTransfer must already be in the processing state.
+ Transitions a test OutboundTransfer to the posted status. The OutboundTransfer must already be in the processing state.
"""
return cast(
"OutboundTransfer",
@@ -171,7 +171,7 @@ def return_outbound_transfer(
options: Optional["RequestOptions"] = None,
) -> "OutboundTransfer":
"""
- Transitions a test mode created OutboundTransfer to the returned status. The OutboundTransfer must already be in the processing state.
+ Transitions a test OutboundTransfer to the returned status. The OutboundTransfer must already be in the posted state.
"""
return cast(
"OutboundTransfer",
@@ -196,7 +196,7 @@ async def return_outbound_transfer_async(
options: Optional["RequestOptions"] = None,
) -> "OutboundTransfer":
"""
- Transitions a test mode created OutboundTransfer to the returned status. The OutboundTransfer must already be in the processing state.
+ Transitions a test OutboundTransfer to the returned status. The OutboundTransfer must already be in the posted state.
"""
return cast(
"OutboundTransfer",
diff --git a/stripe/test_helpers/treasury/_received_credit_service.py b/stripe/test_helpers/treasury/_received_credit_service.py
index b0ffb9ffe..82d4b7624 100644
--- a/stripe/test_helpers/treasury/_received_credit_service.py
+++ b/stripe/test_helpers/treasury/_received_credit_service.py
@@ -19,7 +19,7 @@ def create(
options: Optional["RequestOptions"] = None,
) -> "ReceivedCredit":
"""
- Use this endpoint to simulate a test mode ReceivedCredit initiated by a third party. In live mode, you can't directly create ReceivedCredits initiated by third parties.
+ Simulates a test ReceivedCredit initiated by a third party. In live mode, you can't directly create ReceivedCredit objects initiated by third parties.
"""
return cast(
"ReceivedCredit",
@@ -38,7 +38,7 @@ async def create_async(
options: Optional["RequestOptions"] = None,
) -> "ReceivedCredit":
"""
- Use this endpoint to simulate a test mode ReceivedCredit initiated by a third party. In live mode, you can't directly create ReceivedCredits initiated by third parties.
+ Simulates a test ReceivedCredit initiated by a third party. In live mode, you can't directly create ReceivedCredit objects initiated by third parties.
"""
return cast(
"ReceivedCredit",
diff --git a/stripe/test_helpers/treasury/_received_debit_service.py b/stripe/test_helpers/treasury/_received_debit_service.py
index 4b86843ac..cb4bac603 100644
--- a/stripe/test_helpers/treasury/_received_debit_service.py
+++ b/stripe/test_helpers/treasury/_received_debit_service.py
@@ -19,7 +19,7 @@ def create(
options: Optional["RequestOptions"] = None,
) -> "ReceivedDebit":
"""
- Use this endpoint to simulate a test mode ReceivedDebit initiated by a third party. In live mode, you can't directly create ReceivedDebits initiated by third parties.
+ Simulates a test ReceivedDebit initiated by a third party. In live mode, you can't directly create ReceivedDebit objects initiated by third parties.
"""
return cast(
"ReceivedDebit",
@@ -38,7 +38,7 @@ async def create_async(
options: Optional["RequestOptions"] = None,
) -> "ReceivedDebit":
"""
- Use this endpoint to simulate a test mode ReceivedDebit initiated by a third party. In live mode, you can't directly create ReceivedDebits initiated by third parties.
+ Simulates a test ReceivedDebit initiated by a third party. In live mode, you can't directly create ReceivedDebit objects initiated by third parties.
"""
return cast(
"ReceivedDebit",
diff --git a/stripe/treasury/_inbound_transfer.py b/stripe/treasury/_inbound_transfer.py
index b2861a4d6..5028da9f9 100644
--- a/stripe/treasury/_inbound_transfer.py
+++ b/stripe/treasury/_inbound_transfer.py
@@ -53,6 +53,23 @@ class InboundTransfer(
)
class FailureDetails(StripeObject):
+ class NetworkDetails(StripeObject):
+ class Ach(StripeObject):
+ return_code: Optional[str]
+ """
+ NACHA ACH return code.
+ """
+ return_reason: Optional[str]
+ """
+ NACHA ACH return reason.
+ """
+
+ ach: Optional[Ach]
+ """
+ ACH return details.
+ """
+ _inner_class_types = {"ach": Ach}
+
code: Union[
Literal[
"account_closed",
@@ -74,6 +91,11 @@ class FailureDetails(StripeObject):
"""
Reason for the failure.
"""
+ network_details: Optional[NetworkDetails]
+ """
+ Money movement network-specific details regarding the failure.
+ """
+ _inner_class_types = {"network_details": NetworkDetails}
class LinkedFlows(StripeObject):
received_debit: Optional[str]
@@ -480,7 +502,7 @@ def _cls_fail(
cls, id: str, /, **params: Unpack["InboundTransferFailParams"]
) -> "InboundTransfer":
"""
- Transitions a test mode created InboundTransfer to the failed status. The InboundTransfer must already be in the processing state.
+ Transitions a test InboundTransfer to the failed status. The InboundTransfer must already be in the processing state.
"""
return cast(
"InboundTransfer",
@@ -499,7 +521,7 @@ def fail(
id: str, /, **params: Unpack["InboundTransferFailParams"]
) -> "InboundTransfer":
"""
- Transitions a test mode created InboundTransfer to the failed status. The InboundTransfer must already be in the processing state.
+ Transitions a test InboundTransfer to the failed status. The InboundTransfer must already be in the processing state.
"""
...
@@ -508,7 +530,7 @@ def fail(
self, **params: Unpack["InboundTransferFailParams"]
) -> "InboundTransfer":
"""
- Transitions a test mode created InboundTransfer to the failed status. The InboundTransfer must already be in the processing state.
+ Transitions a test InboundTransfer to the failed status. The InboundTransfer must already be in the processing state.
"""
...
@@ -517,7 +539,7 @@ def fail(
self, **params: Unpack["InboundTransferFailParams"]
) -> "InboundTransfer":
"""
- Transitions a test mode created InboundTransfer to the failed status. The InboundTransfer must already be in the processing state.
+ Transitions a test InboundTransfer to the failed status. The InboundTransfer must already be in the processing state.
"""
return cast(
"InboundTransfer",
@@ -535,7 +557,7 @@ async def _cls_fail_async(
cls, id: str, /, **params: Unpack["InboundTransferFailParams"]
) -> "InboundTransfer":
"""
- Transitions a test mode created InboundTransfer to the failed status. The InboundTransfer must already be in the processing state.
+ Transitions a test InboundTransfer to the failed status. The InboundTransfer must already be in the processing state.
"""
return cast(
"InboundTransfer",
@@ -554,7 +576,7 @@ async def fail_async(
id: str, /, **params: Unpack["InboundTransferFailParams"]
) -> "InboundTransfer":
"""
- Transitions a test mode created InboundTransfer to the failed status. The InboundTransfer must already be in the processing state.
+ Transitions a test InboundTransfer to the failed status. The InboundTransfer must already be in the processing state.
"""
...
@@ -563,7 +585,7 @@ async def fail_async(
self, **params: Unpack["InboundTransferFailParams"]
) -> "InboundTransfer":
"""
- Transitions a test mode created InboundTransfer to the failed status. The InboundTransfer must already be in the processing state.
+ Transitions a test InboundTransfer to the failed status. The InboundTransfer must already be in the processing state.
"""
...
@@ -572,7 +594,7 @@ async def fail_async(
self, **params: Unpack["InboundTransferFailParams"]
) -> "InboundTransfer":
"""
- Transitions a test mode created InboundTransfer to the failed status. The InboundTransfer must already be in the processing state.
+ Transitions a test InboundTransfer to the failed status. The InboundTransfer must already be in the processing state.
"""
return cast(
"InboundTransfer",
@@ -593,7 +615,7 @@ def _cls_return_inbound_transfer(
**params: Unpack["InboundTransferReturnInboundTransferParams"],
) -> "InboundTransfer":
"""
- Marks the test mode InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the succeeded state.
+ Marks the test InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the succeeded state.
"""
return cast(
"InboundTransfer",
@@ -614,7 +636,7 @@ def return_inbound_transfer(
**params: Unpack["InboundTransferReturnInboundTransferParams"],
) -> "InboundTransfer":
"""
- Marks the test mode InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the succeeded state.
+ Marks the test InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the succeeded state.
"""
...
@@ -624,7 +646,7 @@ def return_inbound_transfer(
**params: Unpack["InboundTransferReturnInboundTransferParams"],
) -> "InboundTransfer":
"""
- Marks the test mode InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the succeeded state.
+ Marks the test InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the succeeded state.
"""
...
@@ -634,7 +656,7 @@ def return_inbound_transfer(
**params: Unpack["InboundTransferReturnInboundTransferParams"],
) -> "InboundTransfer":
"""
- Marks the test mode InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the succeeded state.
+ Marks the test InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the succeeded state.
"""
return cast(
"InboundTransfer",
@@ -655,7 +677,7 @@ async def _cls_return_inbound_transfer_async(
**params: Unpack["InboundTransferReturnInboundTransferParams"],
) -> "InboundTransfer":
"""
- Marks the test mode InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the succeeded state.
+ Marks the test InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the succeeded state.
"""
return cast(
"InboundTransfer",
@@ -676,7 +698,7 @@ async def return_inbound_transfer_async(
**params: Unpack["InboundTransferReturnInboundTransferParams"],
) -> "InboundTransfer":
"""
- Marks the test mode InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the succeeded state.
+ Marks the test InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the succeeded state.
"""
...
@@ -686,7 +708,7 @@ async def return_inbound_transfer_async(
**params: Unpack["InboundTransferReturnInboundTransferParams"],
) -> "InboundTransfer":
"""
- Marks the test mode InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the succeeded state.
+ Marks the test InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the succeeded state.
"""
...
@@ -696,7 +718,7 @@ async def return_inbound_transfer_async(
**params: Unpack["InboundTransferReturnInboundTransferParams"],
) -> "InboundTransfer":
"""
- Marks the test mode InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the succeeded state.
+ Marks the test InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the succeeded state.
"""
return cast(
"InboundTransfer",
@@ -714,7 +736,7 @@ def _cls_succeed(
cls, id: str, /, **params: Unpack["InboundTransferSucceedParams"]
) -> "InboundTransfer":
"""
- Transitions a test mode created InboundTransfer to the succeeded status. The InboundTransfer must already be in the processing state.
+ Transitions a test InboundTransfer to the succeeded status. The InboundTransfer must already be in the processing state.
"""
return cast(
"InboundTransfer",
@@ -733,7 +755,7 @@ def succeed(
id: str, /, **params: Unpack["InboundTransferSucceedParams"]
) -> "InboundTransfer":
"""
- Transitions a test mode created InboundTransfer to the succeeded status. The InboundTransfer must already be in the processing state.
+ Transitions a test InboundTransfer to the succeeded status. The InboundTransfer must already be in the processing state.
"""
...
@@ -742,7 +764,7 @@ def succeed(
self, **params: Unpack["InboundTransferSucceedParams"]
) -> "InboundTransfer":
"""
- Transitions a test mode created InboundTransfer to the succeeded status. The InboundTransfer must already be in the processing state.
+ Transitions a test InboundTransfer to the succeeded status. The InboundTransfer must already be in the processing state.
"""
...
@@ -751,7 +773,7 @@ def succeed(
self, **params: Unpack["InboundTransferSucceedParams"]
) -> "InboundTransfer":
"""
- Transitions a test mode created InboundTransfer to the succeeded status. The InboundTransfer must already be in the processing state.
+ Transitions a test InboundTransfer to the succeeded status. The InboundTransfer must already be in the processing state.
"""
return cast(
"InboundTransfer",
@@ -769,7 +791,7 @@ async def _cls_succeed_async(
cls, id: str, /, **params: Unpack["InboundTransferSucceedParams"]
) -> "InboundTransfer":
"""
- Transitions a test mode created InboundTransfer to the succeeded status. The InboundTransfer must already be in the processing state.
+ Transitions a test InboundTransfer to the succeeded status. The InboundTransfer must already be in the processing state.
"""
return cast(
"InboundTransfer",
@@ -788,7 +810,7 @@ async def succeed_async(
id: str, /, **params: Unpack["InboundTransferSucceedParams"]
) -> "InboundTransfer":
"""
- Transitions a test mode created InboundTransfer to the succeeded status. The InboundTransfer must already be in the processing state.
+ Transitions a test InboundTransfer to the succeeded status. The InboundTransfer must already be in the processing state.
"""
...
@@ -797,7 +819,7 @@ async def succeed_async(
self, **params: Unpack["InboundTransferSucceedParams"]
) -> "InboundTransfer":
"""
- Transitions a test mode created InboundTransfer to the succeeded status. The InboundTransfer must already be in the processing state.
+ Transitions a test InboundTransfer to the succeeded status. The InboundTransfer must already be in the processing state.
"""
...
@@ -806,7 +828,7 @@ async def succeed_async(
self, **params: Unpack["InboundTransferSucceedParams"]
) -> "InboundTransfer":
"""
- Transitions a test mode created InboundTransfer to the succeeded status. The InboundTransfer must already be in the processing state.
+ Transitions a test InboundTransfer to the succeeded status. The InboundTransfer must already be in the processing state.
"""
return cast(
"InboundTransfer",
diff --git a/stripe/treasury/_outbound_payment.py b/stripe/treasury/_outbound_payment.py
index d2ef498b6..519680454 100644
--- a/stripe/treasury/_outbound_payment.py
+++ b/stripe/treasury/_outbound_payment.py
@@ -166,6 +166,23 @@ class EndUserDetails(StripeObject):
"""
class ReturnedDetails(StripeObject):
+ class NetworkDetails(StripeObject):
+ class Ach(StripeObject):
+ return_code: Optional[str]
+ """
+ NACHA ACH return code.
+ """
+ return_reason: Optional[str]
+ """
+ NACHA ACH return reason.
+ """
+
+ ach: Optional[Ach]
+ """
+ ACH return details.
+ """
+ _inner_class_types = {"ach": Ach}
+
code: Union[
Literal[
"account_closed",
@@ -184,10 +201,15 @@ class ReturnedDetails(StripeObject):
"""
Reason for the return.
"""
+ network_details: Optional[NetworkDetails]
+ """
+ Money movement network-specific details regarding the failure.
+ """
transaction: ExpandableField["Transaction"]
"""
The Transaction associated with this object.
"""
+ _inner_class_types = {"network_details": NetworkDetails}
class StatusTransitions(StripeObject):
canceled_at: Optional[int]
@@ -542,7 +564,7 @@ def _cls_fail(
cls, id: str, /, **params: Unpack["OutboundPaymentFailParams"]
) -> "OutboundPayment":
"""
- Transitions a test mode created OutboundPayment to the failed status. The OutboundPayment must already be in the processing state.
+ Transitions a test OutboundPayment to the failed status. The OutboundPayment must already be in the processing state.
"""
return cast(
"OutboundPayment",
@@ -561,7 +583,7 @@ def fail(
id: str, /, **params: Unpack["OutboundPaymentFailParams"]
) -> "OutboundPayment":
"""
- Transitions a test mode created OutboundPayment to the failed status. The OutboundPayment must already be in the processing state.
+ Transitions a test OutboundPayment to the failed status. The OutboundPayment must already be in the processing state.
"""
...
@@ -570,7 +592,7 @@ def fail(
self, **params: Unpack["OutboundPaymentFailParams"]
) -> "OutboundPayment":
"""
- Transitions a test mode created OutboundPayment to the failed status. The OutboundPayment must already be in the processing state.
+ Transitions a test OutboundPayment to the failed status. The OutboundPayment must already be in the processing state.
"""
...
@@ -579,7 +601,7 @@ def fail(
self, **params: Unpack["OutboundPaymentFailParams"]
) -> "OutboundPayment":
"""
- Transitions a test mode created OutboundPayment to the failed status. The OutboundPayment must already be in the processing state.
+ Transitions a test OutboundPayment to the failed status. The OutboundPayment must already be in the processing state.
"""
return cast(
"OutboundPayment",
@@ -597,7 +619,7 @@ async def _cls_fail_async(
cls, id: str, /, **params: Unpack["OutboundPaymentFailParams"]
) -> "OutboundPayment":
"""
- Transitions a test mode created OutboundPayment to the failed status. The OutboundPayment must already be in the processing state.
+ Transitions a test OutboundPayment to the failed status. The OutboundPayment must already be in the processing state.
"""
return cast(
"OutboundPayment",
@@ -616,7 +638,7 @@ async def fail_async(
id: str, /, **params: Unpack["OutboundPaymentFailParams"]
) -> "OutboundPayment":
"""
- Transitions a test mode created OutboundPayment to the failed status. The OutboundPayment must already be in the processing state.
+ Transitions a test OutboundPayment to the failed status. The OutboundPayment must already be in the processing state.
"""
...
@@ -625,7 +647,7 @@ async def fail_async(
self, **params: Unpack["OutboundPaymentFailParams"]
) -> "OutboundPayment":
"""
- Transitions a test mode created OutboundPayment to the failed status. The OutboundPayment must already be in the processing state.
+ Transitions a test OutboundPayment to the failed status. The OutboundPayment must already be in the processing state.
"""
...
@@ -634,7 +656,7 @@ async def fail_async(
self, **params: Unpack["OutboundPaymentFailParams"]
) -> "OutboundPayment":
"""
- Transitions a test mode created OutboundPayment to the failed status. The OutboundPayment must already be in the processing state.
+ Transitions a test OutboundPayment to the failed status. The OutboundPayment must already be in the processing state.
"""
return cast(
"OutboundPayment",
@@ -652,7 +674,7 @@ def _cls_post(
cls, id: str, /, **params: Unpack["OutboundPaymentPostParams"]
) -> "OutboundPayment":
"""
- Transitions a test mode created OutboundPayment to the posted status. The OutboundPayment must already be in the processing state.
+ Transitions a test OutboundPayment to the posted status. The OutboundPayment must already be in the processing state.
"""
return cast(
"OutboundPayment",
@@ -671,7 +693,7 @@ def post(
id: str, /, **params: Unpack["OutboundPaymentPostParams"]
) -> "OutboundPayment":
"""
- Transitions a test mode created OutboundPayment to the posted status. The OutboundPayment must already be in the processing state.
+ Transitions a test OutboundPayment to the posted status. The OutboundPayment must already be in the processing state.
"""
...
@@ -680,7 +702,7 @@ def post(
self, **params: Unpack["OutboundPaymentPostParams"]
) -> "OutboundPayment":
"""
- Transitions a test mode created OutboundPayment to the posted status. The OutboundPayment must already be in the processing state.
+ Transitions a test OutboundPayment to the posted status. The OutboundPayment must already be in the processing state.
"""
...
@@ -689,7 +711,7 @@ def post(
self, **params: Unpack["OutboundPaymentPostParams"]
) -> "OutboundPayment":
"""
- Transitions a test mode created OutboundPayment to the posted status. The OutboundPayment must already be in the processing state.
+ Transitions a test OutboundPayment to the posted status. The OutboundPayment must already be in the processing state.
"""
return cast(
"OutboundPayment",
@@ -707,7 +729,7 @@ async def _cls_post_async(
cls, id: str, /, **params: Unpack["OutboundPaymentPostParams"]
) -> "OutboundPayment":
"""
- Transitions a test mode created OutboundPayment to the posted status. The OutboundPayment must already be in the processing state.
+ Transitions a test OutboundPayment to the posted status. The OutboundPayment must already be in the processing state.
"""
return cast(
"OutboundPayment",
@@ -726,7 +748,7 @@ async def post_async(
id: str, /, **params: Unpack["OutboundPaymentPostParams"]
) -> "OutboundPayment":
"""
- Transitions a test mode created OutboundPayment to the posted status. The OutboundPayment must already be in the processing state.
+ Transitions a test OutboundPayment to the posted status. The OutboundPayment must already be in the processing state.
"""
...
@@ -735,7 +757,7 @@ async def post_async(
self, **params: Unpack["OutboundPaymentPostParams"]
) -> "OutboundPayment":
"""
- Transitions a test mode created OutboundPayment to the posted status. The OutboundPayment must already be in the processing state.
+ Transitions a test OutboundPayment to the posted status. The OutboundPayment must already be in the processing state.
"""
...
@@ -744,7 +766,7 @@ async def post_async(
self, **params: Unpack["OutboundPaymentPostParams"]
) -> "OutboundPayment":
"""
- Transitions a test mode created OutboundPayment to the posted status. The OutboundPayment must already be in the processing state.
+ Transitions a test OutboundPayment to the posted status. The OutboundPayment must already be in the processing state.
"""
return cast(
"OutboundPayment",
@@ -765,7 +787,7 @@ def _cls_return_outbound_payment(
**params: Unpack["OutboundPaymentReturnOutboundPaymentParams"],
) -> "OutboundPayment":
"""
- Transitions a test mode created OutboundPayment to the returned status. The OutboundPayment must already be in the processing state.
+ Transitions a test OutboundPayment to the returned status. The OutboundPayment must already be in the posted state.
"""
return cast(
"OutboundPayment",
@@ -786,7 +808,7 @@ def return_outbound_payment(
**params: Unpack["OutboundPaymentReturnOutboundPaymentParams"],
) -> "OutboundPayment":
"""
- Transitions a test mode created OutboundPayment to the returned status. The OutboundPayment must already be in the processing state.
+ Transitions a test OutboundPayment to the returned status. The OutboundPayment must already be in the posted state.
"""
...
@@ -796,7 +818,7 @@ def return_outbound_payment(
**params: Unpack["OutboundPaymentReturnOutboundPaymentParams"],
) -> "OutboundPayment":
"""
- Transitions a test mode created OutboundPayment to the returned status. The OutboundPayment must already be in the processing state.
+ Transitions a test OutboundPayment to the returned status. The OutboundPayment must already be in the posted state.
"""
...
@@ -806,7 +828,7 @@ def return_outbound_payment(
**params: Unpack["OutboundPaymentReturnOutboundPaymentParams"],
) -> "OutboundPayment":
"""
- Transitions a test mode created OutboundPayment to the returned status. The OutboundPayment must already be in the processing state.
+ Transitions a test OutboundPayment to the returned status. The OutboundPayment must already be in the posted state.
"""
return cast(
"OutboundPayment",
@@ -827,7 +849,7 @@ async def _cls_return_outbound_payment_async(
**params: Unpack["OutboundPaymentReturnOutboundPaymentParams"],
) -> "OutboundPayment":
"""
- Transitions a test mode created OutboundPayment to the returned status. The OutboundPayment must already be in the processing state.
+ Transitions a test OutboundPayment to the returned status. The OutboundPayment must already be in the posted state.
"""
return cast(
"OutboundPayment",
@@ -848,7 +870,7 @@ async def return_outbound_payment_async(
**params: Unpack["OutboundPaymentReturnOutboundPaymentParams"],
) -> "OutboundPayment":
"""
- Transitions a test mode created OutboundPayment to the returned status. The OutboundPayment must already be in the processing state.
+ Transitions a test OutboundPayment to the returned status. The OutboundPayment must already be in the posted state.
"""
...
@@ -858,7 +880,7 @@ async def return_outbound_payment_async(
**params: Unpack["OutboundPaymentReturnOutboundPaymentParams"],
) -> "OutboundPayment":
"""
- Transitions a test mode created OutboundPayment to the returned status. The OutboundPayment must already be in the processing state.
+ Transitions a test OutboundPayment to the returned status. The OutboundPayment must already be in the posted state.
"""
...
@@ -868,7 +890,7 @@ async def return_outbound_payment_async(
**params: Unpack["OutboundPaymentReturnOutboundPaymentParams"],
) -> "OutboundPayment":
"""
- Transitions a test mode created OutboundPayment to the returned status. The OutboundPayment must already be in the processing state.
+ Transitions a test OutboundPayment to the returned status. The OutboundPayment must already be in the posted state.
"""
return cast(
"OutboundPayment",
@@ -886,7 +908,7 @@ def _cls_update(
cls, id: str, /, **params: Unpack["OutboundPaymentUpdateParams"]
) -> "OutboundPayment":
"""
- Updates a test mode created OutboundPayment with tracking details. The OutboundPayment must not be cancelable, and cannot be in the canceled or failed states.
+ Updates a test OutboundPayment with tracking details. The OutboundPayment must not be cancelable, and can't be in the canceled or failed states.
"""
return cast(
"OutboundPayment",
@@ -905,7 +927,7 @@ def update(
id: str, /, **params: Unpack["OutboundPaymentUpdateParams"]
) -> "OutboundPayment":
"""
- Updates a test mode created OutboundPayment with tracking details. The OutboundPayment must not be cancelable, and cannot be in the canceled or failed states.
+ Updates a test OutboundPayment with tracking details. The OutboundPayment must not be cancelable, and can't be in the canceled or failed states.
"""
...
@@ -914,7 +936,7 @@ def update(
self, **params: Unpack["OutboundPaymentUpdateParams"]
) -> "OutboundPayment":
"""
- Updates a test mode created OutboundPayment with tracking details. The OutboundPayment must not be cancelable, and cannot be in the canceled or failed states.
+ Updates a test OutboundPayment with tracking details. The OutboundPayment must not be cancelable, and can't be in the canceled or failed states.
"""
...
@@ -923,7 +945,7 @@ def update(
self, **params: Unpack["OutboundPaymentUpdateParams"]
) -> "OutboundPayment":
"""
- Updates a test mode created OutboundPayment with tracking details. The OutboundPayment must not be cancelable, and cannot be in the canceled or failed states.
+ Updates a test OutboundPayment with tracking details. The OutboundPayment must not be cancelable, and can't be in the canceled or failed states.
"""
return cast(
"OutboundPayment",
@@ -941,7 +963,7 @@ async def _cls_update_async(
cls, id: str, /, **params: Unpack["OutboundPaymentUpdateParams"]
) -> "OutboundPayment":
"""
- Updates a test mode created OutboundPayment with tracking details. The OutboundPayment must not be cancelable, and cannot be in the canceled or failed states.
+ Updates a test OutboundPayment with tracking details. The OutboundPayment must not be cancelable, and can't be in the canceled or failed states.
"""
return cast(
"OutboundPayment",
@@ -960,7 +982,7 @@ async def update_async(
id: str, /, **params: Unpack["OutboundPaymentUpdateParams"]
) -> "OutboundPayment":
"""
- Updates a test mode created OutboundPayment with tracking details. The OutboundPayment must not be cancelable, and cannot be in the canceled or failed states.
+ Updates a test OutboundPayment with tracking details. The OutboundPayment must not be cancelable, and can't be in the canceled or failed states.
"""
...
@@ -969,7 +991,7 @@ async def update_async(
self, **params: Unpack["OutboundPaymentUpdateParams"]
) -> "OutboundPayment":
"""
- Updates a test mode created OutboundPayment with tracking details. The OutboundPayment must not be cancelable, and cannot be in the canceled or failed states.
+ Updates a test OutboundPayment with tracking details. The OutboundPayment must not be cancelable, and can't be in the canceled or failed states.
"""
...
@@ -978,7 +1000,7 @@ async def update_async(
self, **params: Unpack["OutboundPaymentUpdateParams"]
) -> "OutboundPayment":
"""
- Updates a test mode created OutboundPayment with tracking details. The OutboundPayment must not be cancelable, and cannot be in the canceled or failed states.
+ Updates a test OutboundPayment with tracking details. The OutboundPayment must not be cancelable, and can't be in the canceled or failed states.
"""
return cast(
"OutboundPayment",
diff --git a/stripe/treasury/_outbound_transfer.py b/stripe/treasury/_outbound_transfer.py
index fc483a065..9dc0b0ae6 100644
--- a/stripe/treasury/_outbound_transfer.py
+++ b/stripe/treasury/_outbound_transfer.py
@@ -173,6 +173,23 @@ class Ach(StripeObject):
_inner_class_types = {"ach": Ach}
class ReturnedDetails(StripeObject):
+ class NetworkDetails(StripeObject):
+ class Ach(StripeObject):
+ return_code: Optional[str]
+ """
+ NACHA ACH return code.
+ """
+ return_reason: Optional[str]
+ """
+ NACHA ACH return reason.
+ """
+
+ ach: Optional[Ach]
+ """
+ ACH return details.
+ """
+ _inner_class_types = {"ach": Ach}
+
code: Union[
Literal[
"account_closed",
@@ -191,10 +208,15 @@ class ReturnedDetails(StripeObject):
"""
Reason for the return.
"""
+ network_details: Optional[NetworkDetails]
+ """
+ Money movement network-specific details regarding the failure.
+ """
transaction: ExpandableField["Transaction"]
"""
The Transaction associated with this object.
"""
+ _inner_class_types = {"network_details": NetworkDetails}
class StatusTransitions(StripeObject):
canceled_at: Optional[int]
@@ -549,7 +571,7 @@ def _cls_fail(
**params: Unpack["OutboundTransferFailParams"],
) -> "OutboundTransfer":
"""
- Transitions a test mode created OutboundTransfer to the failed status. The OutboundTransfer must already be in the processing state.
+ Transitions a test OutboundTransfer to the failed status. The OutboundTransfer must already be in the processing state.
"""
return cast(
"OutboundTransfer",
@@ -570,7 +592,7 @@ def fail(
**params: Unpack["OutboundTransferFailParams"],
) -> "OutboundTransfer":
"""
- Transitions a test mode created OutboundTransfer to the failed status. The OutboundTransfer must already be in the processing state.
+ Transitions a test OutboundTransfer to the failed status. The OutboundTransfer must already be in the processing state.
"""
...
@@ -579,7 +601,7 @@ def fail(
self, **params: Unpack["OutboundTransferFailParams"]
) -> "OutboundTransfer":
"""
- Transitions a test mode created OutboundTransfer to the failed status. The OutboundTransfer must already be in the processing state.
+ Transitions a test OutboundTransfer to the failed status. The OutboundTransfer must already be in the processing state.
"""
...
@@ -588,7 +610,7 @@ def fail(
self, **params: Unpack["OutboundTransferFailParams"]
) -> "OutboundTransfer":
"""
- Transitions a test mode created OutboundTransfer to the failed status. The OutboundTransfer must already be in the processing state.
+ Transitions a test OutboundTransfer to the failed status. The OutboundTransfer must already be in the processing state.
"""
return cast(
"OutboundTransfer",
@@ -611,7 +633,7 @@ async def _cls_fail_async(
**params: Unpack["OutboundTransferFailParams"],
) -> "OutboundTransfer":
"""
- Transitions a test mode created OutboundTransfer to the failed status. The OutboundTransfer must already be in the processing state.
+ Transitions a test OutboundTransfer to the failed status. The OutboundTransfer must already be in the processing state.
"""
return cast(
"OutboundTransfer",
@@ -632,7 +654,7 @@ async def fail_async(
**params: Unpack["OutboundTransferFailParams"],
) -> "OutboundTransfer":
"""
- Transitions a test mode created OutboundTransfer to the failed status. The OutboundTransfer must already be in the processing state.
+ Transitions a test OutboundTransfer to the failed status. The OutboundTransfer must already be in the processing state.
"""
...
@@ -641,7 +663,7 @@ async def fail_async(
self, **params: Unpack["OutboundTransferFailParams"]
) -> "OutboundTransfer":
"""
- Transitions a test mode created OutboundTransfer to the failed status. The OutboundTransfer must already be in the processing state.
+ Transitions a test OutboundTransfer to the failed status. The OutboundTransfer must already be in the processing state.
"""
...
@@ -650,7 +672,7 @@ async def fail_async(
self, **params: Unpack["OutboundTransferFailParams"]
) -> "OutboundTransfer":
"""
- Transitions a test mode created OutboundTransfer to the failed status. The OutboundTransfer must already be in the processing state.
+ Transitions a test OutboundTransfer to the failed status. The OutboundTransfer must already be in the processing state.
"""
return cast(
"OutboundTransfer",
@@ -673,7 +695,7 @@ def _cls_post(
**params: Unpack["OutboundTransferPostParams"],
) -> "OutboundTransfer":
"""
- Transitions a test mode created OutboundTransfer to the posted status. The OutboundTransfer must already be in the processing state.
+ Transitions a test OutboundTransfer to the posted status. The OutboundTransfer must already be in the processing state.
"""
return cast(
"OutboundTransfer",
@@ -694,7 +716,7 @@ def post(
**params: Unpack["OutboundTransferPostParams"],
) -> "OutboundTransfer":
"""
- Transitions a test mode created OutboundTransfer to the posted status. The OutboundTransfer must already be in the processing state.
+ Transitions a test OutboundTransfer to the posted status. The OutboundTransfer must already be in the processing state.
"""
...
@@ -703,7 +725,7 @@ def post(
self, **params: Unpack["OutboundTransferPostParams"]
) -> "OutboundTransfer":
"""
- Transitions a test mode created OutboundTransfer to the posted status. The OutboundTransfer must already be in the processing state.
+ Transitions a test OutboundTransfer to the posted status. The OutboundTransfer must already be in the processing state.
"""
...
@@ -712,7 +734,7 @@ def post(
self, **params: Unpack["OutboundTransferPostParams"]
) -> "OutboundTransfer":
"""
- Transitions a test mode created OutboundTransfer to the posted status. The OutboundTransfer must already be in the processing state.
+ Transitions a test OutboundTransfer to the posted status. The OutboundTransfer must already be in the processing state.
"""
return cast(
"OutboundTransfer",
@@ -735,7 +757,7 @@ async def _cls_post_async(
**params: Unpack["OutboundTransferPostParams"],
) -> "OutboundTransfer":
"""
- Transitions a test mode created OutboundTransfer to the posted status. The OutboundTransfer must already be in the processing state.
+ Transitions a test OutboundTransfer to the posted status. The OutboundTransfer must already be in the processing state.
"""
return cast(
"OutboundTransfer",
@@ -756,7 +778,7 @@ async def post_async(
**params: Unpack["OutboundTransferPostParams"],
) -> "OutboundTransfer":
"""
- Transitions a test mode created OutboundTransfer to the posted status. The OutboundTransfer must already be in the processing state.
+ Transitions a test OutboundTransfer to the posted status. The OutboundTransfer must already be in the processing state.
"""
...
@@ -765,7 +787,7 @@ async def post_async(
self, **params: Unpack["OutboundTransferPostParams"]
) -> "OutboundTransfer":
"""
- Transitions a test mode created OutboundTransfer to the posted status. The OutboundTransfer must already be in the processing state.
+ Transitions a test OutboundTransfer to the posted status. The OutboundTransfer must already be in the processing state.
"""
...
@@ -774,7 +796,7 @@ async def post_async(
self, **params: Unpack["OutboundTransferPostParams"]
) -> "OutboundTransfer":
"""
- Transitions a test mode created OutboundTransfer to the posted status. The OutboundTransfer must already be in the processing state.
+ Transitions a test OutboundTransfer to the posted status. The OutboundTransfer must already be in the processing state.
"""
return cast(
"OutboundTransfer",
@@ -797,7 +819,7 @@ def _cls_return_outbound_transfer(
**params: Unpack["OutboundTransferReturnOutboundTransferParams"],
) -> "OutboundTransfer":
"""
- Transitions a test mode created OutboundTransfer to the returned status. The OutboundTransfer must already be in the processing state.
+ Transitions a test OutboundTransfer to the returned status. The OutboundTransfer must already be in the posted state.
"""
return cast(
"OutboundTransfer",
@@ -818,7 +840,7 @@ def return_outbound_transfer(
**params: Unpack["OutboundTransferReturnOutboundTransferParams"],
) -> "OutboundTransfer":
"""
- Transitions a test mode created OutboundTransfer to the returned status. The OutboundTransfer must already be in the processing state.
+ Transitions a test OutboundTransfer to the returned status. The OutboundTransfer must already be in the posted state.
"""
...
@@ -828,7 +850,7 @@ def return_outbound_transfer(
**params: Unpack["OutboundTransferReturnOutboundTransferParams"],
) -> "OutboundTransfer":
"""
- Transitions a test mode created OutboundTransfer to the returned status. The OutboundTransfer must already be in the processing state.
+ Transitions a test OutboundTransfer to the returned status. The OutboundTransfer must already be in the posted state.
"""
...
@@ -838,7 +860,7 @@ def return_outbound_transfer(
**params: Unpack["OutboundTransferReturnOutboundTransferParams"],
) -> "OutboundTransfer":
"""
- Transitions a test mode created OutboundTransfer to the returned status. The OutboundTransfer must already be in the processing state.
+ Transitions a test OutboundTransfer to the returned status. The OutboundTransfer must already be in the posted state.
"""
return cast(
"OutboundTransfer",
@@ -861,7 +883,7 @@ async def _cls_return_outbound_transfer_async(
**params: Unpack["OutboundTransferReturnOutboundTransferParams"],
) -> "OutboundTransfer":
"""
- Transitions a test mode created OutboundTransfer to the returned status. The OutboundTransfer must already be in the processing state.
+ Transitions a test OutboundTransfer to the returned status. The OutboundTransfer must already be in the posted state.
"""
return cast(
"OutboundTransfer",
@@ -882,7 +904,7 @@ async def return_outbound_transfer_async(
**params: Unpack["OutboundTransferReturnOutboundTransferParams"],
) -> "OutboundTransfer":
"""
- Transitions a test mode created OutboundTransfer to the returned status. The OutboundTransfer must already be in the processing state.
+ Transitions a test OutboundTransfer to the returned status. The OutboundTransfer must already be in the posted state.
"""
...
@@ -892,7 +914,7 @@ async def return_outbound_transfer_async(
**params: Unpack["OutboundTransferReturnOutboundTransferParams"],
) -> "OutboundTransfer":
"""
- Transitions a test mode created OutboundTransfer to the returned status. The OutboundTransfer must already be in the processing state.
+ Transitions a test OutboundTransfer to the returned status. The OutboundTransfer must already be in the posted state.
"""
...
@@ -902,7 +924,7 @@ async def return_outbound_transfer_async(
**params: Unpack["OutboundTransferReturnOutboundTransferParams"],
) -> "OutboundTransfer":
"""
- Transitions a test mode created OutboundTransfer to the returned status. The OutboundTransfer must already be in the processing state.
+ Transitions a test OutboundTransfer to the returned status. The OutboundTransfer must already be in the posted state.
"""
return cast(
"OutboundTransfer",
@@ -925,7 +947,7 @@ def _cls_update(
**params: Unpack["OutboundTransferUpdateParams"],
) -> "OutboundTransfer":
"""
- Updates a test mode created OutboundTransfer with tracking details. The OutboundTransfer must not be cancelable, and cannot be in the canceled or failed states.
+ Updates a test OutboundTransfer with tracking details. The OutboundTransfer must not be cancelable, and can't be in the canceled or failed states.
"""
return cast(
"OutboundTransfer",
@@ -946,7 +968,7 @@ def update(
**params: Unpack["OutboundTransferUpdateParams"],
) -> "OutboundTransfer":
"""
- Updates a test mode created OutboundTransfer with tracking details. The OutboundTransfer must not be cancelable, and cannot be in the canceled or failed states.
+ Updates a test OutboundTransfer with tracking details. The OutboundTransfer must not be cancelable, and can't be in the canceled or failed states.
"""
...
@@ -955,7 +977,7 @@ def update(
self, **params: Unpack["OutboundTransferUpdateParams"]
) -> "OutboundTransfer":
"""
- Updates a test mode created OutboundTransfer with tracking details. The OutboundTransfer must not be cancelable, and cannot be in the canceled or failed states.
+ Updates a test OutboundTransfer with tracking details. The OutboundTransfer must not be cancelable, and can't be in the canceled or failed states.
"""
...
@@ -964,7 +986,7 @@ def update(
self, **params: Unpack["OutboundTransferUpdateParams"]
) -> "OutboundTransfer":
"""
- Updates a test mode created OutboundTransfer with tracking details. The OutboundTransfer must not be cancelable, and cannot be in the canceled or failed states.
+ Updates a test OutboundTransfer with tracking details. The OutboundTransfer must not be cancelable, and can't be in the canceled or failed states.
"""
return cast(
"OutboundTransfer",
@@ -987,7 +1009,7 @@ async def _cls_update_async(
**params: Unpack["OutboundTransferUpdateParams"],
) -> "OutboundTransfer":
"""
- Updates a test mode created OutboundTransfer with tracking details. The OutboundTransfer must not be cancelable, and cannot be in the canceled or failed states.
+ Updates a test OutboundTransfer with tracking details. The OutboundTransfer must not be cancelable, and can't be in the canceled or failed states.
"""
return cast(
"OutboundTransfer",
@@ -1008,7 +1030,7 @@ async def update_async(
**params: Unpack["OutboundTransferUpdateParams"],
) -> "OutboundTransfer":
"""
- Updates a test mode created OutboundTransfer with tracking details. The OutboundTransfer must not be cancelable, and cannot be in the canceled or failed states.
+ Updates a test OutboundTransfer with tracking details. The OutboundTransfer must not be cancelable, and can't be in the canceled or failed states.
"""
...
@@ -1017,7 +1039,7 @@ async def update_async(
self, **params: Unpack["OutboundTransferUpdateParams"]
) -> "OutboundTransfer":
"""
- Updates a test mode created OutboundTransfer with tracking details. The OutboundTransfer must not be cancelable, and cannot be in the canceled or failed states.
+ Updates a test OutboundTransfer with tracking details. The OutboundTransfer must not be cancelable, and can't be in the canceled or failed states.
"""
...
@@ -1026,7 +1048,7 @@ async def update_async(
self, **params: Unpack["OutboundTransferUpdateParams"]
) -> "OutboundTransfer":
"""
- Updates a test mode created OutboundTransfer with tracking details. The OutboundTransfer must not be cancelable, and cannot be in the canceled or failed states.
+ Updates a test OutboundTransfer with tracking details. The OutboundTransfer must not be cancelable, and can't be in the canceled or failed states.
"""
return cast(
"OutboundTransfer",
diff --git a/stripe/treasury/_received_credit.py b/stripe/treasury/_received_credit.py
index db92209b1..b6949d544 100644
--- a/stripe/treasury/_received_credit.py
+++ b/stripe/treasury/_received_credit.py
@@ -391,7 +391,7 @@ def create(
cls, **params: Unpack["ReceivedCreditCreateParams"]
) -> "ReceivedCredit":
"""
- Use this endpoint to simulate a test mode ReceivedCredit initiated by a third party. In live mode, you can't directly create ReceivedCredits initiated by third parties.
+ Simulates a test ReceivedCredit initiated by a third party. In live mode, you can't directly create ReceivedCredit objects initiated by third parties.
"""
return cast(
"ReceivedCredit",
@@ -407,7 +407,7 @@ async def create_async(
cls, **params: Unpack["ReceivedCreditCreateParams"]
) -> "ReceivedCredit":
"""
- Use this endpoint to simulate a test mode ReceivedCredit initiated by a third party. In live mode, you can't directly create ReceivedCredits initiated by third parties.
+ Simulates a test ReceivedCredit initiated by a third party. In live mode, you can't directly create ReceivedCredit objects initiated by third parties.
"""
return cast(
"ReceivedCredit",
diff --git a/stripe/treasury/_received_debit.py b/stripe/treasury/_received_debit.py
index 743f02cbf..be3bb1343 100644
--- a/stripe/treasury/_received_debit.py
+++ b/stripe/treasury/_received_debit.py
@@ -337,7 +337,7 @@ def create(
cls, **params: Unpack["ReceivedDebitCreateParams"]
) -> "ReceivedDebit":
"""
- Use this endpoint to simulate a test mode ReceivedDebit initiated by a third party. In live mode, you can't directly create ReceivedDebits initiated by third parties.
+ Simulates a test ReceivedDebit initiated by a third party. In live mode, you can't directly create ReceivedDebit objects initiated by third parties.
"""
return cast(
"ReceivedDebit",
@@ -353,7 +353,7 @@ async def create_async(
cls, **params: Unpack["ReceivedDebitCreateParams"]
) -> "ReceivedDebit":
"""
- Use this endpoint to simulate a test mode ReceivedDebit initiated by a third party. In live mode, you can't directly create ReceivedDebits initiated by third parties.
+ Simulates a test ReceivedDebit initiated by a third party. In live mode, you can't directly create ReceivedDebit objects initiated by third parties.
"""
return cast(
"ReceivedDebit",
diff --git a/stripe/v2/_billing_service.py b/stripe/v2/_billing_service.py
index 325b42430..e02d2de7c 100644
--- a/stripe/v2/_billing_service.py
+++ b/stripe/v2/_billing_service.py
@@ -6,7 +6,6 @@
if TYPE_CHECKING:
from stripe.v2.billing._bill_setting_service import BillSettingService
- from stripe.v2.billing._cadence_service import CadenceService
from stripe.v2.billing._collection_setting_service import (
CollectionSettingService,
)
@@ -27,7 +26,6 @@
"stripe.v2.billing._bill_setting_service",
"BillSettingService",
],
- "cadences": ["stripe.v2.billing._cadence_service", "CadenceService"],
"collection_settings": [
"stripe.v2.billing._collection_setting_service",
"CollectionSettingService",
@@ -54,7 +52,6 @@
class BillingService(StripeService):
bill_settings: "BillSettingService"
- cadences: "CadenceService"
collection_settings: "CollectionSettingService"
meter_events: "MeterEventService"
meter_event_adjustments: "MeterEventAdjustmentService"
diff --git a/stripe/v2/_core_service.py b/stripe/v2/_core_service.py
index db1b76d76..8cd105f5d 100644
--- a/stripe/v2/_core_service.py
+++ b/stripe/v2/_core_service.py
@@ -10,6 +10,9 @@
from stripe.v2.core._account_token_service import AccountTokenService
from stripe.v2.core._approval_request_service import ApprovalRequestService
from stripe.v2.core._batch_job_service import BatchJobService
+ from stripe.v2.core._claimable_sandbox_service import (
+ ClaimableSandboxService,
+ )
from stripe.v2.core._event_destination_service import (
EventDestinationService,
)
@@ -31,6 +34,10 @@
"ApprovalRequestService",
],
"batch_jobs": ["stripe.v2.core._batch_job_service", "BatchJobService"],
+ "claimable_sandboxes": [
+ "stripe.v2.core._claimable_sandbox_service",
+ "ClaimableSandboxService",
+ ],
"events": ["stripe.v2.core._event_service", "EventService"],
"event_destinations": [
"stripe.v2.core._event_destination_service",
@@ -46,6 +53,7 @@ class CoreService(StripeService):
account_tokens: "AccountTokenService"
approval_requests: "ApprovalRequestService"
batch_jobs: "BatchJobService"
+ claimable_sandboxes: "ClaimableSandboxService"
events: "EventService"
event_destinations: "EventDestinationService"
vault: "VaultService"
diff --git a/stripe/v2/billing/__init__.py b/stripe/v2/billing/__init__.py
index cd33cf800..a47e88b13 100644
--- a/stripe/v2/billing/__init__.py
+++ b/stripe/v2/billing/__init__.py
@@ -15,10 +15,6 @@
from stripe.v2.billing._bill_setting_version import (
BillSettingVersion as BillSettingVersion,
)
- from stripe.v2.billing._cadence import Cadence as Cadence
- from stripe.v2.billing._cadence_service import (
- CadenceService as CadenceService,
- )
from stripe.v2.billing._collection_setting import (
CollectionSetting as CollectionSetting,
)
@@ -59,8 +55,6 @@
"BillSetting": ("stripe.v2.billing._bill_setting", False),
"BillSettingService": ("stripe.v2.billing._bill_setting_service", False),
"BillSettingVersion": ("stripe.v2.billing._bill_setting_version", False),
- "Cadence": ("stripe.v2.billing._cadence", False),
- "CadenceService": ("stripe.v2.billing._cadence_service", False),
"CollectionSetting": ("stripe.v2.billing._collection_setting", False),
"CollectionSettingService": (
"stripe.v2.billing._collection_setting_service",
diff --git a/stripe/v2/billing/_cadence.py b/stripe/v2/billing/_cadence.py
deleted file mode 100644
index 87c25020a..000000000
--- a/stripe/v2/billing/_cadence.py
+++ /dev/null
@@ -1,592 +0,0 @@
-# -*- coding: utf-8 -*-
-# File generated from our OpenAPI spec
-from stripe._stripe_object import StripeObject, UntypedStripeObject
-from typing import ClassVar, List, Optional, Union
-from typing_extensions import Literal
-
-
-class Cadence(StripeObject):
- """
- A Cadence represents a billing schedule applied to a customer, defining when and how often to generate invoices, such as on monthly or annual billing cycle.
- """
-
- OBJECT_NAME: ClassVar[Literal["v2.billing.cadence"]] = "v2.billing.cadence"
-
- class BillingCycle(StripeObject):
- class Day(StripeObject):
- class Time(StripeObject):
- hour: int
- """
- The hour at which the billing cycle ends.
- This must be an integer between 0 and 23, inclusive.
- 0 represents midnight, and 23 represents 11 PM.
- """
- minute: int
- """
- The minute at which the billing cycle ends.
- Must be an integer between 0 and 59, inclusive.
- """
- second: Optional[int]
- """
- The second at which the billing cycle ends.
- Must be an integer between 0 and 59, inclusive.
- """
-
- time: Time
- """
- The time at which the billing cycle ends.
- """
- _inner_class_types = {"time": Time}
-
- class Month(StripeObject):
- class Time(StripeObject):
- hour: int
- """
- The hour at which the billing cycle ends.
- This must be an integer between 0 and 23, inclusive.
- 0 represents midnight, and 23 represents 11 PM.
- """
- minute: int
- """
- The minute at which the billing cycle ends.
- Must be an integer between 0 and 59, inclusive.
- """
- second: Optional[int]
- """
- The second at which the billing cycle ends.
- Must be an integer between 0 and 59, inclusive.
- """
-
- day_of_month: int
- """
- The day to anchor the billing on for a type="month" billing cycle from 1-31.
- If this number is greater than the number of days in the month being billed,
- this anchors to the last day of the month.
- """
- month_of_year: Optional[int]
- """
- The month to anchor the billing on for a type="month" billing cycle from
- 1-12. Occurrences are calculated from the month anchor.
- """
- time: Time
- """
- The time at which the billing cycle ends.
- """
- _inner_class_types = {"time": Time}
-
- class Week(StripeObject):
- class Time(StripeObject):
- hour: int
- """
- The hour at which the billing cycle ends.
- This must be an integer between 0 and 23, inclusive.
- 0 represents midnight, and 23 represents 11 PM.
- """
- minute: int
- """
- The minute at which the billing cycle ends.
- Must be an integer between 0 and 59, inclusive.
- """
- second: Optional[int]
- """
- The second at which the billing cycle ends.
- Must be an integer between 0 and 59, inclusive.
- """
-
- day_of_week: int
- """
- The day of the week to bill the type=week billing cycle on.
- Numbered from 1-7 for Monday to Sunday respectively, based on the ISO-8601 week day numbering.
- """
- time: Time
- """
- The time at which the billing cycle ends.
- """
- _inner_class_types = {"time": Time}
-
- class Year(StripeObject):
- class Time(StripeObject):
- hour: int
- """
- The hour at which the billing cycle ends.
- This must be an integer between 0 and 23, inclusive.
- 0 represents midnight, and 23 represents 11 PM.
- """
- minute: int
- """
- The minute at which the billing cycle ends.
- Must be an integer between 0 and 59, inclusive.
- """
- second: Optional[int]
- """
- The second at which the billing cycle ends.
- Must be an integer between 0 and 59, inclusive.
- """
-
- day_of_month: int
- """
- The day to anchor the billing on for a type="month" billing cycle from 1-31.
- If this number is greater than the number of days in the month being billed,
- this anchors to the last day of the month.
- """
- month_of_year: int
- """
- The month to bill on from 1-12. If not provided, this defaults to the month the cadence was created.
- """
- time: Time
- """
- The time at which the billing cycle ends.
- """
- _inner_class_types = {"time": Time}
-
- day: Optional[Day]
- """
- Specific configuration for determining billing dates when type=day.
- """
- interval_count: int
- """
- The number of intervals (specified in the interval attribute) between cadence billings. For example, type=month and interval_count=3 bills every 3 months.
- """
- month: Optional[Month]
- """
- Specific configuration for determining billing dates when type=month.
- """
- type: Union[Literal["day", "month", "week", "year"], str]
- """
- The frequency at which a cadence bills.
- """
- week: Optional[Week]
- """
- Specific configuration for determining billing dates when type=week.
- """
- year: Optional[Year]
- """
- Specific configuration for determining billing dates when type=year.
- """
- _inner_class_types = {
- "day": Day,
- "month": Month,
- "week": Week,
- "year": Year,
- }
-
- class Payer(StripeObject):
- billing_profile: str
- """
- The ID of the Billing Profile object which determines how a bill is paid.
- """
- customer: Optional[str]
- """
- The ID of the Customer object.
- """
- type: Union[Literal["customer"], str]
- """
- A string identifying the type of the payer. Currently the only supported value is `customer`.
- """
-
- class Settings(StripeObject):
- class Bill(StripeObject):
- id: str
- """
- The ID of the referenced settings object.
- """
- version: Optional[str]
- """
- Returns the Settings Version when the cadence is pinned to a specific version.
- """
-
- class Collection(StripeObject):
- id: str
- """
- The ID of the referenced settings object.
- """
- version: Optional[str]
- """
- Returns the Settings Version when the cadence is pinned to a specific version.
- """
-
- bill: Optional[Bill]
- """
- Settings that configure bills generation, which includes calculating totals, tax, and presenting invoices.
- """
- collection: Optional[Collection]
- """
- Settings that configure and manage the behavior of collecting payments.
- """
- _inner_class_types = {"bill": Bill, "collection": Collection}
-
- class SettingsData(StripeObject):
- class Bill(StripeObject):
- class Calculation(StripeObject):
- class Tax(StripeObject):
- type: Union[Literal["automatic", "manual"], str]
- """
- Determines if tax is calculated automatically based on a PTC or manually based on rules defined by the business. Defaults to "manual".
- """
-
- tax: Optional[Tax]
- """
- Settings for calculating tax.
- """
- _inner_class_types = {"tax": Tax}
-
- class Invoice(StripeObject):
- class TimeUntilDue(StripeObject):
- interval: Literal["day", "month", "week", "year"]
- """
- The interval unit for the time until due.
- """
- interval_count: int
- """
- The number of interval units. For example, if interval=day and interval_count=30,
- the invoice is due in 30 days.
- """
-
- time_until_due: Optional[TimeUntilDue]
- """
- The amount of time until the invoice is overdue for payment.
- """
- _inner_class_types = {"time_until_due": TimeUntilDue}
-
- calculation: Calculation
- """
- Settings related to calculating a bill.
- """
- invoice: Invoice
- """
- Settings related to invoice behavior.
- """
- invoice_rendering_template: Optional[str]
- """
- The ID of the invoice rendering template to be used when generating invoices.
- """
- _inner_class_types = {
- "calculation": Calculation,
- "invoice": Invoice,
- }
-
- class Collection(StripeObject):
- class EmailDelivery(StripeObject):
- class PaymentDue(StripeObject):
- enabled: bool
- """
- If true an email for the invoice would be generated and sent out.
- """
- include_payment_link: bool
- """
- If true the payment link to hosted invoice page would be included in email and PDF of the invoice.
- """
-
- payment_due: Optional[PaymentDue]
- """
- Controls emails for when the payment is due. For example after the invoice is finalized and transitions to Open state.
- """
- _inner_class_types = {"payment_due": PaymentDue}
-
- class PaymentMethodOptions(StripeObject):
- class AcssDebit(StripeObject):
- class MandateOptions(StripeObject):
- transaction_type: Optional[
- Union[Literal["business", "personal"], str]
- ]
- """
- Transaction type of the mandate.
- """
-
- mandate_options: Optional[MandateOptions]
- """
- Additional fields for Mandate creation.
- """
- verification_method: Optional[
- Union[
- Literal["automatic", "instant", "microdeposits"],
- str,
- ]
- ]
- """
- Verification method.
- """
- _inner_class_types = {"mandate_options": MandateOptions}
-
- class Bancontact(StripeObject):
- preferred_language: Optional[
- Union[Literal["de", "en", "fr", "nl"], str]
- ]
- """
- Preferred language of the Bancontact authorization page that the customer is redirected to.
- """
-
- class Card(StripeObject):
- class MandateOptions(StripeObject):
- amount: Optional[int]
- """
- Amount to be charged for future payments.
- """
- amount_type: Optional[
- Union[Literal["fixed", "maximum"], str]
- ]
- """
- The AmountType for the mandate. One of `fixed` or `maximum`.
- """
- description: Optional[str]
- """
- A description of the mandate that is meant to be displayed to the customer.
- """
- _field_encodings = {"amount": "int64_string"}
-
- mandate_options: Optional[MandateOptions]
- """
- Configuration options for setting up an eMandate for cards issued in India.
- """
- network: Optional[str]
- """
- Selected network to process the payment on. Depends on the available networks of the card.
- """
- request_three_d_secure: Optional[
- Union[Literal["any", "automatic", "challenge"], str]
- ]
- """
- An advanced option 3D Secure. We strongly recommend that you rely on our SCA Engine to automatically prompt your customers
- for authentication based on risk level and [other requirements](https://docs.stripe.com/strong-customer-authentication).
- However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option.
- Read our guide on [manually requesting 3D Secure](https://docs.stripe.com/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
- """
- _inner_class_types = {"mandate_options": MandateOptions}
-
- class CustomerBalance(StripeObject):
- class BankTransfer(StripeObject):
- class EuBankTransfer(StripeObject):
- country: Union[
- Literal["BE", "DE", "ES", "FR", "IE", "NL"],
- str,
- ]
- """
- The desired country code of the bank account information.
- """
-
- eu_bank_transfer: Optional[EuBankTransfer]
- """
- Configuration for `eu_bank_transfer` funding type. Required if `type` is `eu_bank_transfer`.
- """
- type: Optional[
- Union[
- Literal[
- "eu_bank_transfer",
- "gb_bank_transfer",
- "jp_bank_transfer",
- "mx_bank_transfer",
- "us_bank_transfer",
- ],
- str,
- ]
- ]
- """
- The bank transfer type that can be used for funding.
- """
- _inner_class_types = {
- "eu_bank_transfer": EuBankTransfer,
- }
-
- bank_transfer: Optional[BankTransfer]
- """
- Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
- """
- funding_type: Optional[
- Union[Literal["bank_transfer"], str]
- ]
- """
- The funding method type to be used when there are not enough funds in the customer balance. Currently the only supported value is `bank_transfer`.
- """
- _inner_class_types = {"bank_transfer": BankTransfer}
-
- class Konbini(StripeObject):
- pass
-
- class SepaDebit(StripeObject):
- pass
-
- class UsBankAccount(StripeObject):
- class FinancialConnections(StripeObject):
- class Filters(StripeObject):
- account_subcategories: List[
- Union[Literal["checking", "savings"], str]
- ]
- """
- The account subcategories to use to filter for selectable accounts.
- """
-
- filters: Optional[Filters]
- """
- Provide filters for the linked accounts that the customer can select for the payment method.
- """
- permissions: List[
- Union[
- Literal[
- "balances",
- "ownership",
- "payment_method",
- "transactions",
- ],
- str,
- ]
- ]
- """
- The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included.
- """
- prefetch: List[
- Union[
- Literal[
- "balances", "ownership", "transactions"
- ],
- str,
- ]
- ]
- """
- List of data features that you would like to retrieve upon account creation.
- """
- _inner_class_types = {"filters": Filters}
-
- financial_connections: FinancialConnections
- """
- Additional fields for Financial Connections Session creation.
- """
- verification_method: Union[
- Literal["automatic", "instant", "microdeposits"], str
- ]
- """
- Verification method.
- """
- _inner_class_types = {
- "financial_connections": FinancialConnections,
- }
-
- acss_debit: Optional[AcssDebit]
- """
- This sub-hash contains details about the Canadian pre-authorized debit payment method options.
- """
- bancontact: Optional[Bancontact]
- """
- This sub-hash contains details about the Bancontact payment method.
- """
- card: Optional[Card]
- """
- This sub-hash contains details about the Card payment method options.
- """
- customer_balance: Optional[CustomerBalance]
- """
- This sub-hash contains details about the Bank transfer payment method options.
- """
- konbini: Optional[Konbini]
- """
- This sub-hash contains details about the Konbini payment method options.
- """
- sepa_debit: Optional[SepaDebit]
- """
- This sub-hash contains details about the SEPA Direct Debit payment method options.
- """
- us_bank_account: Optional[UsBankAccount]
- """
- This sub-hash contains details about the ACH direct debit payment method options.
- """
- _inner_class_types = {
- "acss_debit": AcssDebit,
- "bancontact": Bancontact,
- "card": Card,
- "customer_balance": CustomerBalance,
- "konbini": Konbini,
- "sepa_debit": SepaDebit,
- "us_bank_account": UsBankAccount,
- }
-
- collection_method: Literal["automatic", "send_invoice"]
- """
- Either automatic, or send_invoice. When charging automatically, Stripe attempts to pay this
- bill at the end of the period using the payment method attached to the billing profile. When sending an invoice,
- Stripe emails your billing profile an invoice with payment instructions.
- Defaults to automatic.
- """
- email_delivery: EmailDelivery
- """
- Email delivery settings.
- """
- payment_method_configuration: str
- """
- The ID of the PaymentMethodConfiguration object, which controls which payment methods are displayed to your customers.
- """
- payment_method_options: PaymentMethodOptions
- """
- Payment Method specific configuration stored on the object.
- """
- _inner_class_types = {
- "email_delivery": EmailDelivery,
- "payment_method_options": PaymentMethodOptions,
- }
-
- bill: Bill
- """
- Expanded bill settings data with actual configuration values.
- """
- collection: Collection
- """
- Expanded collection settings data with actual configuration values.
- """
- _inner_class_types = {"bill": Bill, "collection": Collection}
-
- billing_cycle: BillingCycle
- """
- The billing cycle is the object that defines future billing cycle dates.
- """
- created: str
- """
- Timestamp of when the object was created.
- """
- id: str
- """
- Unique identifier for the object.
- """
- livemode: bool
- """
- Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
- """
- lookup_key: Optional[str]
- """
- A lookup key used to retrieve cadences dynamically from a static string. Maximum length of 200 characters.
- """
- metadata: Optional[UntypedStripeObject[str]]
- """
- Set of [key-value pairs](https://docs.stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
- """
- next_billing_date: Optional[str]
- """
- The date that the billing cadence will next bill. Null if the cadence is not active.
- """
- object: Literal["v2.billing.cadence"]
- """
- String representing the object's type. Objects of the same type share the same value of the object field.
- """
- payer: Payer
- """
- The payer determines the entity financially responsible for the bill.
- """
- settings: Optional[Settings]
- """
- The settings associated with the cadence.
- """
- settings_data: Optional[SettingsData]
- """
- Settings data that contains expanded billing settings configuration with actual values.
- """
- status: Union[Literal["active", "canceled"], str]
- """
- The current status of the cadence.
- """
- test_clock: Optional[str]
- """
- The ID of the Test Clock.
- """
- _inner_class_types = {
- "billing_cycle": BillingCycle,
- "payer": Payer,
- "settings": Settings,
- "settings_data": SettingsData,
- }
diff --git a/stripe/v2/billing/_cadence_service.py b/stripe/v2/billing/_cadence_service.py
deleted file mode 100644
index 6669f0b1f..000000000
--- a/stripe/v2/billing/_cadence_service.py
+++ /dev/null
@@ -1,228 +0,0 @@
-# -*- coding: utf-8 -*-
-# File generated from our OpenAPI spec
-from stripe._stripe_service import StripeService
-from stripe._util import sanitize_id
-from typing import Optional, cast
-from typing_extensions import TYPE_CHECKING
-
-if TYPE_CHECKING:
- from stripe._request_options import RequestOptions
- from stripe.params.v2.billing._cadence_cancel_params import (
- CadenceCancelParams,
- )
- from stripe.params.v2.billing._cadence_create_params import (
- CadenceCreateParams,
- )
- from stripe.params.v2.billing._cadence_list_params import CadenceListParams
- from stripe.params.v2.billing._cadence_retrieve_params import (
- CadenceRetrieveParams,
- )
- from stripe.params.v2.billing._cadence_update_params import (
- CadenceUpdateParams,
- )
- from stripe.v2._list_object import ListObject
- from stripe.v2.billing._cadence import Cadence
-
-
-class CadenceService(StripeService):
- def list(
- self,
- params: Optional["CadenceListParams"] = None,
- options: Optional["RequestOptions"] = None,
- ) -> "ListObject[Cadence]":
- """
- List Billing Cadences.
- """
- return cast(
- "ListObject[Cadence]",
- self._request(
- "get",
- "/v2/billing/cadences",
- base_address="api",
- params=params,
- options=options,
- ),
- )
-
- async def list_async(
- self,
- params: Optional["CadenceListParams"] = None,
- options: Optional["RequestOptions"] = None,
- ) -> "ListObject[Cadence]":
- """
- List Billing Cadences.
- """
- return cast(
- "ListObject[Cadence]",
- await self._request_async(
- "get",
- "/v2/billing/cadences",
- base_address="api",
- params=params,
- options=options,
- ),
- )
-
- def create(
- self,
- params: "CadenceCreateParams",
- options: Optional["RequestOptions"] = None,
- ) -> "Cadence":
- """
- Create a Billing Cadence object.
- """
- return cast(
- "Cadence",
- self._request(
- "post",
- "/v2/billing/cadences",
- base_address="api",
- params=params,
- options=options,
- ),
- )
-
- async def create_async(
- self,
- params: "CadenceCreateParams",
- options: Optional["RequestOptions"] = None,
- ) -> "Cadence":
- """
- Create a Billing Cadence object.
- """
- return cast(
- "Cadence",
- await self._request_async(
- "post",
- "/v2/billing/cadences",
- base_address="api",
- params=params,
- options=options,
- ),
- )
-
- def retrieve(
- self,
- id: str,
- /,
- params: Optional["CadenceRetrieveParams"] = None,
- options: Optional["RequestOptions"] = None,
- ) -> "Cadence":
- """
- Retrieve a Billing Cadence object.
- """
- return cast(
- "Cadence",
- self._request(
- "get",
- "/v2/billing/cadences/{id}".format(id=sanitize_id(id)),
- base_address="api",
- params=params,
- options=options,
- ),
- )
-
- async def retrieve_async(
- self,
- id: str,
- /,
- params: Optional["CadenceRetrieveParams"] = None,
- options: Optional["RequestOptions"] = None,
- ) -> "Cadence":
- """
- Retrieve a Billing Cadence object.
- """
- return cast(
- "Cadence",
- await self._request_async(
- "get",
- "/v2/billing/cadences/{id}".format(id=sanitize_id(id)),
- base_address="api",
- params=params,
- options=options,
- ),
- )
-
- def update(
- self,
- id: str,
- /,
- params: Optional["CadenceUpdateParams"] = None,
- options: Optional["RequestOptions"] = None,
- ) -> "Cadence":
- """
- Update a Billing Cadence object.
- """
- return cast(
- "Cadence",
- self._request(
- "post",
- "/v2/billing/cadences/{id}".format(id=sanitize_id(id)),
- base_address="api",
- params=params,
- options=options,
- ),
- )
-
- async def update_async(
- self,
- id: str,
- /,
- params: Optional["CadenceUpdateParams"] = None,
- options: Optional["RequestOptions"] = None,
- ) -> "Cadence":
- """
- Update a Billing Cadence object.
- """
- return cast(
- "Cadence",
- await self._request_async(
- "post",
- "/v2/billing/cadences/{id}".format(id=sanitize_id(id)),
- base_address="api",
- params=params,
- options=options,
- ),
- )
-
- def cancel(
- self,
- id: str,
- /,
- params: Optional["CadenceCancelParams"] = None,
- options: Optional["RequestOptions"] = None,
- ) -> "Cadence":
- """
- Cancel the Billing Cadence.
- """
- return cast(
- "Cadence",
- self._request(
- "post",
- "/v2/billing/cadences/{id}/cancel".format(id=sanitize_id(id)),
- base_address="api",
- params=params,
- options=options,
- ),
- )
-
- async def cancel_async(
- self,
- id: str,
- /,
- params: Optional["CadenceCancelParams"] = None,
- options: Optional["RequestOptions"] = None,
- ) -> "Cadence":
- """
- Cancel the Billing Cadence.
- """
- return cast(
- "Cadence",
- await self._request_async(
- "post",
- "/v2/billing/cadences/{id}/cancel".format(id=sanitize_id(id)),
- base_address="api",
- params=params,
- options=options,
- ),
- )
diff --git a/stripe/v2/core/__init__.py b/stripe/v2/core/__init__.py
index 3f1561264..451302b12 100644
--- a/stripe/v2/core/__init__.py
+++ b/stripe/v2/core/__init__.py
@@ -42,6 +42,12 @@
from stripe.v2.core._batch_job_service import (
BatchJobService as BatchJobService,
)
+ from stripe.v2.core._claimable_sandbox import (
+ ClaimableSandbox as ClaimableSandbox,
+ )
+ from stripe.v2.core._claimable_sandbox_service import (
+ ClaimableSandboxService as ClaimableSandboxService,
+ )
from stripe.v2.core._event import Event as Event
from stripe.v2.core._event_destination import (
EventDestination as EventDestination,
@@ -71,6 +77,11 @@
),
"BatchJob": ("stripe.v2.core._batch_job", False),
"BatchJobService": ("stripe.v2.core._batch_job_service", False),
+ "ClaimableSandbox": ("stripe.v2.core._claimable_sandbox", False),
+ "ClaimableSandboxService": (
+ "stripe.v2.core._claimable_sandbox_service",
+ False,
+ ),
"Event": ("stripe.v2.core._event", False),
"EventDestination": ("stripe.v2.core._event_destination", False),
"EventDestinationService": (
diff --git a/stripe/v2/core/_account.py b/stripe/v2/core/_account.py
index f716e376a..d7ccecf24 100644
--- a/stripe/v2/core/_account.py
+++ b/stripe/v2/core/_account.py
@@ -673,6 +673,51 @@ class StatusDetail(StripeObject):
"""
_inner_class_types = {"status_details": StatusDetail}
+ class BilliePayments(StripeObject):
+ class StatusDetail(StripeObject):
+ code: Literal[
+ "determining_status",
+ "rejected_fraud",
+ "rejected_incomplete_verification",
+ "rejected_listed",
+ "rejected_other",
+ "rejected_platform_fraud",
+ "rejected_platform_other",
+ "rejected_platform_terms_of_service",
+ "rejected_terms_of_service",
+ "requirements_past_due",
+ "requirements_pending_verification",
+ "restricted_other",
+ "unsupported_business",
+ "unsupported_country",
+ "unsupported_entity_type",
+ ]
+ """
+ Machine-readable code explaining the reason for the Capability to be in its current status.
+ """
+ resolution: Literal[
+ "contact_stripe", "no_resolution", "provide_info"
+ ]
+ """
+ Machine-readable code explaining how to make the Capability active.
+ """
+
+ status: Literal[
+ "active",
+ "pending",
+ "rejected",
+ "restricted",
+ "unsupported",
+ ]
+ """
+ The status of the Capability.
+ """
+ status_details: List[StatusDetail]
+ """
+ Additional details about the capability's status. This value is empty when `status` is `active`.
+ """
+ _inner_class_types = {"status_details": StatusDetail}
+
class BlikPayments(StripeObject):
class StatusDetail(StripeObject):
code: Literal[
@@ -1483,6 +1528,51 @@ class StatusDetail(StripeObject):
"""
_inner_class_types = {"status_details": StatusDetail}
+ class MbWayPayments(StripeObject):
+ class StatusDetail(StripeObject):
+ code: Literal[
+ "determining_status",
+ "rejected_fraud",
+ "rejected_incomplete_verification",
+ "rejected_listed",
+ "rejected_other",
+ "rejected_platform_fraud",
+ "rejected_platform_other",
+ "rejected_platform_terms_of_service",
+ "rejected_terms_of_service",
+ "requirements_past_due",
+ "requirements_pending_verification",
+ "restricted_other",
+ "unsupported_business",
+ "unsupported_country",
+ "unsupported_entity_type",
+ ]
+ """
+ Machine-readable code explaining the reason for the Capability to be in its current status.
+ """
+ resolution: Literal[
+ "contact_stripe", "no_resolution", "provide_info"
+ ]
+ """
+ Machine-readable code explaining how to make the Capability active.
+ """
+
+ status: Literal[
+ "active",
+ "pending",
+ "rejected",
+ "restricted",
+ "unsupported",
+ ]
+ """
+ The status of the Capability.
+ """
+ status_details: List[StatusDetail]
+ """
+ Additional details about the capability's status. This value is empty when `status` is `active`.
+ """
+ _inner_class_types = {"status_details": StatusDetail}
+
class MobilepayPayments(StripeObject):
class StatusDetail(StripeObject):
code: Literal[
@@ -1663,6 +1753,51 @@ class StatusDetail(StripeObject):
"""
_inner_class_types = {"status_details": StatusDetail}
+ class NzBankAccountBecsDebitPayments(StripeObject):
+ class StatusDetail(StripeObject):
+ code: Literal[
+ "determining_status",
+ "rejected_fraud",
+ "rejected_incomplete_verification",
+ "rejected_listed",
+ "rejected_other",
+ "rejected_platform_fraud",
+ "rejected_platform_other",
+ "rejected_platform_terms_of_service",
+ "rejected_terms_of_service",
+ "requirements_past_due",
+ "requirements_pending_verification",
+ "restricted_other",
+ "unsupported_business",
+ "unsupported_country",
+ "unsupported_entity_type",
+ ]
+ """
+ Machine-readable code explaining the reason for the Capability to be in its current status.
+ """
+ resolution: Literal[
+ "contact_stripe", "no_resolution", "provide_info"
+ ]
+ """
+ Machine-readable code explaining how to make the Capability active.
+ """
+
+ status: Literal[
+ "active",
+ "pending",
+ "rejected",
+ "restricted",
+ "unsupported",
+ ]
+ """
+ The status of the Capability.
+ """
+ status_details: List[StatusDetail]
+ """
+ Additional details about the capability's status. This value is empty when `status` is `active`.
+ """
+ _inner_class_types = {"status_details": StatusDetail}
+
class OxxoPayments(StripeObject):
class StatusDetail(StripeObject):
code: Literal[
@@ -1888,6 +2023,96 @@ class StatusDetail(StripeObject):
"""
_inner_class_types = {"status_details": StatusDetail}
+ class PaypayPayments(StripeObject):
+ class StatusDetail(StripeObject):
+ code: Literal[
+ "determining_status",
+ "rejected_fraud",
+ "rejected_incomplete_verification",
+ "rejected_listed",
+ "rejected_other",
+ "rejected_platform_fraud",
+ "rejected_platform_other",
+ "rejected_platform_terms_of_service",
+ "rejected_terms_of_service",
+ "requirements_past_due",
+ "requirements_pending_verification",
+ "restricted_other",
+ "unsupported_business",
+ "unsupported_country",
+ "unsupported_entity_type",
+ ]
+ """
+ Machine-readable code explaining the reason for the Capability to be in its current status.
+ """
+ resolution: Literal[
+ "contact_stripe", "no_resolution", "provide_info"
+ ]
+ """
+ Machine-readable code explaining how to make the Capability active.
+ """
+
+ status: Literal[
+ "active",
+ "pending",
+ "rejected",
+ "restricted",
+ "unsupported",
+ ]
+ """
+ The status of the Capability.
+ """
+ status_details: List[StatusDetail]
+ """
+ Additional details about the capability's status. This value is empty when `status` is `active`.
+ """
+ _inner_class_types = {"status_details": StatusDetail}
+
+ class PixPayments(StripeObject):
+ class StatusDetail(StripeObject):
+ code: Literal[
+ "determining_status",
+ "rejected_fraud",
+ "rejected_incomplete_verification",
+ "rejected_listed",
+ "rejected_other",
+ "rejected_platform_fraud",
+ "rejected_platform_other",
+ "rejected_platform_terms_of_service",
+ "rejected_terms_of_service",
+ "requirements_past_due",
+ "requirements_pending_verification",
+ "restricted_other",
+ "unsupported_business",
+ "unsupported_country",
+ "unsupported_entity_type",
+ ]
+ """
+ Machine-readable code explaining the reason for the Capability to be in its current status.
+ """
+ resolution: Literal[
+ "contact_stripe", "no_resolution", "provide_info"
+ ]
+ """
+ Machine-readable code explaining how to make the Capability active.
+ """
+
+ status: Literal[
+ "active",
+ "pending",
+ "rejected",
+ "restricted",
+ "unsupported",
+ ]
+ """
+ The status of the Capability.
+ """
+ status_details: List[StatusDetail]
+ """
+ Additional details about the capability's status. This value is empty when `status` is `active`.
+ """
+ _inner_class_types = {"status_details": StatusDetail}
+
class PromptpayPayments(StripeObject):
class StatusDetail(StripeObject):
code: Literal[
@@ -2518,6 +2743,10 @@ class StatusDetail(StripeObject):
"""
Allow the merchant to process Bancontact payments.
"""
+ billie_payments: Optional[BilliePayments]
+ """
+ Allow the merchant to process Billie payments.
+ """
blik_payments: Optional[BlikPayments]
"""
Allow the merchant to process BLIK payments.
@@ -2590,6 +2819,10 @@ class StatusDetail(StripeObject):
"""
Allow the merchant to process Link payments.
"""
+ mb_way_payments: Optional[MbWayPayments]
+ """
+ Allow the merchant to process MB WAY payments.
+ """
mobilepay_payments: Optional[MobilepayPayments]
"""
Allow the merchant to process MobilePay payments.
@@ -2606,6 +2839,12 @@ class StatusDetail(StripeObject):
"""
Allow the merchant to process Naver Pay payments.
"""
+ nz_bank_account_becs_debit_payments: Optional[
+ NzBankAccountBecsDebitPayments
+ ]
+ """
+ Allow the merchant to process New Zealand BECS Direct Debit payments.
+ """
oxxo_payments: Optional[OxxoPayments]
"""
Allow the merchant to process OXXO payments.
@@ -2626,6 +2865,14 @@ class StatusDetail(StripeObject):
"""
Allow the merchant to process PayNow payments.
"""
+ paypay_payments: Optional[PaypayPayments]
+ """
+ Allow the merchant to process PayPay payments.
+ """
+ pix_payments: Optional[PixPayments]
+ """
+ Allow the merchant to process Pix payments.
+ """
promptpay_payments: Optional[PromptpayPayments]
"""
Allow the merchant to process PromptPay payments.
@@ -2688,6 +2935,7 @@ class StatusDetail(StripeObject):
"au_becs_debit_payments": AuBecsDebitPayments,
"bacs_debit_payments": BacsDebitPayments,
"bancontact_payments": BancontactPayments,
+ "billie_payments": BilliePayments,
"blik_payments": BlikPayments,
"blik_recurring_payments": BlikRecurringPayments,
"boleto_payments": BoletoPayments,
@@ -2706,15 +2954,19 @@ class StatusDetail(StripeObject):
"konbini_payments": KonbiniPayments,
"kr_card_payments": KrCardPayments,
"link_payments": LinkPayments,
+ "mb_way_payments": MbWayPayments,
"mobilepay_payments": MobilepayPayments,
"multibanco_payments": MultibancoPayments,
"mx_bank_transfer_payments": MxBankTransferPayments,
"naver_pay_payments": NaverPayPayments,
+ "nz_bank_account_becs_debit_payments": NzBankAccountBecsDebitPayments,
"oxxo_payments": OxxoPayments,
"p24_payments": P24Payments,
"pay_by_bank_payments": PayByBankPayments,
"payco_payments": PaycoPayments,
"paynow_payments": PaynowPayments,
+ "paypay_payments": PaypayPayments,
+ "pix_payments": PixPayments,
"promptpay_payments": PromptpayPayments,
"revolut_pay_payments": RevolutPayPayments,
"samsung_pay_payments": SamsungPayPayments,
@@ -2773,12 +3025,79 @@ class Hours(StripeObject):
"""
_inner_class_types = {"hours": Hours}
+ additional_material: Optional[str]
+ """
+ Information provided to support the onboarding process for Konbini payments.
+ """
support: Optional[Support]
"""
Support for Konbini payments.
"""
_inner_class_types = {"support": Support}
+ class PaypayPayments(StripeObject):
+ class Site(StripeObject):
+ class Accessible(StripeObject):
+ pass
+
+ class InDevelopment(StripeObject):
+ password_provided: bool
+ """
+ Whether a password needed to access the business's website has been provided.
+ """
+ username: Optional[str]
+ """
+ The username needed to access the business's website.
+ """
+
+ class Restricted(StripeObject):
+ payment_flow_file: Optional[str]
+ """
+ The file explaining the payment flow for the business.
+ """
+
+ accessible: Optional[Accessible]
+ """
+ Additional information about the business's website when it's accessible.
+ """
+ in_development: Optional[InDevelopment]
+ """
+ Additional information about the business's website when it's in development.
+ """
+ restricted: Optional[Restricted]
+ """
+ Additional information about the business's website when it has restricted access.
+ """
+ type: Optional[
+ Literal["accessible", "in_development", "restricted"]
+ ]
+ """
+ The status of the business's website.
+ """
+ _inner_class_types = {
+ "accessible": Accessible,
+ "in_development": InDevelopment,
+ "restricted": Restricted,
+ }
+
+ additional_files: List[str]
+ """
+ Additional files supporting PayPay payments configuration.
+ """
+ goods_type: Optional[Literal["digital_content", "other"]]
+ """
+ The type of goods sold by the merchant for PayPay payments.
+ """
+ site: Optional[Site]
+ """
+ The business's website for PayPay payments.
+ """
+ specified_commercial_transactions_act_url: Optional[str]
+ """
+ URL to the Specified Commercial Transactions Act page for PayPay payments.
+ """
+ _inner_class_types = {"site": Site}
+
class ScriptStatementDescriptor(StripeObject):
class Kana(StripeObject):
descriptor: Optional[str]
@@ -2920,6 +3239,10 @@ class Address(StripeObject):
"""
The Merchant Category Code (MCC) for the merchant. MCCs classify businesses based on the goods or services they provide.
"""
+ paypay_payments: Optional[PaypayPayments]
+ """
+ Settings for PayPay payments.
+ """
script_statement_descriptor: Optional[ScriptStatementDescriptor]
"""
Settings for the default text that appears on statements for language variations.
@@ -2946,6 +3269,7 @@ class Address(StripeObject):
"capabilities": Capabilities,
"card_payments": CardPayments,
"konbini_payments": KonbiniPayments,
+ "paypay_payments": PaypayPayments,
"script_statement_descriptor": ScriptStatementDescriptor,
"sepa_debit_payments": SepaDebitPayments,
"smart_disputes": SmartDisputes,
@@ -4639,11 +4963,11 @@ class Responsibilities(StripeObject):
]
]
"""
- Indicates whether the platform or connected account is responsible for paying Stripe fees for pricing-control-eligible products.
+ Controls who pays Stripe fees for direct charges and other pricing-control-eligible Stripe products. For new integrations, setting `losses_collector=application` requires `fees_collector=application`; legacy Custom and Express accounts can also use `application_custom` or `application_express`. For destination charges and separate charges and transfers, Stripe bills the platform regardless of this setting. Learn more about [fee behavior on connected accounts](https://docs.stripe.com/connect/direct-charges-fee-payer-behavior), including application fees and pricing considerations.
"""
losses_collector: Optional[Literal["application", "stripe"]]
"""
- A value indicating the responsibility for losses on this account.
+ Controls who is responsible for payment-related negative balances on this account. The platform remains liable for negative balances on its own account. To use Stripe negative balance liability, your integration must meet [Managed Risk requirements](https://docs.stripe.com/connect/risk-management/managed-risk).
"""
requirements_collector: Literal["application", "stripe"]
"""
@@ -5115,6 +5439,7 @@ class Deadline(StripeObject):
"bank_accounts.sepa",
"bank_accounts.swift",
"bank_accounts.wire",
+ "billie_payments",
"blik_payments",
"blik_recurring_payments",
"boleto_payments",
@@ -5146,10 +5471,12 @@ class Deadline(StripeObject):
"konbini_payments",
"kr_card_payments",
"link_payments",
+ "mb_way_payments",
"mobilepay_payments",
"multibanco_payments",
"mx_bank_transfer_payments",
"naver_pay_payments",
+ "nz_bank_account_becs_debit_payments",
"outbound_payments.bank_accounts",
"outbound_payments.cards",
"outbound_payments.financial_accounts",
@@ -5159,7 +5486,9 @@ class Deadline(StripeObject):
"p24_payments",
"payco_payments",
"paynow_payments",
+ "paypay_payments",
"pay_by_bank_payments",
+ "pix_payments",
"promptpay_payments",
"received_credits.bank_accounts",
"received_debits.bank_accounts",
@@ -7002,6 +7331,7 @@ class Deadline(StripeObject):
"bank_accounts.sepa",
"bank_accounts.swift",
"bank_accounts.wire",
+ "billie_payments",
"blik_payments",
"blik_recurring_payments",
"boleto_payments",
@@ -7033,10 +7363,12 @@ class Deadline(StripeObject):
"konbini_payments",
"kr_card_payments",
"link_payments",
+ "mb_way_payments",
"mobilepay_payments",
"multibanco_payments",
"mx_bank_transfer_payments",
"naver_pay_payments",
+ "nz_bank_account_becs_debit_payments",
"outbound_payments.bank_accounts",
"outbound_payments.cards",
"outbound_payments.financial_accounts",
@@ -7046,7 +7378,9 @@ class Deadline(StripeObject):
"p24_payments",
"payco_payments",
"paynow_payments",
+ "paypay_payments",
"pay_by_bank_payments",
+ "pix_payments",
"promptpay_payments",
"received_credits.bank_accounts",
"received_debits.bank_accounts",
@@ -7222,7 +7556,7 @@ class MinimumDeadline(StripeObject):
"""
dashboard: Optional[Literal["express", "full", "none"]]
"""
- A value indicating the Stripe dashboard this Account has access to. This will depend on which configurations are enabled for this account.
+ Specifies the account's Stripe-hosted Dashboard access. Available values depend on the configurations enabled for the account. Learn more about [configuring Dashboard access](https://docs.stripe.com/connect/accounts-v2/connected-account-configuration#set-dashboard-access).
"""
defaults: Optional[Defaults]
"""
diff --git a/stripe/v2/core/_account_link.py b/stripe/v2/core/_account_link.py
index 7c334216c..e087c4acd 100644
--- a/stripe/v2/core/_account_link.py
+++ b/stripe/v2/core/_account_link.py
@@ -7,7 +7,7 @@
class AccountLink(StripeObject):
"""
- Account Links let a platform create a temporary, single-use URL that an account can use to access a Stripe-hosted flow for collecting or updating required information.
+ Account Links let a platform create a temporary, single-use URL that an account can use to access a Stripe-hosted flow for collecting or updating required information, or to access its Stripe-hosted Dashboard.
"""
OBJECT_NAME: ClassVar[Literal["v2.core.account_link"]] = (
@@ -15,6 +15,13 @@ class AccountLink(StripeObject):
)
class UseCase(StripeObject):
+ class AccountDashboard(StripeObject):
+ refresh_url: str
+ """
+ The URL to redirect to if the Account Link has expired or has already
+ been used. Authenticate the user before generating a replacement link.
+ """
+
class AccountOnboarding(StripeObject):
class CollectionOptions(StripeObject):
fields: Optional[
@@ -73,6 +80,10 @@ class CollectionOptions(StripeObject):
"""
_inner_class_types = {"collection_options": CollectionOptions}
+ account_dashboard: Optional[AccountDashboard]
+ """
+ Hash containing configuration options for an Account Link that provides access to the account's Stripe-hosted Dashboard.
+ """
account_onboarding: Optional[AccountOnboarding]
"""
Hash containing configuration options for an Account Link object that onboards a new account.
@@ -81,11 +92,17 @@ class CollectionOptions(StripeObject):
"""
Hash containing configuration options for an Account Link that updates an existing account.
"""
- type: Union[Literal["account_onboarding", "account_update"], str]
+ type: Union[
+ Literal[
+ "account_dashboard", "account_onboarding", "account_update"
+ ],
+ str,
+ ]
"""
Open Enum. The type of Account Link the user is requesting.
"""
_inner_class_types = {
+ "account_dashboard": AccountDashboard,
"account_onboarding": AccountOnboarding,
"account_update": AccountUpdate,
}
diff --git a/stripe/v2/core/_account_link_service.py b/stripe/v2/core/_account_link_service.py
index 19b868c0c..33308de01 100644
--- a/stripe/v2/core/_account_link_service.py
+++ b/stripe/v2/core/_account_link_service.py
@@ -19,7 +19,7 @@ def create(
options: Optional["RequestOptions"] = None,
) -> "AccountLink":
"""
- Creates an AccountLink object that includes a single-use URL that an account can use to access a Stripe-hosted flow for collecting or updating required information.
+ Creates an AccountLink object that includes a single-use URL that an account can use to access a Stripe-hosted flow for collecting or updating required information, or to access its Stripe-hosted Dashboard.
"""
return cast(
"AccountLink",
@@ -38,7 +38,7 @@ async def create_async(
options: Optional["RequestOptions"] = None,
) -> "AccountLink":
"""
- Creates an AccountLink object that includes a single-use URL that an account can use to access a Stripe-hosted flow for collecting or updating required information.
+ Creates an AccountLink object that includes a single-use URL that an account can use to access a Stripe-hosted flow for collecting or updating required information, or to access its Stripe-hosted Dashboard.
"""
return cast(
"AccountLink",
diff --git a/stripe/v2/core/_account_person_token.py b/stripe/v2/core/_account_person_token.py
index 34b07a1e6..e615dcc07 100644
--- a/stripe/v2/core/_account_person_token.py
+++ b/stripe/v2/core/_account_person_token.py
@@ -8,6 +8,8 @@
class AccountPersonToken(StripeObject):
"""
Person Tokens are single-use tokens which tokenize person information, and are used for creating or updating a Person.
+ In live mode, you must create person tokens using a live publishable key.
+ In a sandbox, you can create person tokens with secret or publishable keys.
"""
OBJECT_NAME: ClassVar[Literal["v2.core.account_person_token"]] = (
diff --git a/stripe/v2/core/_account_token.py b/stripe/v2/core/_account_token.py
index 27f454cb0..936d29b8f 100644
--- a/stripe/v2/core/_account_token.py
+++ b/stripe/v2/core/_account_token.py
@@ -7,7 +7,9 @@
class AccountToken(StripeObject):
"""
- Account tokens are single-use tokens which tokenize an account's contact_email, display_name, contact_phone, and identity.
+ Account tokens are single-use tokens which tokenize an account's `contact_email`, `display_name`, `contact_phone`, and `identity`.
+ In live mode, you must create account tokens using a live publishable key.
+ In a sandbox, you can create account tokens with secret or publishable keys.
"""
OBJECT_NAME: ClassVar[Literal["v2.core.account_token"]] = (
diff --git a/stripe/v2/core/_account_token_service.py b/stripe/v2/core/_account_token_service.py
index 33d82d2c2..99f042e4f 100644
--- a/stripe/v2/core/_account_token_service.py
+++ b/stripe/v2/core/_account_token_service.py
@@ -27,8 +27,8 @@ def create(
Create an account token with a publishable key and pass it to the Accounts v2 API to
create or update an account without its data touching your server.
Learn more about [account tokens](https://docs.stripe.com/connect/account-tokens).
- In live mode, you can only create account tokens with your application's publishable key.
- In test mode, you can create account tokens with your secret key or publishable key.
+ In live mode, you must create account tokens using a live publishable key.
+ In a sandbox, you can create account tokens with secret or publishable keys.
"""
return cast(
"AccountToken",
@@ -61,8 +61,8 @@ async def create_async(
Create an account token with a publishable key and pass it to the Accounts v2 API to
create or update an account without its data touching your server.
Learn more about [account tokens](https://docs.stripe.com/connect/account-tokens).
- In live mode, you can only create account tokens with your application's publishable key.
- In test mode, you can create account tokens with your secret key or publishable key.
+ In live mode, you must create account tokens using a live publishable key.
+ In a sandbox, you can create account tokens with secret or publishable keys.
"""
return cast(
"AccountToken",
diff --git a/stripe/v2/core/_claimable_sandbox.py b/stripe/v2/core/_claimable_sandbox.py
new file mode 100644
index 000000000..7d7b86523
--- /dev/null
+++ b/stripe/v2/core/_claimable_sandbox.py
@@ -0,0 +1,273 @@
+# -*- coding: utf-8 -*-
+# File generated from our OpenAPI spec
+from stripe._stripe_object import StripeObject
+from typing import ClassVar, Optional, Union
+from typing_extensions import Literal
+
+
+class ClaimableSandbox(StripeObject):
+ """
+ A claimable sandbox is a Stripe sandbox that a user can claim into a new or existing Stripe account
+ through an onboarding link. You can prefill it with an email address, sandbox name, and country.
+ Claimable sandboxes have 60 days to be claimed. After this expiration time has passed,
+ if the sandbox is not claimed, it will be deleted.
+ """
+
+ OBJECT_NAME: ClassVar[Literal["v2.core.claimable_sandbox"]] = (
+ "v2.core.claimable_sandbox"
+ )
+
+ class OnboardingLinkDetails(StripeObject):
+ expires_at: str
+ """
+ Time at which the onboarding link expires. Represented as an RFC 3339 timestamp in UTC
+ with millisecond precision, for example `2022-09-18T13:22:18.123Z`.
+ """
+ refresh_url: str
+ """
+ The URL the user will be redirected to if the onboarding link is expired or invalid.
+ The URL specified should attempt to generate a new onboarding link,
+ and re-direct the user to this new onboarding link so that they can proceed with the onboarding flow.
+ """
+ return_url: Optional[str]
+ """
+ The URL offered to the user as a way back to your app after they claim the sandbox.
+ """
+ url: str
+ """
+ The URL that lets a user claim the sandbox or continue onboarding their Stripe account,
+ depending on the sandbox's status.
+ """
+
+ class OwnerDetails(StripeObject):
+ account: Optional[str]
+ """
+ The ID of the live mode Stripe account that owns the sandbox.
+ This field is only set when `owner_details.app_install_status` is `installed`.
+ """
+ app_install_status: Optional[
+ Literal["installed", "pending_install", "pending_onboarding"]
+ ]
+ """
+ Indicates whether the platform app is installed on the sandbox's live mode owner account.
+ """
+
+ class Prefill(StripeObject):
+ country: str
+ """
+ Country in which the account holder resides, or in which the business is legally established.
+ Use two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
+ """
+ email: str
+ """
+ Email address of the user who will claim the sandbox.
+ Stripe sends this address an invitation to claim the sandbox and a reminder before the unclaimed sandbox expires.
+ """
+ name: str
+ """
+ Name for the sandbox.
+ """
+
+ class SandboxDetails(StripeObject):
+ class ApiKeys(StripeObject):
+ class Mcp(StripeObject):
+ class SecretKey(StripeObject):
+ token: Optional[str]
+ """
+ The plaintext token for the API key.
+ """
+
+ created: str
+ """
+ Time at which the API key was created. Represented as an RFC 3339 timestamp in UTC
+ with millisecond precision, for example `2022-09-18T13:22:18.123Z`.
+ """
+ expires_at: Optional[str]
+ """
+ Time at which the API key expires. Represented as an RFC 3339 timestamp in UTC
+ with millisecond precision, for example `2022-09-18T13:22:18.123Z`.
+ """
+ id: str
+ """
+ Unique identifier of the API key.
+ """
+ secret_key: Optional[SecretKey]
+ """
+ Token for the secret key. Present only in the create response;
+ null in subsequent retrieve responses.
+ """
+ status: Union[Literal["active", "expired"], str]
+ """
+ Current status of the API key.
+ """
+ type: Union[Literal["secret_key"], str]
+ """
+ Type of the API key.
+ """
+ _inner_class_types = {"secret_key": SecretKey}
+
+ class Publishable(StripeObject):
+ class PublishableKey(StripeObject):
+ token: Optional[str]
+ """
+ The plaintext token for the API key.
+ """
+
+ created: str
+ """
+ Time at which the API key was created. Represented as an RFC 3339 timestamp in UTC
+ with millisecond precision, for example `2022-09-18T13:22:18.123Z`.
+ """
+ expires_at: Optional[str]
+ """
+ Time at which the API key expires. Represented as an RFC 3339 timestamp in UTC
+ with millisecond precision, for example `2022-09-18T13:22:18.123Z`.
+ """
+ id: str
+ """
+ Unique identifier of the API key.
+ """
+ publishable_key: Optional[PublishableKey]
+ """
+ Token for the publishable key. Present only in the create response;
+ null in subsequent retrieve responses.
+ """
+ status: Union[Literal["active", "expired"], str]
+ """
+ Current status of the API key.
+ """
+ type: Union[Literal["publishable_key"], str]
+ """
+ Type of the API key.
+ """
+ _inner_class_types = {"publishable_key": PublishableKey}
+
+ class Secret(StripeObject):
+ class SecretKey(StripeObject):
+ token: Optional[str]
+ """
+ The plaintext token for the API key.
+ """
+
+ created: str
+ """
+ Time at which the API key was created. Represented as an RFC 3339 timestamp in UTC
+ with millisecond precision, for example `2022-09-18T13:22:18.123Z`.
+ """
+ expires_at: Optional[str]
+ """
+ Time at which the API key expires. Represented as an RFC 3339 timestamp in UTC
+ with millisecond precision, for example `2022-09-18T13:22:18.123Z`.
+ """
+ id: str
+ """
+ Unique identifier of the API key.
+ """
+ secret_key: Optional[SecretKey]
+ """
+ Token for the secret key. Present only in the create response;
+ null in subsequent retrieve responses.
+ """
+ status: Union[Literal["active", "expired"], str]
+ """
+ Current status of the API key.
+ """
+ type: Union[Literal["secret_key"], str]
+ """
+ Type of the API key.
+ """
+ _inner_class_types = {"secret_key": SecretKey}
+
+ mcp: Optional[Mcp]
+ """
+ Object hash for the sandbox's MCP key.
+ Null unless `enable_mcp_access: true` was passed in the creation request.
+ """
+ publishable: Publishable
+ """
+ Object hash for the sandbox's publishable key.
+ """
+ secret: Secret
+ """
+ Object hash for the sandbox's secret key.
+ """
+ _inner_class_types = {
+ "mcp": Mcp,
+ "publishable": Publishable,
+ "secret": Secret,
+ }
+
+ account: str
+ """
+ The sandbox's Stripe account ID.
+ """
+ api_keys: Optional[ApiKeys]
+ """
+ Keys that can be used to set up an integration for this sandbox and operate on the account.
+ Present in the create response. To fetch this field in the retrieve response,
+ pass `sandbox_details.api_keys` in the `include` parameter.
+ """
+ _inner_class_types = {"api_keys": ApiKeys}
+
+ channel: Literal["public", "testing"]
+ """
+ The distribution channel used to pre-install your Stripe App on the claimable sandbox.
+ Use `testing` to install your app's external test version or `public` to install its published version.
+ """
+ claimed_at: Optional[str]
+ """
+ Time at which the sandbox was claimed. Set when the status is `claimed` or `live`.
+ Represented as an RFC 3339 timestamp in UTC with millisecond precision,
+ for example `2022-09-18T13:22:18.123Z`.
+ """
+ created: str
+ """
+ Time at which the sandbox was created. Represented as an RFC 3339 timestamp in UTC
+ with millisecond precision, for example `2022-09-18T13:22:18.123Z`.
+ """
+ expires_at: Optional[str]
+ """
+ Time at which the unclaimed sandbox expires. Null when the status is `claimed` or `live`.
+ Represented as an RFC 3339 timestamp in UTC with millisecond precision,
+ for example `2022-09-18T13:22:18.123Z`.
+ """
+ id: str
+ """
+ Unique identifier for the claimable sandbox.
+ """
+ livemode: bool
+ """
+ Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
+ """
+ object: Literal["v2.core.claimable_sandbox"]
+ """
+ String representing the object's type. Objects of the same type share the same value of the object field.
+ """
+ onboarding_link_details: Optional[OnboardingLinkDetails]
+ """
+ Details about the onboarding link.
+ Null when the sandbox status is `live` or `expired`.
+ """
+ owner_details: Optional[OwnerDetails]
+ """
+ Details about the live mode owner account of the sandbox.
+ This will be null until the sandbox is claimed.
+ """
+ prefill: Prefill
+ """
+ Values prefilled during the creation of the sandbox. When a user claims the sandbox, they will be able to update these values.
+ """
+ sandbox_details: SandboxDetails
+ """
+ Data about the Stripe sandbox object.
+ """
+ status: Literal["claimed", "expired", "live", "unclaimed"]
+ """
+ Status of the sandbox.
+ """
+ _inner_class_types = {
+ "onboarding_link_details": OnboardingLinkDetails,
+ "owner_details": OwnerDetails,
+ "prefill": Prefill,
+ "sandbox_details": SandboxDetails,
+ }
diff --git a/stripe/v2/core/_claimable_sandbox_service.py b/stripe/v2/core/_claimable_sandbox_service.py
new file mode 100644
index 000000000..43f04f3ef
--- /dev/null
+++ b/stripe/v2/core/_claimable_sandbox_service.py
@@ -0,0 +1,155 @@
+# -*- coding: utf-8 -*-
+# File generated from our OpenAPI spec
+from stripe._stripe_service import StripeService
+from stripe._util import sanitize_id
+from typing import Optional, cast
+from typing_extensions import TYPE_CHECKING
+
+if TYPE_CHECKING:
+ from stripe._request_options import RequestOptions
+ from stripe.params.v2.core._claimable_sandbox_create_params import (
+ ClaimableSandboxCreateParams,
+ )
+ from stripe.params.v2.core._claimable_sandbox_renew_onboarding_link_params import (
+ ClaimableSandboxRenewOnboardingLinkParams,
+ )
+ from stripe.params.v2.core._claimable_sandbox_retrieve_params import (
+ ClaimableSandboxRetrieveParams,
+ )
+ from stripe.v2.core._claimable_sandbox import ClaimableSandbox
+
+
+class ClaimableSandboxService(StripeService):
+ def create(
+ self,
+ params: "ClaimableSandboxCreateParams",
+ options: Optional["RequestOptions"] = None,
+ ) -> "ClaimableSandbox":
+ """
+ Create a claimable sandbox with prefilled data. The response includes an onboarding link that lets
+ a user claim the sandbox into a new or existing Stripe account.
+ """
+ return cast(
+ "ClaimableSandbox",
+ self._request(
+ "post",
+ "/v2/core/claimable_sandboxes",
+ base_address="api",
+ params=params,
+ options=options,
+ ),
+ )
+
+ async def create_async(
+ self,
+ params: "ClaimableSandboxCreateParams",
+ options: Optional["RequestOptions"] = None,
+ ) -> "ClaimableSandbox":
+ """
+ Create a claimable sandbox with prefilled data. The response includes an onboarding link that lets
+ a user claim the sandbox into a new or existing Stripe account.
+ """
+ return cast(
+ "ClaimableSandbox",
+ await self._request_async(
+ "post",
+ "/v2/core/claimable_sandboxes",
+ base_address="api",
+ params=params,
+ options=options,
+ ),
+ )
+
+ def retrieve(
+ self,
+ id: str,
+ /,
+ params: Optional["ClaimableSandboxRetrieveParams"] = None,
+ options: Optional["RequestOptions"] = None,
+ ) -> "ClaimableSandbox":
+ """
+ Retrieves the details of a claimable sandbox that was previously been created.
+ Supply the unique claimable sandbox ID that was returned from your creation request,
+ and Stripe will return the corresponding sandbox information.
+ """
+ return cast(
+ "ClaimableSandbox",
+ self._request(
+ "get",
+ "/v2/core/claimable_sandboxes/{id}".format(id=sanitize_id(id)),
+ base_address="api",
+ params=params,
+ options=options,
+ ),
+ )
+
+ async def retrieve_async(
+ self,
+ id: str,
+ /,
+ params: Optional["ClaimableSandboxRetrieveParams"] = None,
+ options: Optional["RequestOptions"] = None,
+ ) -> "ClaimableSandbox":
+ """
+ Retrieves the details of a claimable sandbox that was previously been created.
+ Supply the unique claimable sandbox ID that was returned from your creation request,
+ and Stripe will return the corresponding sandbox information.
+ """
+ return cast(
+ "ClaimableSandbox",
+ await self._request_async(
+ "get",
+ "/v2/core/claimable_sandboxes/{id}".format(id=sanitize_id(id)),
+ base_address="api",
+ params=params,
+ options=options,
+ ),
+ )
+
+ def renew_onboarding_link(
+ self,
+ id: str,
+ /,
+ params: Optional["ClaimableSandboxRenewOnboardingLinkParams"] = None,
+ options: Optional["RequestOptions"] = None,
+ ) -> "ClaimableSandbox":
+ """
+ Renew the claimable sandbox onboarding link. This invalidates the existing onboarding link.
+ The endpoint only works on a claimable sandbox with status `unclaimed` or `claimed`.
+ """
+ return cast(
+ "ClaimableSandbox",
+ self._request(
+ "post",
+ "/v2/core/claimable_sandboxes/{id}/renew_onboarding_link".format(
+ id=sanitize_id(id),
+ ),
+ base_address="api",
+ params=params,
+ options=options,
+ ),
+ )
+
+ async def renew_onboarding_link_async(
+ self,
+ id: str,
+ /,
+ params: Optional["ClaimableSandboxRenewOnboardingLinkParams"] = None,
+ options: Optional["RequestOptions"] = None,
+ ) -> "ClaimableSandbox":
+ """
+ Renew the claimable sandbox onboarding link. This invalidates the existing onboarding link.
+ The endpoint only works on a claimable sandbox with status `unclaimed` or `claimed`.
+ """
+ return cast(
+ "ClaimableSandbox",
+ await self._request_async(
+ "post",
+ "/v2/core/claimable_sandboxes/{id}/renew_onboarding_link".format(
+ id=sanitize_id(id),
+ ),
+ base_address="api",
+ params=params,
+ options=options,
+ ),
+ )
diff --git a/stripe/v2/core/accounts/_person_token_service.py b/stripe/v2/core/accounts/_person_token_service.py
index 0a40fb628..be9726e96 100644
--- a/stripe/v2/core/accounts/_person_token_service.py
+++ b/stripe/v2/core/accounts/_person_token_service.py
@@ -27,7 +27,8 @@ def create(
) -> "AccountPersonToken":
"""
Creates a single-use token that represents the details for a person. Use this when you create or update persons associated with an Account v2. Learn more about [account tokens](https://docs.stripe.com/connect/account-tokens).
- You can only create person tokens with your application's publishable key and in live mode. You can use your application's secret key to create person tokens only in test mode.
+ In live mode, you must create person tokens using a live publishable key.
+ In a sandbox, you can create person tokens with secret or publishable keys.
"""
return cast(
"AccountPersonToken",
@@ -54,7 +55,8 @@ async def create_async(
) -> "AccountPersonToken":
"""
Creates a single-use token that represents the details for a person. Use this when you create or update persons associated with an Account v2. Learn more about [account tokens](https://docs.stripe.com/connect/account-tokens).
- You can only create person tokens with your application's publishable key and in live mode. You can use your application's secret key to create person tokens only in test mode.
+ In live mode, you must create person tokens using a live publishable key.
+ In a sandbox, you can create person tokens with secret or publishable keys.
"""
return cast(
"AccountPersonToken",
diff --git a/stripe/v2/data/reporting/_query_run.py b/stripe/v2/data/reporting/_query_run.py
index 2fe5eee1d..d8384a3d7 100644
--- a/stripe/v2/data/reporting/_query_run.py
+++ b/stripe/v2/data/reporting/_query_run.py
@@ -7,6 +7,7 @@
class QueryRun(StripeObject):
"""
+ The [Queries and Reports API](https://docs.stripe.com/data/api/query-runs) replaces this API. For new integrations, use `/v2/data/query_runs` instead.
The `QueryRun` object represents an ad-hoc SQL execution. Once created, Stripe processes the query. When
the query has finished running, the object provides a reference to the results.
"""
diff --git a/stripe/v2/iam/_activity_log.py b/stripe/v2/iam/_activity_log.py
index 86864c92c..fa32400cf 100644
--- a/stripe/v2/iam/_activity_log.py
+++ b/stripe/v2/iam/_activity_log.py
@@ -1,5 +1,6 @@
# -*- coding: utf-8 -*-
# File generated from our OpenAPI spec
+from decimal import Decimal
from stripe._stripe_object import StripeObject
from typing import ClassVar, List, Optional, Union
from typing_extensions import Literal
@@ -172,6 +173,467 @@ class Authentication(StripeObject):
Target email address involved in the authentication.
"""
+ class Connect(StripeObject):
+ class Application(StripeObject):
+ id: str
+ """
+ Identifier of the application.
+ """
+
+ class NewExpressBrandingSettings(StripeObject):
+ border_radius: Optional[str]
+ """
+ Border radius for the Express Dashboard.
+ """
+ primary_button_background_color: Optional[str]
+ """
+ Primary button background color for the Express Dashboard.
+ """
+ primary_color: Optional[str]
+ """
+ Primary color for the Express Dashboard.
+ """
+ secondary_button_background_color: Optional[str]
+ """
+ Secondary button background color for the Express Dashboard.
+ """
+
+ class NewSettings(StripeObject):
+ business_name: Optional[str]
+ """
+ The display name shown on the onboarding experience and Dashboard. This is different from the business legal name.
+ """
+ copy_platform_branding_to_new_connected_accounts: Optional[
+ bool
+ ]
+ """
+ Whether platform branding is copied to new connected accounts. These also appear on invoices, receipts, and other Stripe products.
+ """
+ hide_onboarding_support_email: Optional[bool]
+ """
+ Whether the support email is hidden on onboarding surfaces.
+ """
+ hide_onboarding_support_phone: Optional[bool]
+ """
+ Whether the support phone number is hidden on onboarding surfaces.
+ """
+ hide_onboarding_support_url: Optional[bool]
+ """
+ Whether the support URL is hidden on onboarding surfaces.
+ """
+ icon: Optional[str]
+ """
+ Identifier of the icon file (file_* ID).
+ """
+ logo: Optional[str]
+ """
+ Identifier of the logo file (file_* ID).
+ """
+ payout_statement_descriptor: Optional[str]
+ """
+ The platform's default payout statement descriptor. It appears on the bank statements of the platform's connected accounts for their payouts.
+ """
+ primary_color: Optional[str]
+ """
+ A CSS hex color value representing the primary branding color, applied to the onboarding experience and the Stripe Dashboard.
+ """
+ secondary_color: Optional[str]
+ """
+ A CSS hex color value representing the secondary branding color, applied to the onboarding experience and the Stripe Dashboard.
+ """
+
+ class OldExpressBrandingSettings(StripeObject):
+ border_radius: Optional[str]
+ """
+ Border radius for the Express Dashboard.
+ """
+ primary_button_background_color: Optional[str]
+ """
+ Primary button background color for the Express Dashboard.
+ """
+ primary_color: Optional[str]
+ """
+ Primary color for the Express Dashboard.
+ """
+ secondary_button_background_color: Optional[str]
+ """
+ Secondary button background color for the Express Dashboard.
+ """
+
+ class OldSettings(StripeObject):
+ business_name: Optional[str]
+ """
+ The display name shown on the onboarding experience and Dashboard. This is different from the business legal name.
+ """
+ copy_platform_branding_to_new_connected_accounts: Optional[
+ bool
+ ]
+ """
+ Whether platform branding is copied to new connected accounts. These also appear on invoices, receipts, and other Stripe products.
+ """
+ hide_onboarding_support_email: Optional[bool]
+ """
+ Whether the support email is hidden on onboarding surfaces.
+ """
+ hide_onboarding_support_phone: Optional[bool]
+ """
+ Whether the support phone number is hidden on onboarding surfaces.
+ """
+ hide_onboarding_support_url: Optional[bool]
+ """
+ Whether the support URL is hidden on onboarding surfaces.
+ """
+ icon: Optional[str]
+ """
+ Identifier of the icon file (file_* ID).
+ """
+ logo: Optional[str]
+ """
+ Identifier of the logo file (file_* ID).
+ """
+ payout_statement_descriptor: Optional[str]
+ """
+ The platform's default payout statement descriptor. It appears on the bank statements of the platform's connected accounts for their payouts.
+ """
+ primary_color: Optional[str]
+ """
+ A CSS hex color value representing the primary branding color, applied to the onboarding experience and the Stripe Dashboard.
+ """
+ secondary_color: Optional[str]
+ """
+ A CSS hex color value representing the secondary branding color, applied to the onboarding experience and the Stripe Dashboard.
+ """
+
+ application: Optional[Application]
+ """
+ The Connect application.
+ """
+ new_express_branding_settings: Optional[NewExpressBrandingSettings]
+ """
+ Express Dashboard branding settings after the change. Set for the connect_express_branding_updated action.
+ """
+ new_settings: Optional[NewSettings]
+ """
+ Connect settings after the change. Set for the connect_settings_updated action.
+ """
+ old_express_branding_settings: Optional[OldExpressBrandingSettings]
+ """
+ Express Dashboard branding settings before the change. Set for the connect_express_branding_updated action.
+ """
+ old_settings: Optional[OldSettings]
+ """
+ Connect settings before the change. Set for the connect_settings_updated action.
+ """
+ site_link_route: Optional[
+ Union[
+ Literal[
+ "account_management",
+ "balances",
+ "documents",
+ "financial_accounts",
+ "issuing_card_transactions",
+ "notification_banner",
+ "payments",
+ "payouts",
+ ],
+ str,
+ ]
+ ]
+ """
+ The site link route. Set for the connect_site_link_updated action.
+ """
+ _inner_class_types = {
+ "application": Application,
+ "new_express_branding_settings": NewExpressBrandingSettings,
+ "new_settings": NewSettings,
+ "old_express_branding_settings": OldExpressBrandingSettings,
+ "old_settings": OldSettings,
+ }
+
+ class DataExport(StripeObject):
+ type: str
+ """
+ Name of export type.
+ """
+
+ class EventDestination(StripeObject):
+ class NewConfiguration(StripeObject):
+ class AmazonEventbridge(StripeObject):
+ aws_account_id: str
+ """
+ AWS account ID configured for the event destination.
+ """
+ aws_event_source_arn: str
+ """
+ ARN of the AWS event source configured for the event destination.
+ """
+ aws_region: str
+ """
+ AWS region configured for the event destination.
+ """
+
+ class AzureEventGrid(StripeObject):
+ azure_partner_topic_name: str
+ """
+ Azure partner topic name configured for the event destination.
+ """
+ azure_region: str
+ """
+ Azure region configured for the event destination.
+ """
+ azure_resource_group_name: str
+ """
+ Azure resource group name configured for the event destination.
+ """
+ azure_subscription_id: str
+ """
+ Azure subscription ID configured for the event destination.
+ """
+
+ class WebhookEndpoint(StripeObject):
+ url: str
+ """
+ URL configured for the webhook endpoint.
+ """
+
+ amazon_eventbridge: Optional[AmazonEventbridge]
+ """
+ Amazon EventBridge configuration.
+ """
+ azure_event_grid: Optional[AzureEventGrid]
+ """
+ Azure Event Grid configuration.
+ """
+ enabled_events: List[str]
+ """
+ Event types subscribed to by the destination. ["*"] subscribes to all V1 webhook events.
+ """
+ events_from: List[str]
+ """
+ Event source selectors: @self, @accounts, @organization_members, or @organization_members/@accounts.
+ """
+ status: Union[Literal["disabled", "enabled"], str]
+ """
+ Status of the event destination.
+ """
+ webhook_endpoint: Optional[WebhookEndpoint]
+ """
+ Webhook endpoint configuration.
+ """
+ _inner_class_types = {
+ "amazon_eventbridge": AmazonEventbridge,
+ "azure_event_grid": AzureEventGrid,
+ "webhook_endpoint": WebhookEndpoint,
+ }
+
+ class OldConfiguration(StripeObject):
+ class AmazonEventbridge(StripeObject):
+ aws_account_id: str
+ """
+ AWS account ID configured for the event destination.
+ """
+ aws_event_source_arn: str
+ """
+ ARN of the AWS event source configured for the event destination.
+ """
+ aws_region: str
+ """
+ AWS region configured for the event destination.
+ """
+
+ class AzureEventGrid(StripeObject):
+ azure_partner_topic_name: str
+ """
+ Azure partner topic name configured for the event destination.
+ """
+ azure_region: str
+ """
+ Azure region configured for the event destination.
+ """
+ azure_resource_group_name: str
+ """
+ Azure resource group name configured for the event destination.
+ """
+ azure_subscription_id: str
+ """
+ Azure subscription ID configured for the event destination.
+ """
+
+ class WebhookEndpoint(StripeObject):
+ url: str
+ """
+ URL configured for the webhook endpoint.
+ """
+
+ amazon_eventbridge: Optional[AmazonEventbridge]
+ """
+ Amazon EventBridge configuration.
+ """
+ azure_event_grid: Optional[AzureEventGrid]
+ """
+ Azure Event Grid configuration.
+ """
+ enabled_events: List[str]
+ """
+ Event types subscribed to by the destination. ["*"] subscribes to all V1 webhook events.
+ """
+ events_from: List[str]
+ """
+ Event source selectors: @self, @accounts, @organization_members, or @organization_members/@accounts.
+ """
+ status: Union[Literal["disabled", "enabled"], str]
+ """
+ Status of the event destination.
+ """
+ webhook_endpoint: Optional[WebhookEndpoint]
+ """
+ Webhook endpoint configuration.
+ """
+ _inner_class_types = {
+ "amazon_eventbridge": AmazonEventbridge,
+ "azure_event_grid": AzureEventGrid,
+ "webhook_endpoint": WebhookEndpoint,
+ }
+
+ new_configuration: Optional[NewConfiguration]
+ """
+ Configuration after the change. Set for added and updated actions, absent for removed actions.
+ """
+ old_configuration: Optional[OldConfiguration]
+ """
+ Configuration before the change. Set for updated and removed actions, absent for added actions.
+ """
+ type: Union[
+ Literal[
+ "amazon_eventbridge",
+ "azure_event_grid",
+ "webhook_endpoint",
+ ],
+ str,
+ ]
+ """
+ Type of the event destination.
+ """
+ _inner_class_types = {
+ "new_configuration": NewConfiguration,
+ "old_configuration": OldConfiguration,
+ }
+
+ class Radar(StripeObject):
+ class NewRule(StripeObject):
+ action: Union[
+ Literal[
+ "allow",
+ "block",
+ "block_fa_outbound",
+ "manual_review",
+ "payout_pause",
+ "raise_review",
+ "request_credentials",
+ "resolve_dispute",
+ ],
+ str,
+ ]
+ """
+ Action performed when the rule matches.
+ """
+ enabled: Optional[bool]
+ """
+ Whether the rule is enabled.
+ """
+ id: str
+ """
+ Identifier of the rule.
+ """
+ objective: Optional[str]
+ """
+ Objective of the rule.
+ """
+ predicate: Optional[str]
+ """
+ Rule expression evaluated to determine whether the rule matches.
+ """
+ rollout_percentage: Optional[Decimal]
+ """
+ Percentage of matching traffic to which the rule applies, between 0 and 100, serialized as a decimal string.
+ """
+ type: Optional[Union[Literal["account", "payment"], str]]
+ """
+ Type of entity evaluated by the rule.
+ """
+ _field_encodings = {"rollout_percentage": "decimal_string"}
+
+ class OldRule(StripeObject):
+ action: Union[
+ Literal[
+ "allow",
+ "block",
+ "block_fa_outbound",
+ "manual_review",
+ "payout_pause",
+ "raise_review",
+ "request_credentials",
+ "resolve_dispute",
+ ],
+ str,
+ ]
+ """
+ Action performed when the rule matches.
+ """
+ enabled: Optional[bool]
+ """
+ Whether the rule is enabled.
+ """
+ id: str
+ """
+ Identifier of the rule.
+ """
+ objective: Optional[str]
+ """
+ Objective of the rule.
+ """
+ predicate: Optional[str]
+ """
+ Rule expression evaluated to determine whether the rule matches.
+ """
+ rollout_percentage: Optional[Decimal]
+ """
+ Percentage of matching traffic to which the rule applies, between 0 and 100, serialized as a decimal string.
+ """
+ type: Optional[Union[Literal["account", "payment"], str]]
+ """
+ Type of entity evaluated by the rule.
+ """
+ _field_encodings = {"rollout_percentage": "decimal_string"}
+
+ new_risk_preference: Optional[
+ Union[
+ Literal["balanced", "custom", "high_growth", "low_risk"],
+ str,
+ ]
+ ]
+ """
+ Risk preference after a preference switch carried by a protection-toggle action.
+ """
+ new_rules: Optional[List[NewRule]]
+ """
+ Rules after the change. Set for add, update, enable, and disable actions; absent for remove actions.
+ """
+ old_risk_preference: Optional[
+ Union[
+ Literal["balanced", "custom", "high_growth", "low_risk"],
+ str,
+ ]
+ ]
+ """
+ Risk preference before a preference switch carried by a protection-toggle action.
+ """
+ old_rules: Optional[List[OldRule]]
+ """
+ Rules before the change. Set for update, removal, enable, and disable actions; absent for add actions.
+ """
+ _inner_class_types = {"new_rules": NewRule, "old_rules": OldRule}
+
class Scim(StripeObject):
group_name: str
"""
@@ -200,6 +662,82 @@ class Sso(StripeObject):
SSO enforcement level.
"""
+ class UserAccess(StripeObject):
+ class DashboardClient(StripeObject):
+ user_agent: str
+ """
+ User-Agent header for the user access action.
+ """
+
+ class Network(StripeObject):
+ city: str
+ """
+ City for the user access action.
+ """
+ country: str
+ """
+ Country for the user access action.
+ """
+ ip_address: str
+ """
+ IP address for the user access action.
+ """
+ region: str
+ """
+ Region for the user access action.
+ """
+
+ class Risk(StripeObject):
+ class Signal(StripeObject):
+ class NovelDevice(StripeObject):
+ pass
+
+ novel_device: Optional[NovelDevice]
+ """
+ The user access action used a novel device.
+ """
+ type: Union[Literal["novel_device"], str]
+ """
+ Type of risk signal.
+ """
+ _inner_class_types = {"novel_device": NovelDevice}
+
+ signals: List[Signal]
+ """
+ Risk signals for the user access action.
+ """
+ _inner_class_types = {"signals": Signal}
+
+ dashboard_client: Optional[DashboardClient]
+ """
+ Dashboard client details for the user access action.
+ """
+ expires_at: str
+ """
+ Timestamp when the user access expires.
+ """
+ network: Network
+ """
+ Network details for the user access action.
+ """
+ risk: Risk
+ """
+ Risk details for the user access action.
+ """
+ roles: List[str]
+ """
+ Roles associated with the user access action.
+ """
+ surface: Union[Literal["dashboard", "express"], str]
+ """
+ Surface where the user access action started.
+ """
+ _inner_class_types = {
+ "dashboard_client": DashboardClient,
+ "network": Network,
+ "risk": Risk,
+ }
+
class UserInvite(StripeObject):
invited_user_email: str
"""
@@ -258,6 +796,22 @@ class UserRoles(StripeObject):
"""
Details of an authentication action.
"""
+ connect: Optional[Connect]
+ """
+ Details of a Connect action.
+ """
+ data_export: Optional[DataExport]
+ """
+ Details of a data export action.
+ """
+ event_destination: Optional[EventDestination]
+ """
+ Details of an event destination action.
+ """
+ radar: Optional[Radar]
+ """
+ Details of a Radar action.
+ """
scim: Optional[Scim]
"""
Details of a SCIM action.
@@ -270,11 +824,17 @@ class UserRoles(StripeObject):
Literal[
"account_security",
"api_key",
+ "app",
"authentication",
+ "connect",
+ "data_export",
+ "event_destination",
"issuing",
"payout",
+ "radar",
"scim",
"sso",
+ "user_access",
"user_invite",
"user_profile",
"user_roles",
@@ -284,6 +844,10 @@ class UserRoles(StripeObject):
"""
The action group type of the activity log entry.
"""
+ user_access: Optional[UserAccess]
+ """
+ Details of a user access action.
+ """
user_invite: Optional[UserInvite]
"""
Details of a user invite action.
@@ -300,8 +864,13 @@ class UserRoles(StripeObject):
"account_security": AccountSecurity,
"api_key": ApiKey,
"authentication": Authentication,
+ "connect": Connect,
+ "data_export": DataExport,
+ "event_destination": EventDestination,
+ "radar": Radar,
"scim": Scim,
"sso": Sso,
+ "user_access": UserAccess,
"user_invite": UserInvite,
"user_profile": UserProfile,
"user_roles": UserRoles,
@@ -314,13 +883,16 @@ class RelatedObject(StripeObject):
"""
type: Union[
Literal[
+ "apps.install",
"balance_transfer",
"bank_account",
"blockchain_address",
"card",
+ "v2.core.event_destination",
"issuing.card",
"issuing.cardholder",
"issuing.dispute",
+ "webhook_endpoint",
],
str,
]
@@ -377,6 +949,20 @@ class Request(StripeObject):
"api_key_deleted",
"api_key_updated",
"api_key_viewed",
+ "application_authorized",
+ "application_created",
+ "application_deauthorized",
+ "app_installed",
+ "app_uninstalled",
+ "connect_express_branding_updated",
+ "connect_oauth_disabled",
+ "connect_oauth_enabled",
+ "connect_settings_updated",
+ "connect_site_link_updated",
+ "data_export_requested",
+ "event_destination_added",
+ "event_destination_removed",
+ "event_destination_updated",
"issuing_activated",
"issuing_balance_transfer_created",
"issuing_cardholder_created",
@@ -394,6 +980,17 @@ class Request(StripeObject):
"payout_destination_updated",
"payout_schedule_edits_disabled",
"payout_schedule_edits_enabled",
+ "payout_schedule_updated",
+ "radar_adaptive_3ds_disabled",
+ "radar_dynamic_risk_thresholds_disabled",
+ "radar_early_fraud_warning_disabled",
+ "radar_for_setup_intents_disabled",
+ "radar_fraud_dispute_protection_disabled",
+ "radar_rule_added",
+ "radar_rule_disabled",
+ "radar_rule_enabled",
+ "radar_rule_removed",
+ "radar_rule_updated",
"scim_group_deleted",
"scim_group_member_added",
"scim_group_member_removed",
@@ -405,6 +1002,7 @@ class Request(StripeObject):
"sso_settings_updated",
"two_step_authentication_mandate_disabled",
"two_step_authentication_mandate_enabled",
+ "user_access_started",
"user_auth_challenge_failed",
"user_email_changed",
"user_email_verified",
diff --git a/stripe/v2/money_management/_payout_method.py b/stripe/v2/money_management/_payout_method.py
index 5ee3deb80..4dff8e1e9 100644
--- a/stripe/v2/money_management/_payout_method.py
+++ b/stripe/v2/money_management/_payout_method.py
@@ -24,6 +24,33 @@ class AlternativeReference(StripeObject):
The type of the alternative reference (e.g., external_account for V1 external accounts).
"""
+ class ApplePay(StripeObject):
+ dynamic_last4: str
+ """
+ The last four digits of the device account number (DPAN).
+ """
+ exp_month: str
+ """
+ The month the card expires.
+ """
+ exp_year: str
+ """
+ The year the card expires.
+ """
+ fingerprint: str
+ """
+ Uniquely identifies this particular Apple-Pay-registered DPAN (Device PAN). Refer to
+ https://support.stripe.com/questions/how-do-card-numbers-work-with-apple-pay-and-google-pay-and-what-is-dynamic-last4 for more info on DPANs.
+ """
+ last4: str
+ """
+ The last 4 digits of the card number.
+ """
+ supported_currencies: List[str]
+ """
+ The list of currencies supported by this card.
+ """
+
class BankAccount(StripeObject):
bank_account_type: Literal["checking", "futsu", "savings", "toza"]
"""
@@ -141,6 +168,10 @@ class UsageStatus(StripeObject):
"""
The alternative reference for this payout method, if it's a projected payout method.
"""
+ apple_pay: Optional[ApplePay]
+ """
+ The PayoutMethodApplePay object details.
+ """
archived: bool
"""
Whether the payout method was archived. Payout methods can be archived through the /archive API,
@@ -188,7 +219,9 @@ class UsageStatus(StripeObject):
Whether the Payout Method is currently unusable for money movement, despite potentially being correctly set up.
Please reach out to Stripe Support for more information.
"""
- type: Union[Literal["bank_account", "card", "crypto_wallet"], str]
+ type: Union[
+ Literal["apple_pay", "bank_account", "card", "crypto_wallet"], str
+ ]
"""
Open Enum. The type of payout method.
"""
@@ -198,6 +231,7 @@ class UsageStatus(StripeObject):
"""
_inner_class_types = {
"alternative_reference": AlternativeReference,
+ "apple_pay": ApplePay,
"bank_account": BankAccount,
"card": Card,
"crypto_wallet": CryptoWallet,
diff --git a/stripe/v2/money_management/_received_debit.py b/stripe/v2/money_management/_received_debit.py
index c108c5d8e..d5e0d919f 100644
--- a/stripe/v2/money_management/_received_debit.py
+++ b/stripe/v2/money_management/_received_debit.py
@@ -16,6 +16,31 @@ class ReceivedDebit(StripeObject):
)
class BankTransfer(StripeObject):
+ class OriginatingBankAccount(StripeObject):
+ class Aba(StripeObject):
+ account_holder_name: Optional[str]
+ """
+ The name of the account holder that originated the debit, as provided by the ACH network.
+ """
+ bank_name: Optional[str]
+ """
+ The name of the bank the debit originated from.
+ """
+ routing_number: Optional[str]
+ """
+ The routing number of the bank that originated the debit.
+ """
+
+ aba: Optional[Aba]
+ """
+ Details of the originating account. Present when type is `aba`.
+ """
+ type: Union[Literal["aba"], str]
+ """
+ The credential type identifying the originating bank account.
+ """
+ _inner_class_types = {"aba": Aba}
+
class UsBankAccount(StripeObject):
bank_name: Optional[str]
"""
@@ -34,8 +59,17 @@ class UsBankAccount(StripeObject):
"""
The Financial Address that was debited.
"""
+ network: Union[Literal["ach"], str]
+ """
+ The bank network the debit was originated on.
+ """
+ originating_bank_account: OriginatingBankAccount
+ """
+ The originating bank account's credential details.
+ """
payment_method_type: Union[Literal["us_bank_account"], str]
"""
+ Deprecated: Use `bank_transfer.originating_bank_account.type` instead.
Open Enum. The type of the payment method used to originate the debit.
"""
statement_descriptor: Optional[str]
@@ -44,10 +78,14 @@ class UsBankAccount(StripeObject):
"""
us_bank_account: Optional[UsBankAccount]
"""
+ Deprecated: Use `bank_transfer.originating_bank_account.aba` instead.
Object containing details of the US Bank Account that originated the debit.
Present when the debit was originated via ACH.
"""
- _inner_class_types = {"us_bank_account": UsBankAccount}
+ _inner_class_types = {
+ "originating_bank_account": OriginatingBankAccount,
+ "us_bank_account": UsBankAccount,
+ }
class StatusDetails(StripeObject):
class Failed(StripeObject):
diff --git a/tests/test_generated_examples.py b/tests/test_generated_examples.py
index 57175af54..ac4c1d248 100644
--- a/tests/test_generated_examples.py
+++ b/tests/test_generated_examples.py
@@ -43776,153 +43776,6 @@ def test_v2_billing_bill_settings_version_get_2_service(
api_base="https://api.stripe.com",
)
- def test_v2_billing_cadence_get_service(
- self, http_client_mock: HTTPClientMock
- ) -> None:
- http_client_mock.stub_request(
- "get",
- "/v2/billing/cadences",
- )
- client = StripeClient(
- "sk_test_123",
- http_client=http_client_mock.get_mock_http_client(),
- )
-
- client.v2.billing.cadences.list()
- http_client_mock.assert_requested(
- "get",
- path="/v2/billing/cadences",
- query_string="",
- api_base="https://api.stripe.com",
- )
-
- def test_v2_billing_cadence_post_service(
- self, http_client_mock: HTTPClientMock
- ) -> None:
- http_client_mock.stub_request(
- "post",
- "/v2/billing/cadences",
- )
- client = StripeClient(
- "sk_test_123",
- http_client=http_client_mock.get_mock_http_client(),
- )
-
- client.v2.billing.cadences.create(
- {
- "billing_cycle": {
- "day": {
- "time": {
- "hour": 3208676,
- "minute": 1074026988,
- "second": 906279820,
- },
- },
- "interval_count": 797691627,
- "month": {
- "day_of_month": 1361669285,
- "month_of_year": 82933018,
- "time": {
- "hour": 3208676,
- "minute": 1074026988,
- "second": 906279820,
- },
- },
- "type": "week",
- "week": {
- "day_of_week": 43636807,
- "time": {
- "hour": 3208676,
- "minute": 1074026988,
- "second": 906279820,
- },
- },
- "year": {
- "day_of_month": 1361669285,
- "month_of_year": 82933018,
- "time": {
- "hour": 3208676,
- "minute": 1074026988,
- "second": 906279820,
- },
- },
- },
- "payer": {"billing_profile": "billing_profile"},
- }
- )
- http_client_mock.assert_requested(
- "post",
- path="/v2/billing/cadences",
- query_string="",
- api_base="https://api.stripe.com",
- post_data='{"billing_cycle":{"day":{"time":{"hour":3208676,"minute":1074026988,"second":906279820}},"interval_count":797691627,"month":{"day_of_month":1361669285,"month_of_year":82933018,"time":{"hour":3208676,"minute":1074026988,"second":906279820}},"type":"week","week":{"day_of_week":43636807,"time":{"hour":3208676,"minute":1074026988,"second":906279820}},"year":{"day_of_month":1361669285,"month_of_year":82933018,"time":{"hour":3208676,"minute":1074026988,"second":906279820}}},"payer":{"billing_profile":"billing_profile"}}',
- is_json=True,
- )
-
- def test_v2_billing_cadence_get_2_service(
- self, http_client_mock: HTTPClientMock
- ) -> None:
- http_client_mock.stub_request(
- "get",
- "/v2/billing/cadences/id_123",
- )
- client = StripeClient(
- "sk_test_123",
- http_client=http_client_mock.get_mock_http_client(),
- )
-
- client.v2.billing.cadences.retrieve("id_123")
- http_client_mock.assert_requested(
- "get",
- path="/v2/billing/cadences/id_123",
- query_string="",
- api_base="https://api.stripe.com",
- )
-
- def test_v2_billing_cadence_post_2_service(
- self, http_client_mock: HTTPClientMock
- ) -> None:
- http_client_mock.stub_request(
- "post",
- "/v2/billing/cadences/id_123",
- )
- client = StripeClient(
- "sk_test_123",
- http_client=http_client_mock.get_mock_http_client(),
- )
-
- client.v2.billing.cadences.update("id_123")
- http_client_mock.assert_requested(
- "post",
- path="/v2/billing/cadences/id_123",
- query_string="",
- api_base="https://api.stripe.com",
- post_data="{}",
- is_json=True,
- )
-
- def test_v2_billing_cadence_post_3_service(
- self, http_client_mock: HTTPClientMock
- ) -> None:
- http_client_mock.stub_request(
- "post",
- "/v2/billing/cadences/id_123/cancel",
- )
- client = StripeClient(
- "sk_test_123",
- http_client=http_client_mock.get_mock_http_client(),
- )
-
- client.v2.billing.cadences.cancel("id_123")
- http_client_mock.assert_requested(
- "post",
- path="/v2/billing/cadences/id_123/cancel",
- query_string="",
- api_base="https://api.stripe.com",
- post_data="{}",
- is_json=True,
- )
-
def test_v2_billing_collection_setting_get_service(
self, http_client_mock: HTTPClientMock
) -> None:
@@ -44595,6 +44448,7 @@ def test_v2_core_account_link_post_service(
{
"account": "account",
"use_case": {
+ "account_dashboard": {"refresh_url": "refresh_url"},
"account_onboarding": {
"collection_options": {
"fields": "eventually_due",
@@ -44611,7 +44465,7 @@ def test_v2_core_account_link_post_service(
"refresh_url": "refresh_url",
"return_url": "return_url",
},
- "type": "account_onboarding",
+ "type": "account_dashboard",
},
}
)
@@ -44620,7 +44474,7 @@ def test_v2_core_account_link_post_service(
path="/v2/core/account_links",
query_string="",
api_base="https://api.stripe.com",
- post_data='{"account":"account","use_case":{"account_onboarding":{"collection_options":{"fields":"eventually_due","future_requirements":"include"},"refresh_url":"refresh_url","return_url":"return_url"},"account_update":{"collection_options":{"fields":"eventually_due","future_requirements":"include"},"refresh_url":"refresh_url","return_url":"return_url"},"type":"account_onboarding"}}',
+ post_data='{"account":"account","use_case":{"account_dashboard":{"refresh_url":"refresh_url"},"account_onboarding":{"collection_options":{"fields":"eventually_due","future_requirements":"include"},"refresh_url":"refresh_url","return_url":"return_url"},"account_update":{"collection_options":{"fields":"eventually_due","future_requirements":"include"},"refresh_url":"refresh_url","return_url":"return_url"},"type":"account_dashboard"}}',
is_json=True,
)
@@ -44822,6 +44676,83 @@ def test_v2_core_batch_job_post_2_service(
is_json=True,
)
+ def test_v2_core_claimable_sandbox_post_service(
+ self, http_client_mock: HTTPClientMock
+ ) -> None:
+ http_client_mock.stub_request(
+ "post",
+ "/v2/core/claimable_sandboxes",
+ )
+ client = StripeClient(
+ "sk_test_123",
+ http_client=http_client_mock.get_mock_http_client(),
+ )
+
+ client.v2.core.claimable_sandboxes.create(
+ {
+ "enable_mcp_access": True,
+ "onboarding_link_details": {
+ "refresh_url": "refresh_url",
+ "return_url": "return_url",
+ },
+ "prefill": {
+ "country": "country",
+ "email": "email",
+ "name": "name",
+ },
+ }
+ )
+ http_client_mock.assert_requested(
+ "post",
+ path="/v2/core/claimable_sandboxes",
+ query_string="",
+ api_base="https://api.stripe.com",
+ post_data='{"enable_mcp_access":true,"onboarding_link_details":{"refresh_url":"refresh_url","return_url":"return_url"},"prefill":{"country":"country","email":"email","name":"name"}}',
+ is_json=True,
+ )
+
+ def test_v2_core_claimable_sandbox_get_service(
+ self, http_client_mock: HTTPClientMock
+ ) -> None:
+ http_client_mock.stub_request(
+ "get",
+ "/v2/core/claimable_sandboxes/id_123",
+ )
+ client = StripeClient(
+ "sk_test_123",
+ http_client=http_client_mock.get_mock_http_client(),
+ )
+
+ client.v2.core.claimable_sandboxes.retrieve("id_123")
+ http_client_mock.assert_requested(
+ "get",
+ path="/v2/core/claimable_sandboxes/id_123",
+ query_string="",
+ api_base="https://api.stripe.com",
+ )
+
+ def test_v2_core_claimable_sandbox_post_2_service(
+ self, http_client_mock: HTTPClientMock
+ ) -> None:
+ http_client_mock.stub_request(
+ "post",
+ "/v2/core/claimable_sandboxes/id_123/renew_onboarding_link",
+ )
+ client = StripeClient(
+ "sk_test_123",
+ http_client=http_client_mock.get_mock_http_client(),
+ )
+
+ client.v2.core.claimable_sandboxes.renew_onboarding_link("id_123")
+ http_client_mock.assert_requested(
+ "post",
+ path="/v2/core/claimable_sandboxes/id_123/renew_onboarding_link",
+ query_string="",
+ api_base="https://api.stripe.com",
+ post_data="{}",
+ is_json=True,
+ )
+
def test_v2_core_event_get_service(
self, http_client_mock: HTTPClientMock
) -> None:
diff --git a/tests/test_http_client.py b/tests/test_http_client.py
index 937eec3fa..959d72104 100644
--- a/tests/test_http_client.py
+++ b/tests/test_http_client.py
@@ -1,7 +1,7 @@
+import importlib
import io
import base64
import json
-import sys
import threading
from typing import Any, Callable, Dict, List, Optional
from unittest.mock import MagicMock, Mock, call, patch
@@ -9,10 +9,7 @@
import pytest
from typing_extensions import Type
-if sys.version_info >= (3, 8):
- from unittest.mock import AsyncMock
-else:
- from mock import AsyncMock
+from unittest.mock import AsyncMock
from contextlib import contextmanager
@@ -44,7 +41,15 @@ def mocked_request_lib():
SUPPORTED_LIBS = frozenset(
- ("google.appengine.api", "requests", "pycurl", "httpx", "aiohttp", "anyio")
+ (
+ "google.appengine.api",
+ "requests",
+ "pycurl",
+ "httpx2",
+ "httpx", # TODO: (DEVSDK-3427) drop in the next major version.
+ "aiohttp",
+ "anyio",
+ )
)
@@ -108,10 +113,15 @@ def test_default_httpclient_from_imports(
@pytest.mark.parametrize(
["available_libs", "expected"],
[
- # needs both httpx and anyio
+ # TODO: (DEVSDK-3427) delete the httpx-only cases in the next major version.
+ # needs both httpx2 (or httpx) and anyio
+ [["httpx2"], NoImportFoundAsyncClient],
[["httpx"], NoImportFoundAsyncClient],
[["anyio"], NoImportFoundAsyncClient],
+ [["httpx2", "anyio"], HTTPXClient],
[["httpx", "anyio"], HTTPXClient],
+ [["httpx2", "httpx", "anyio"], HTTPXClient],
+ [["httpx", "anyio", "aiohttp"], HTTPXClient],
# having only one required lib means we proceed
[["anyio", "aiohttp"], AIOHTTPClient],
[["aiohttp"], AIOHTTPClient],
@@ -1167,6 +1177,107 @@ def test_request_rejects_header_injection(
with pytest.raises(ValueError):
make_request("get", self.valid_url, headers, None)
+ @pytest.mark.parametrize(
+ "client_kwargs,expected_connect_timeout,expected_timeout",
+ [
+ ({}, 30, 80),
+ ({"connect_timeout": 5, "timeout": 10}, 5, 10),
+ ({"connect_timeout": 5}, 5, 80),
+ ({"timeout": 10}, 30, 10),
+ ],
+ )
+ def test_timeout(
+ self,
+ mocked_request_lib,
+ mock_response,
+ make_request,
+ client_kwargs,
+ expected_connect_timeout,
+ expected_timeout,
+ ):
+ mock_response(mocked_request_lib, '{"foo": "baz"}', 200)
+ make_request(
+ "GET", self.valid_url, {}, None, client_kwargs=client_kwargs
+ )
+
+ curl_mock = mocked_request_lib.Curl()
+ curl_mock.setopt.assert_any_call(
+ mocked_request_lib.CONNECTTIMEOUT, expected_connect_timeout
+ )
+ curl_mock.setopt.assert_any_call(
+ mocked_request_lib.TIMEOUT, expected_timeout
+ )
+
+ def test_timeout_stream(
+ self, mocked_request_lib, mock_response, make_streamed_request
+ ):
+ mock_response(mocked_request_lib, "some streamed content", 200)
+ make_streamed_request(
+ "GET",
+ self.valid_url,
+ {},
+ None,
+ client_kwargs={"connect_timeout": 5, "timeout": 10},
+ )
+
+ curl_mock = mocked_request_lib.Curl()
+ curl_mock.setopt.assert_any_call(mocked_request_lib.CONNECTTIMEOUT, 5)
+ curl_mock.setopt.assert_any_call(mocked_request_lib.TIMEOUT, 10)
+
+ def test_timeout_reapplied_after_reset(
+ self, mocked_request_lib, mock_response, make_client
+ ):
+ mock_response(mocked_request_lib, '{"foo": "baz"}', 200)
+ client = make_client(connect_timeout=5, timeout=10)
+
+ client.request("get", self.valid_url, {})
+ client.request("get", self.valid_url, {})
+
+ curl_mock = mocked_request_lib.Curl()
+ # reset() clears every option, so each request must set the
+ # timeouts again after its own reset() call.
+ relevant_calls = [
+ c
+ for c in curl_mock.mock_calls
+ if c == call.reset()
+ or (
+ c[0] == "setopt"
+ and c[1][0]
+ in (
+ mocked_request_lib.CONNECTTIMEOUT,
+ mocked_request_lib.TIMEOUT,
+ )
+ )
+ ]
+ assert (
+ relevant_calls
+ == [
+ call.reset(),
+ call.setopt(mocked_request_lib.CONNECTTIMEOUT, 5),
+ call.setopt(mocked_request_lib.TIMEOUT, 10),
+ ]
+ * 2
+ )
+
+ def test_positional_args(self, mocked_request_lib):
+ client = self.REQUEST_CLIENT(False, None, None, mocked_request_lib)
+
+ assert client.pycurl is mocked_request_lib
+ assert client._verify_ssl_certs is False
+ assert client._connect_timeout == 30
+ assert client._timeout == 80
+
+ # Timeouts are keyword-only so they can't be confused with each
+ # other or with the existing positional parameters.
+ with pytest.raises(TypeError):
+ self.REQUEST_CLIENT(
+ False,
+ None,
+ None,
+ mocked_request_lib,
+ 10, # pyright: ignore[reportGeneralTypeIssues]
+ )
+
@pytest.fixture
def created_curls(self, mocked_request_lib):
curls: List[Mock] = []
@@ -1323,7 +1434,7 @@ class TestHTTPXClient(ClientTestBase):
@pytest.fixture
def request_mock(self, mocked_request_lib):
- # Set up the httpx library mock structure
+ # Set up the httpx2 library mock structure
async_client_instance = Mock()
sync_client_instance = Mock()
@@ -1395,9 +1506,8 @@ def _check_call(
args = (method, url)
kwargs = {
"headers": headers,
- "data": post_data or {},
+ "content": post_data or None,
"timeout": timeout,
- "proxies": {"http": "http://slap/", "https": "http://slap/"},
}
if is_streaming:
@@ -1424,9 +1534,8 @@ def _check_call_async(
args = (method, url)
kwargs = {
"headers": headers,
- "data": post_data,
+ "content": post_data or None,
"timeout": timeout,
- "proxies": {"http": "http://slap/", "https": "http://slap/"},
}
if is_streaming:
@@ -1731,6 +1840,62 @@ def test_timeout_async(self):
pass
+class TestHTTPXClientTimeout:
+ @pytest.fixture(params=["httpx2", "httpx"])
+ def lib(self, request):
+ return importlib.import_module(request.param)
+
+ @pytest.fixture
+ def other_lib(self, lib):
+ name = "httpx" if lib.__name__ == "httpx2" else "httpx2"
+ return importlib.import_module(name)
+
+ @pytest.mark.parametrize("timeout", [None, 5, 2.5, 80])
+ def test_numeric_timeout_is_unchanged(self, lib, timeout):
+ client = HTTPXClient(timeout=timeout, _lib=lib)
+
+ assert client._timeout == timeout
+
+ def test_timeout_from_same_lib_is_unchanged(self, lib):
+ timeout = lib.Timeout(30.0, connect=5.0)
+
+ client = HTTPXClient(timeout=timeout, _lib=lib)
+
+ assert client._timeout is timeout
+
+ def test_timeout_from_other_lib_is_converted(self, lib, other_lib):
+ timeout = other_lib.Timeout(30.0, connect=5.0, read=10.0)
+
+ client = HTTPXClient(timeout=timeout, _lib=lib)
+
+ assert isinstance(client._timeout, lib.Timeout)
+ assert client._timeout == lib.Timeout(30.0, connect=5.0, read=10.0)
+
+ @pytest.mark.anyio
+ async def test_converted_timeout_is_accepted_by_request(
+ self, lib, other_lib
+ ):
+ seen = {}
+
+ def handler(request):
+ seen.update(request.extensions["timeout"])
+ return lib.Response(200, request=request, content=b"{}")
+
+ client = HTTPXClient(
+ timeout=other_lib.Timeout(5.0, read=1.0), _lib=lib
+ )
+ client._client_async = lib.AsyncClient(
+ transport=lib.MockTransport(handler)
+ )
+
+ _, status, _ = await client.request_async(
+ "get", "https://api.stripe.com/", {}, None
+ )
+
+ assert status == 200
+ assert seen == {"connect": 5.0, "read": 1.0, "write": 5.0, "pool": 5.0}
+
+
class TestAIOHTTPClient(ClientTestBase):
REQUEST_CLIENT: Type[_http_client.AIOHTTPClient] = (
_http_client.AIOHTTPClient
@@ -2142,7 +2307,7 @@ class TestLiveHTTPClients:
@pytest.mark.anyio
async def test_httpx_request_async_https(self):
"""
- Test to ensure that httpx https calls succeed by making a live test call
+ Test to ensure that httpx2 https calls succeed by making a live test call
to the public stripe API.
"""
method = "get"
diff --git a/tests/test_integration.py b/tests/test_integration.py
index 9572ff127..05d3b8534 100644
--- a/tests/test_integration.py
+++ b/tests/test_integration.py
@@ -1,3 +1,4 @@
+import importlib
import platform
from threading import Thread, Lock
import json
@@ -5,7 +6,7 @@
import warnings
import time
-import httpx
+import httpx2
import aiohttp
import sys
import stripe
@@ -227,6 +228,49 @@ class MockServerRequestHandler(MyTestHandler):
assert MockServerRequestHandler.num_requests == 1
+ # TODO: (DEVSDK-3427) drop the httpx param in the next major version.
+ @pytest.fixture(params=["httpx2", "httpx"])
+ def httpx_lib(self, request):
+ return importlib.import_module(request.param)
+
+ def test_hits_proxy_through_httpx_client(self, httpx_lib):
+ class MockServerRequestHandler(MyTestHandler):
+ pass
+
+ self.setup_mock_server(MockServerRequestHandler)
+
+ client = stripe.StripeClient(
+ "sk_test_123",
+ http_client=stripe.HTTPXClient(
+ proxy=f"http://{MOCK_HOST}:{self.mock_server_port}",
+ allow_sync_methods=True,
+ _lib=httpx_lib,
+ ),
+ base_addresses={"api": f"http://{MOCK_HOST}:12111"},
+ )
+ client.balance.retrieve()
+
+ assert MockServerRequestHandler.num_requests == 1
+
+ @pytest.mark.anyio
+ async def test_hits_proxy_through_httpx_client_async(self, httpx_lib):
+ class MockServerRequestHandler(MyTestHandler):
+ pass
+
+ self.setup_mock_server(MockServerRequestHandler)
+
+ client = stripe.StripeClient(
+ "sk_test_123",
+ http_client=stripe.HTTPXClient(
+ proxy=f"http://{MOCK_HOST}:{self.mock_server_port}",
+ _lib=httpx_lib,
+ ),
+ base_addresses={"api": f"http://{MOCK_HOST}:12111"},
+ )
+ await client.balance.retrieve_async()
+
+ assert MockServerRequestHandler.num_requests == 1
+
def test_passes_client_telemetry_when_enabled(self):
class MockServerRequestHandler(MyTestHandler):
def do_request(self, req_num):
@@ -420,7 +464,7 @@ def do_request(self, n):
expected_message = ""
if isinstance(hc, stripe.HTTPXClient):
- hc._timeout = httpx.Timeout(None, read=0.01)
+ hc._timeout = httpx2.Timeout(None, read=0.01)
expected_message = "A ReadTimeout was raised"
elif isinstance(hc, stripe.AIOHTTPClient):
hc._timeout = aiohttp.ClientTimeout(sock_read=0.01)