diff --git a/CHANGELOG.md b/CHANGELOG.md
index 54fab92f4..c36e9195e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -20,16 +20,29 @@
* Add support for `mobilepay` on enum `stripe.checkout.Session.CreateParams.payment_method_types`
* Add support for `other` on enums `stripe.issuing.Authorization.CaptureParamsPurchaseDetailsFuel.unit`, `stripe.issuing.Transaction.CreateForceCaptureParamsPurchaseDetailsFuel.unit`, and `stripe.issuing.Transaction.CreateUnlinkedRefundParamsPurchaseDetailsFuel.unit`
+## 9.3.0 - 2024-04-18
+* [#1305](https://github.com/stripe/stripe-python/pull/1305) Update generated code
+ * Add support for `allow_redisplay` on parameter classes `stripe.ConfirmationToken.CreateParamsPaymentMethodData`, `stripe.Customer.ListPaymentMethodsParams`, `stripe.PaymentIntent.ConfirmParamsPaymentMethodData`, `stripe.PaymentIntent.CreateParamsPaymentMethodData`, `stripe.PaymentIntent.ModifyParamsPaymentMethodData`, `stripe.PaymentMethod.CreateParams`, `stripe.PaymentMethod.ModifyParams`, `stripe.SetupIntent.ConfirmParamsPaymentMethodData`, `stripe.SetupIntent.CreateParamsPaymentMethodData`, and `stripe.SetupIntent.ModifyParamsPaymentMethodData`
+ * Add support for `schedule_details` on parameter classes `stripe.Invoice.UpcomingLinesParams` and `stripe.Invoice.UpcomingParams`
+ * Add support for `subscription_details` on parameter classes `stripe.Invoice.UpcomingLinesParams` and `stripe.Invoice.UpcomingParams`
+ * Add support for `create_preview` on resource `stripe.Invoice`
+ * Add support for `payment_method_data` on parameter class `stripe.checkout.Session.CreateParams`
+ * Add support for `saved_payment_method_options` on parameter class `stripe.checkout.Session.CreateParams` and resource `stripe.checkout.Session`
+ * Add support for `mobilepay` on parameter class `stripe.checkout.Session.CreateParamsPaymentMethodOptions` and resource class `stripe.checkout.Session.PaymentMethodOptions`
+ * Add support for `mobilepay` on enum `stripe.checkout.Session.CreateParams.payment_method_types`
+ * Add support for `other` on enums `stripe.issuing.Authorization.CaptureParamsPurchaseDetailsFuel.unit`, `stripe.issuing.Transaction.CreateForceCaptureParamsPurchaseDetailsFuel.unit`, and `stripe.issuing.Transaction.CreateUnlinkedRefundParamsPurchaseDetailsFuel.unit`
+* [#1306](https://github.com/stripe/stripe-python/pull/1306) Update `Quote.pdf()` to use the right base address i.e. files.stripe.com instead of api.stripe.com. Fixes [#1303](https://github.com/stripe/stripe-python/issues/1303)
+
## 9.2.0 - 2024-04-16
* [#1301](https://github.com/stripe/stripe-python/pull/1301) Update generated code
- * Add support for `balances` on resource class `stripe.AccountSession.Components` and parameter class `stripe.AccountSession.CreateParamsComponents`
- * Add support for `payouts_list` on resource class `stripe.AccountSession.Components` and parameter class `stripe.AccountSession.CreateParamsComponents`
- * Add support for `capture_method` on parameter classes `stripe.PaymentIntent.ConfirmParamsPaymentMethodOptionsRevolutPay`, `stripe.PaymentIntent.CreateParamsPaymentMethodOptionsRevolutPay`, and `stripe.PaymentIntent.ModifyParamsPaymentMethodOptionsRevolutPay` and resource class `stripe.PaymentIntent.PaymentMethodOptions.RevolutPay`
- * Add support for `swish` on parameter classes `stripe.PaymentMethodConfiguration.CreateParams` and `stripe.PaymentMethodConfiguration.ModifyParams` and resource `stripe.PaymentMethodConfiguration`
- * Add support for resource `stripe.entitlements.ActiveEntitlementSummary`
- * Remove support for `config` on parameter class `stripe.forwarding.Request.CreateParams` and resource `stripe.forwarding.Request`. This field is no longer used by the Forwarding Request API.
- * Change type of fields `stripe.AccountSession.Components.PaymentDetails.Features` and `stripe.AccountSession.Components.Payments.Features` from `Optional[bool]` to `bool` of `destination_on_behalf_of_charge_management`
- * Change type of field `stripe.billing.MeterEvent.CreateParams` from `int` to `NotRequired[int]` of `timestamp`
+ * Add support for `balances` on resource class `stripe.AccountSession.Components` and parameter class `stripe.AccountSession.CreateParamsComponents`
+ * Add support for `payouts_list` on resource class `stripe.AccountSession.Components` and parameter class `stripe.AccountSession.CreateParamsComponents`
+ * Add support for `capture_method` on parameter classes `stripe.PaymentIntent.ConfirmParamsPaymentMethodOptionsRevolutPay`, `stripe.PaymentIntent.CreateParamsPaymentMethodOptionsRevolutPay`, and `stripe.PaymentIntent.ModifyParamsPaymentMethodOptionsRevolutPay` and resource class `stripe.PaymentIntent.PaymentMethodOptions.RevolutPay`
+ * Add support for `swish` on parameter classes `stripe.PaymentMethodConfiguration.CreateParams` and `stripe.PaymentMethodConfiguration.ModifyParams` and resource `stripe.PaymentMethodConfiguration`
+ * Add support for resource `stripe.entitlements.ActiveEntitlementSummary`
+ * Remove support for `config` on parameter class `stripe.forwarding.Request.CreateParams` and resource `stripe.forwarding.Request`. This field is no longer used by the Forwarding Request API.
+ * Change type of fields `stripe.AccountSession.Components.PaymentDetails.Features` and `stripe.AccountSession.Components.Payments.Features` from `Optional[bool]` to `bool` of `destination_on_behalf_of_charge_management`
+ * Change type of field `stripe.billing.MeterEvent.CreateParams` from `int` to `NotRequired[int]` of `timestamp`
* Add support for `entitlements.active_entitlement_summary.updated` on enums `stripe.Event.type`, `stripe.WebhookEndpoint.CreateParams.enabled_events`, and `stripe.WebhookEndpoint.ModifyParams.enabled_events`
## 9.2.0b1 - 2024-04-11
diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION
index e0b273508..6eb80deb2 100644
--- a/OPENAPI_VERSION
+++ b/OPENAPI_VERSION
@@ -1 +1 @@
-v972
\ No newline at end of file
+v992
\ No newline at end of file
diff --git a/stripe/_account.py b/stripe/_account.py
index d831b8e32..806a2728d 100644
--- a/stripe/_account.py
+++ b/stripe/_account.py
@@ -45,9 +45,14 @@ class Account(
properties on the account like its current requirements or if the account is
enabled to make live charges or receive payouts.
- For Custom accounts, the properties below are always returned. For other accounts, some properties are returned until that
- account has started to go through Connect Onboarding. Once you create an [Account Link](https://stripe.com/docs/api/account_links) or [Account Session](https://stripe.com/docs/api/account_sessions),
- some properties are only returned for Custom accounts. Learn about the differences [between accounts](https://stripe.com/docs/connect/accounts).
+ For accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection)
+ is `application`, which includes Custom accounts, the properties below are always
+ returned.
+
+ For accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection)
+ is `stripe`, which includes Standard and Express accounts, some properties are only returned
+ until you create an [Account Link](https://stripe.com/api/account_links) or [Account Session](https://stripe.com/api/account_sessions)
+ to start Connect Onboarding. Learn about the [differences between accounts](https://stripe.com/connect/accounts).
"""
OBJECT_NAME: ClassVar[Literal["account"]] = "account"
@@ -598,7 +603,7 @@ class Fees(StripeObject):
"application_unified_accounts_beta",
]
"""
- A value indicating the responsible payer of a bundle of Stripe fees for pricing-control eligible products on this account.
+ A value indicating the responsible payer of a bundle of Stripe fees for pricing-control eligible products on this account. Learn more about [fee behavior on connected accounts](https://docs.stripe.com/connect/direct-charges-fee-payer-behavior).
"""
class Losses(StripeObject):
@@ -1077,7 +1082,7 @@ class Schedule(StripeObject):
debit_negative_balances: bool
"""
- A Boolean indicating if Stripe should try to reclaim negative balances from an attached bank account. See our [Understanding Connect Account Balances](https://stripe.com/docs/connect/account-balances) documentation for details. Default value is `false` for Custom accounts, otherwise `true`.
+ A Boolean indicating if Stripe should try to reclaim negative balances from an attached bank account. See [Understanding Connect account balances](https://stripe.com/connect/account-balances) for details. The default value is `false` when [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts, otherwise `true`.
"""
schedule: Schedule
statement_descriptor: Optional[str]
@@ -1252,15 +1257,22 @@ class CreateParams(RequestOptions):
Literal["company", "government_entity", "individual", "non_profit"]
]
"""
- The business type. Once you create an [Account Link](https://docs.stripe.com/api/account_links) or [Account Session](https://docs.stripe.com/api/account_sessions), this property can only be updated for Custom accounts.
+ The business type. Once you create an [Account Link](https://stripe.com/api/account_links) or [Account Session](https://stripe.com/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.
"""
capabilities: NotRequired["Account.CreateParamsCapabilities"]
"""
- Each key of the dictionary represents a capability, and each capability maps to its settings (e.g. whether it has been requested or not). Each capability will be inactive until you have provided its specific requirements and Stripe has verified them. An account may have some of its requested capabilities be active and some be inactive.
+ Each key of the dictionary represents a capability, and each capability
+ maps to its settings (for example, whether it has been requested or not). Each
+ capability is inactive until you have provided its specific
+ requirements and Stripe has verified them. An account might have some
+ of its requested capabilities be active and some be inactive.
+
+ Required when [account.controller.stripe_dashboard.type](https://stripe.com/api/accounts/create#create_account-controller-dashboard-type)
+ is `none`, which includes Custom accounts.
"""
company: NotRequired["Account.CreateParamsCompany"]
"""
- Information about the company or business. This field is available for any `business_type`. Once you create an [Account Link](https://docs.stripe.com/api/account_links) or [Account Session](https://docs.stripe.com/api/account_sessions), this property can only be updated for Custom accounts.
+ Information about the company or business. This field is available for any `business_type`. Once you create an [Account Link](https://stripe.com/api/account_links) or [Account Session](https://stripe.com/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.
"""
controller: NotRequired["Account.CreateParamsController"]
"""
@@ -1280,7 +1292,7 @@ class CreateParams(RequestOptions):
"""
email: NotRequired[str]
"""
- The email address of the account holder. This is only to make the account easier to identify to you. Stripe only emails Custom accounts with your consent.
+ The email address of the account holder. This is only to make the account easier to identify to you. If [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts, Stripe doesn't email the account without your consent.
"""
expand: NotRequired[List[str]]
"""
@@ -1290,13 +1302,13 @@ class CreateParams(RequestOptions):
"str|Account.CreateParamsBankAccount|Account.CreateParamsCard|Account.CreateParamsCardToken"
]
"""
- A card or bank account to attach to the account for receiving [payouts](https://docs.stripe.com/connect/bank-debit-card-payouts) (you won't be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](https://docs.stripe.com/js), or a dictionary, as documented in the `external_account` parameter for [bank account](https://docs.stripe.com/api#account_create_bank_account) creation.
+ A card or bank account to attach to the account for receiving [payouts](https://stripe.com/connect/bank-debit-card-payouts) (you won't be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/js), or a dictionary, as documented in the `external_account` parameter for [bank account](https://stripe.com/api#account_create_bank_account) creation.
- By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the [bank account](https://docs.stripe.com/api#account_create_bank_account) or [card creation](https://docs.stripe.com/api#account_create_card) APIs. After you create an [Account Link](https://docs.stripe.com/api/account_links) or [Account Session](https://docs.stripe.com/api/account_sessions), this property can only be updated for Custom accounts.
+ By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the [bank account](https://stripe.com/api#account_create_bank_account) or [card creation](https://stripe.com/api#account_create_card) APIs. After you create an [Account Link](https://stripe.com/api/account_links) or [Account Session](https://stripe.com/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.
"""
individual: NotRequired["Account.CreateParamsIndividual"]
"""
- Information about the person represented by the account. This field is null unless `business_type` is set to `individual`. Once you create an [Account Link](https://docs.stripe.com/api/account_links) or [Account Session](https://docs.stripe.com/api/account_sessions), this property can only be updated for Custom accounts.
+ Information about the person represented by the account. This field is null unless `business_type` is set to `individual`. Once you create an [Account Link](https://stripe.com/api/account_links) or [Account Session](https://stripe.com/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.
"""
metadata: NotRequired["Literal['']|Dict[str, str]"]
"""
@@ -1312,7 +1324,7 @@ class CreateParams(RequestOptions):
"""
tos_acceptance: NotRequired["Account.CreateParamsTosAcceptance"]
"""
- Details on the account's acceptance of the [Stripe Services Agreement](https://docs.stripe.com/connect/updating-accounts#tos-acceptance) This property can only be updated for Custom accounts.
+ Details on the account's acceptance of the [Stripe Services Agreement](https://stripe.com/connect/updating-accounts#tos-acceptance). This property can only be updated for accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.
"""
type: NotRequired[Literal["custom", "express", "standard"]]
"""
@@ -2238,7 +2250,7 @@ class CreateParamsControllerDashboard(TypedDict):
class CreateParamsControllerFees(TypedDict):
payer: NotRequired[Literal["account", "application"]]
"""
- A value indicating the responsible payer of Stripe fees on this account. Defaults to `account`.
+ A value indicating the responsible payer of Stripe fees on this account. Defaults to `account`. Learn more about [fee behavior on connected accounts](https://docs.stripe.com/connect/direct-charges-fee-payer-behavior).
"""
class CreateParamsControllerLosses(TypedDict):
@@ -3880,7 +3892,7 @@ class RetrievePersonParams(RequestOptions):
Literal["company", "government_entity", "individual", "non_profit"]
]
"""
- The business type. Once you create an [Account Link](https://stripe.com/docs/api/account_links) or [Account Session](https://stripe.com/docs/api/account_sessions), this property is only returned for Custom accounts.
+ The business type. After you create an [Account Link](https://stripe.com/api/account_links) or [Account Session](https://stripe.com/api/account_sessions), this property is only returned for accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.
"""
capabilities: Optional[Capabilities]
charges_enabled: Optional[bool]
@@ -3903,7 +3915,7 @@ class RetrievePersonParams(RequestOptions):
"""
details_submitted: Optional[bool]
"""
- Whether account details have been submitted. Standard accounts cannot receive payouts before this is true.
+ Whether account details have been submitted. Accounts with Stripe Dashboard access, which includes Standard accounts, cannot receive payouts before this is true.
"""
email: Optional[str]
"""
@@ -3922,10 +3934,9 @@ class RetrievePersonParams(RequestOptions):
"""
This is an object representing a person associated with a Stripe account.
- A platform cannot access a Standard or Express account's persons after the account starts onboarding, such as after generating an account link for the account.
- See the [Standard onboarding](https://stripe.com/docs/connect/standard-accounts) or [Express onboarding documentation](https://stripe.com/docs/connect/express-accounts) for information about platform prefilling and account onboarding steps.
+ A platform cannot access a person for an account where [account.controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `stripe`, which includes Standard and Express accounts, after creating an Account Link or Account Session to start Connect onboarding.
- Related guide: [Handling identity verification with the API](https://stripe.com/docs/connect/handling-api-verification#person-information)
+ See the [Standard onboarding](https://stripe.com/connect/standard-accounts) or [Express onboarding](https://stripe.com/connect/express-accounts) documentation for information about prefilling information and account onboarding steps. Learn more about [handling identity verification with the API](https://stripe.com/connect/handling-api-verification#person-information).
"""
metadata: Optional[Dict[str, str]]
"""
@@ -3948,7 +3959,7 @@ class RetrievePersonParams(RequestOptions):
tos_acceptance: Optional[TosAcceptance]
type: Optional[Literal["custom", "express", "none", "standard"]]
"""
- The Stripe account type. Can be `standard`, `express`, or `custom`.
+ The Stripe account type. Can be `standard`, `express`, `custom`, or `none`.
"""
deleted: Optional[Literal[True]]
"""
@@ -4000,9 +4011,11 @@ def _cls_delete(
cls, sid: str, **params: Unpack["Account.DeleteParams"]
) -> "Account":
"""
- With [Connect](https://stripe.com/docs/connect), you can delete accounts you manage.
+ With [Connect](https://stripe.com/connect), you can delete accounts you manage.
+
+ Test-mode accounts can be deleted at any time.
- Accounts created using test-mode keys can be deleted at any time. Standard accounts created using live-mode keys cannot be deleted. Custom or Express accounts created using live-mode keys can only be deleted once all balances are zero.
+ Live-mode accounts where Stripe is responsible for negative account balances cannot be deleted, which includes Standard accounts. Live-mode accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be deleted when all [balances](https://stripe.com/api/balance/balanace_object) are zero.
If you want to delete your own account, use the [account information tab in your account settings](https://dashboard.stripe.com/settings/account) instead.
"""
@@ -4022,9 +4035,11 @@ def delete(
sid: str, **params: Unpack["Account.DeleteParams"]
) -> "Account":
"""
- With [Connect](https://stripe.com/docs/connect), you can delete accounts you manage.
+ With [Connect](https://stripe.com/connect), you can delete accounts you manage.
+
+ Test-mode accounts can be deleted at any time.
- Accounts created using test-mode keys can be deleted at any time. Standard accounts created using live-mode keys cannot be deleted. Custom or Express accounts created using live-mode keys can only be deleted once all balances are zero.
+ Live-mode accounts where Stripe is responsible for negative account balances cannot be deleted, which includes Standard accounts. Live-mode accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be deleted when all [balances](https://stripe.com/api/balance/balanace_object) are zero.
If you want to delete your own account, use the [account information tab in your account settings](https://dashboard.stripe.com/settings/account) instead.
"""
@@ -4033,9 +4048,11 @@ def delete(
@overload
def delete(self, **params: Unpack["Account.DeleteParams"]) -> "Account":
"""
- With [Connect](https://stripe.com/docs/connect), you can delete accounts you manage.
+ With [Connect](https://stripe.com/connect), you can delete accounts you manage.
- Accounts created using test-mode keys can be deleted at any time. Standard accounts created using live-mode keys cannot be deleted. Custom or Express accounts created using live-mode keys can only be deleted once all balances are zero.
+ Test-mode accounts can be deleted at any time.
+
+ Live-mode accounts where Stripe is responsible for negative account balances cannot be deleted, which includes Standard accounts. Live-mode accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be deleted when all [balances](https://stripe.com/api/balance/balanace_object) are zero.
If you want to delete your own account, use the [account information tab in your account settings](https://dashboard.stripe.com/settings/account) instead.
"""
@@ -4046,9 +4063,11 @@ def delete( # pyright: ignore[reportGeneralTypeIssues]
self, **params: Unpack["Account.DeleteParams"]
) -> "Account":
"""
- With [Connect](https://stripe.com/docs/connect), you can delete accounts you manage.
+ With [Connect](https://stripe.com/connect), you can delete accounts you manage.
+
+ Test-mode accounts can be deleted at any time.
- Accounts created using test-mode keys can be deleted at any time. Standard accounts created using live-mode keys cannot be deleted. Custom or Express accounts created using live-mode keys can only be deleted once all balances are zero.
+ Live-mode accounts where Stripe is responsible for negative account balances cannot be deleted, which includes Standard accounts. Live-mode accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be deleted when all [balances](https://stripe.com/api/balance/balanace_object) are zero.
If you want to delete your own account, use the [account information tab in your account settings](https://dashboard.stripe.com/settings/account) instead.
"""
@@ -4063,9 +4082,11 @@ async def _cls_delete_async(
cls, sid: str, **params: Unpack["Account.DeleteParams"]
) -> "Account":
"""
- With [Connect](https://stripe.com/docs/connect), you can delete accounts you manage.
+ With [Connect](https://stripe.com/connect), you can delete accounts you manage.
+
+ Test-mode accounts can be deleted at any time.
- Accounts created using test-mode keys can be deleted at any time. Standard accounts created using live-mode keys cannot be deleted. Custom or Express accounts created using live-mode keys can only be deleted once all balances are zero.
+ Live-mode accounts where Stripe is responsible for negative account balances cannot be deleted, which includes Standard accounts. Live-mode accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be deleted when all [balances](https://stripe.com/api/balance/balanace_object) are zero.
If you want to delete your own account, use the [account information tab in your account settings](https://dashboard.stripe.com/settings/account) instead.
"""
@@ -4085,9 +4106,11 @@ async def delete_async(
sid: str, **params: Unpack["Account.DeleteParams"]
) -> "Account":
"""
- With [Connect](https://stripe.com/docs/connect), you can delete accounts you manage.
+ With [Connect](https://stripe.com/connect), you can delete accounts you manage.
- Accounts created using test-mode keys can be deleted at any time. Standard accounts created using live-mode keys cannot be deleted. Custom or Express accounts created using live-mode keys can only be deleted once all balances are zero.
+ Test-mode accounts can be deleted at any time.
+
+ Live-mode accounts where Stripe is responsible for negative account balances cannot be deleted, which includes Standard accounts. Live-mode accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be deleted when all [balances](https://stripe.com/api/balance/balanace_object) are zero.
If you want to delete your own account, use the [account information tab in your account settings](https://dashboard.stripe.com/settings/account) instead.
"""
@@ -4098,9 +4121,11 @@ async def delete_async(
self, **params: Unpack["Account.DeleteParams"]
) -> "Account":
"""
- With [Connect](https://stripe.com/docs/connect), you can delete accounts you manage.
+ With [Connect](https://stripe.com/connect), you can delete accounts you manage.
+
+ Test-mode accounts can be deleted at any time.
- Accounts created using test-mode keys can be deleted at any time. Standard accounts created using live-mode keys cannot be deleted. Custom or Express accounts created using live-mode keys can only be deleted once all balances are zero.
+ Live-mode accounts where Stripe is responsible for negative account balances cannot be deleted, which includes Standard accounts. Live-mode accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be deleted when all [balances](https://stripe.com/api/balance/balanace_object) are zero.
If you want to delete your own account, use the [account information tab in your account settings](https://dashboard.stripe.com/settings/account) instead.
"""
@@ -4111,9 +4136,11 @@ async def delete_async( # pyright: ignore[reportGeneralTypeIssues]
self, **params: Unpack["Account.DeleteParams"]
) -> "Account":
"""
- With [Connect](https://stripe.com/docs/connect), you can delete accounts you manage.
+ With [Connect](https://stripe.com/connect), you can delete accounts you manage.
+
+ Test-mode accounts can be deleted at any time.
- Accounts created using test-mode keys can be deleted at any time. Standard accounts created using live-mode keys cannot be deleted. Custom or Express accounts created using live-mode keys can only be deleted once all balances are zero.
+ Live-mode accounts where Stripe is responsible for negative account balances cannot be deleted, which includes Standard accounts. Live-mode accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be deleted when all [balances](https://stripe.com/api/balance/balanace_object) are zero.
If you want to delete your own account, use the [account information tab in your account settings](https://dashboard.stripe.com/settings/account) instead.
"""
@@ -4280,9 +4307,9 @@ def _cls_reject(
cls, account: str, **params: Unpack["Account.RejectParams"]
) -> "Account":
"""
- With [Connect](https://stripe.com/docs/connect), you may flag accounts as suspicious.
+ With [Connect](https://stripe.com/connect), you can reject accounts that you have flagged as suspicious.
- Test-mode Custom and Express accounts can be rejected at any time. Accounts created using live-mode keys may only be rejected once all balances are zero.
+ Only accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be rejected. Test-mode accounts can be rejected at any time. Live-mode accounts can only be rejected after all balances are zero.
"""
return cast(
"Account",
@@ -4301,18 +4328,18 @@ def reject(
account: str, **params: Unpack["Account.RejectParams"]
) -> "Account":
"""
- With [Connect](https://stripe.com/docs/connect), you may flag accounts as suspicious.
+ With [Connect](https://stripe.com/connect), you can reject accounts that you have flagged as suspicious.
- Test-mode Custom and Express accounts can be rejected at any time. Accounts created using live-mode keys may only be rejected once all balances are zero.
+ Only accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be rejected. Test-mode accounts can be rejected at any time. Live-mode accounts can only be rejected after all balances are zero.
"""
...
@overload
def reject(self, **params: Unpack["Account.RejectParams"]) -> "Account":
"""
- With [Connect](https://stripe.com/docs/connect), you may flag accounts as suspicious.
+ With [Connect](https://stripe.com/connect), you can reject accounts that you have flagged as suspicious.
- Test-mode Custom and Express accounts can be rejected at any time. Accounts created using live-mode keys may only be rejected once all balances are zero.
+ Only accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be rejected. Test-mode accounts can be rejected at any time. Live-mode accounts can only be rejected after all balances are zero.
"""
...
@@ -4321,9 +4348,9 @@ def reject( # pyright: ignore[reportGeneralTypeIssues]
self, **params: Unpack["Account.RejectParams"]
) -> "Account":
"""
- With [Connect](https://stripe.com/docs/connect), you may flag accounts as suspicious.
+ With [Connect](https://stripe.com/connect), you can reject accounts that you have flagged as suspicious.
- Test-mode Custom and Express accounts can be rejected at any time. Accounts created using live-mode keys may only be rejected once all balances are zero.
+ Only accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be rejected. Test-mode accounts can be rejected at any time. Live-mode accounts can only be rejected after all balances are zero.
"""
return cast(
"Account",
@@ -4341,9 +4368,9 @@ async def _cls_reject_async(
cls, account: str, **params: Unpack["Account.RejectParams"]
) -> "Account":
"""
- With [Connect](https://stripe.com/docs/connect), you may flag accounts as suspicious.
+ With [Connect](https://stripe.com/connect), you can reject accounts that you have flagged as suspicious.
- Test-mode Custom and Express accounts can be rejected at any time. Accounts created using live-mode keys may only be rejected once all balances are zero.
+ Only accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be rejected. Test-mode accounts can be rejected at any time. Live-mode accounts can only be rejected after all balances are zero.
"""
return cast(
"Account",
@@ -4362,9 +4389,9 @@ async def reject_async(
account: str, **params: Unpack["Account.RejectParams"]
) -> "Account":
"""
- With [Connect](https://stripe.com/docs/connect), you may flag accounts as suspicious.
+ With [Connect](https://stripe.com/connect), you can reject accounts that you have flagged as suspicious.
- Test-mode Custom and Express accounts can be rejected at any time. Accounts created using live-mode keys may only be rejected once all balances are zero.
+ Only accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be rejected. Test-mode accounts can be rejected at any time. Live-mode accounts can only be rejected after all balances are zero.
"""
...
@@ -4373,9 +4400,9 @@ async def reject_async(
self, **params: Unpack["Account.RejectParams"]
) -> "Account":
"""
- With [Connect](https://stripe.com/docs/connect), you may flag accounts as suspicious.
+ With [Connect](https://stripe.com/connect), you can reject accounts that you have flagged as suspicious.
- Test-mode Custom and Express accounts can be rejected at any time. Accounts created using live-mode keys may only be rejected once all balances are zero.
+ Only accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be rejected. Test-mode accounts can be rejected at any time. Live-mode accounts can only be rejected after all balances are zero.
"""
...
@@ -4384,9 +4411,9 @@ async def reject_async( # pyright: ignore[reportGeneralTypeIssues]
self, **params: Unpack["Account.RejectParams"]
) -> "Account":
"""
- With [Connect](https://stripe.com/docs/connect), you may flag accounts as suspicious.
+ With [Connect](https://stripe.com/connect), you can reject accounts that you have flagged as suspicious.
- Test-mode Custom and Express accounts can be rejected at any time. Accounts created using live-mode keys may only be rejected once all balances are zero.
+ Only accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be rejected. Test-mode accounts can be rejected at any time. Live-mode accounts can only be rejected after all balances are zero.
"""
return cast(
"Account",
@@ -4663,9 +4690,14 @@ def modify_external_account(
**params: Unpack["Account.ModifyExternalAccountParams"]
) -> Union["BankAccount", "Card"]:
"""
- Updates the metadata, account holder name, account holder type of a bank account belonging to a [Custom account](https://stripe.com/docs/connect/custom-accounts), and optionally sets it as the default for its currency. Other bank account details are not editable by design.
+ Updates the metadata, account holder name, account holder type of a bank account belonging to
+ a connected account and optionally sets it as the default for its currency. Other bank account
+ details are not editable by design.
- You can re-enable a disabled bank account by performing an update call without providing any arguments or changes.
+ You can only update bank accounts when [account.controller.requirement_collection is application, which includes Custom accounts](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection).
+
+ You can re-enable a disabled bank account by performing an update call without providing any
+ arguments or changes.
"""
return cast(
Union["BankAccount", "Card"],
@@ -4686,9 +4718,14 @@ async def modify_external_account_async(
**params: Unpack["Account.ModifyExternalAccountParams"]
) -> Union["BankAccount", "Card"]:
"""
- Updates the metadata, account holder name, account holder type of a bank account belonging to a [Custom account](https://stripe.com/docs/connect/custom-accounts), and optionally sets it as the default for its currency. Other bank account details are not editable by design.
+ Updates the metadata, account holder name, account holder type of a bank account belonging to
+ a connected account and optionally sets it as the default for its currency. Other bank account
+ details are not editable by design.
+
+ You can only update bank accounts when [account.controller.requirement_collection is application, which includes Custom accounts](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection).
- You can re-enable a disabled bank account by performing an update call without providing any arguments or changes.
+ You can re-enable a disabled bank account by performing an update call without providing any
+ arguments or changes.
"""
return cast(
Union["BankAccount", "Card"],
@@ -4788,9 +4825,9 @@ def create_login_link(
cls, account: str, **params: Unpack["Account.CreateLoginLinkParams"]
) -> "LoginLink":
"""
- Creates a single-use login link for an Express account to access their Stripe dashboard.
+ Creates a single-use login link for a connected account to access the Express Dashboard.
- You may only create login links for [Express accounts](https://stripe.com/docs/connect/express-accounts) connected to your platform.
+ You can only create login links for accounts that use the [Express Dashboard](https://stripe.com/connect/express-dashboard) and are connected to your platform.
"""
return cast(
"LoginLink",
@@ -4808,9 +4845,9 @@ async def create_login_link_async(
cls, account: str, **params: Unpack["Account.CreateLoginLinkParams"]
) -> "LoginLink":
"""
- Creates a single-use login link for an Express account to access their Stripe dashboard.
+ Creates a single-use login link for a connected account to access the Express Dashboard.
- You may only create login links for [Express accounts](https://stripe.com/docs/connect/express-accounts) connected to your platform.
+ You can only create login links for accounts that use the [Express Dashboard](https://stripe.com/connect/express-dashboard) and are connected to your platform.
"""
return cast(
"LoginLink",
diff --git a/stripe/_account_external_account_service.py b/stripe/_account_external_account_service.py
index 139a4dab0..06a2b7e77 100644
--- a/stripe/_account_external_account_service.py
+++ b/stripe/_account_external_account_service.py
@@ -310,9 +310,14 @@ def update(
options: RequestOptions = {},
) -> Union[BankAccount, Card]:
"""
- Updates the metadata, account holder name, account holder type of a bank account belonging to a [Custom account](https://stripe.com/docs/connect/custom-accounts), and optionally sets it as the default for its currency. Other bank account details are not editable by design.
+ Updates the metadata, account holder name, account holder type of a bank account belonging to
+ a connected account and optionally sets it as the default for its currency. Other bank account
+ details are not editable by design.
- You can re-enable a disabled bank account by performing an update call without providing any arguments or changes.
+ You can only update bank accounts when [account.controller.requirement_collection is application, which includes Custom accounts](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection).
+
+ You can re-enable a disabled bank account by performing an update call without providing any
+ arguments or changes.
"""
return cast(
Union[BankAccount, Card],
@@ -337,9 +342,14 @@ async def update_async(
options: RequestOptions = {},
) -> Union[BankAccount, Card]:
"""
- Updates the metadata, account holder name, account holder type of a bank account belonging to a [Custom account](https://stripe.com/docs/connect/custom-accounts), and optionally sets it as the default for its currency. Other bank account details are not editable by design.
+ Updates the metadata, account holder name, account holder type of a bank account belonging to
+ a connected account and optionally sets it as the default for its currency. Other bank account
+ details are not editable by design.
+
+ You can only update bank accounts when [account.controller.requirement_collection is application, which includes Custom accounts](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection).
- You can re-enable a disabled bank account by performing an update call without providing any arguments or changes.
+ You can re-enable a disabled bank account by performing an update call without providing any
+ arguments or changes.
"""
return cast(
Union[BankAccount, Card],
diff --git a/stripe/_account_login_link_service.py b/stripe/_account_login_link_service.py
index 21a66ca38..d46d42165 100644
--- a/stripe/_account_login_link_service.py
+++ b/stripe/_account_login_link_service.py
@@ -22,9 +22,9 @@ def create(
options: RequestOptions = {},
) -> LoginLink:
"""
- Creates a single-use login link for an Express account to access their Stripe dashboard.
+ Creates a single-use login link for a connected account to access the Express Dashboard.
- You may only create login links for [Express accounts](https://stripe.com/docs/connect/express-accounts) connected to your platform.
+ You can only create login links for accounts that use the [Express Dashboard](https://stripe.com/connect/express-dashboard) and are connected to your platform.
"""
return cast(
LoginLink,
@@ -47,9 +47,9 @@ async def create_async(
options: RequestOptions = {},
) -> LoginLink:
"""
- Creates a single-use login link for an Express account to access their Stripe dashboard.
+ Creates a single-use login link for a connected account to access the Express Dashboard.
- You may only create login links for [Express accounts](https://stripe.com/docs/connect/express-accounts) connected to your platform.
+ You can only create login links for accounts that use the [Express Dashboard](https://stripe.com/connect/express-dashboard) and are connected to your platform.
"""
return cast(
LoginLink,
diff --git a/stripe/_account_service.py b/stripe/_account_service.py
index 1e1416693..4142cdca5 100644
--- a/stripe/_account_service.py
+++ b/stripe/_account_service.py
@@ -38,15 +38,22 @@ class CreateParams(TypedDict):
Literal["company", "government_entity", "individual", "non_profit"]
]
"""
- The business type. Once you create an [Account Link](https://docs.stripe.com/api/account_links) or [Account Session](https://docs.stripe.com/api/account_sessions), this property can only be updated for Custom accounts.
+ The business type. Once you create an [Account Link](https://stripe.com/api/account_links) or [Account Session](https://stripe.com/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.
"""
capabilities: NotRequired["AccountService.CreateParamsCapabilities"]
"""
- Each key of the dictionary represents a capability, and each capability maps to its settings (e.g. whether it has been requested or not). Each capability will be inactive until you have provided its specific requirements and Stripe has verified them. An account may have some of its requested capabilities be active and some be inactive.
+ Each key of the dictionary represents a capability, and each capability
+ maps to its settings (for example, whether it has been requested or not). Each
+ capability is inactive until you have provided its specific
+ requirements and Stripe has verified them. An account might have some
+ of its requested capabilities be active and some be inactive.
+
+ Required when [account.controller.stripe_dashboard.type](https://stripe.com/api/accounts/create#create_account-controller-dashboard-type)
+ is `none`, which includes Custom accounts.
"""
company: NotRequired["AccountService.CreateParamsCompany"]
"""
- Information about the company or business. This field is available for any `business_type`. Once you create an [Account Link](https://docs.stripe.com/api/account_links) or [Account Session](https://docs.stripe.com/api/account_sessions), this property can only be updated for Custom accounts.
+ Information about the company or business. This field is available for any `business_type`. Once you create an [Account Link](https://stripe.com/api/account_links) or [Account Session](https://stripe.com/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.
"""
controller: NotRequired["AccountService.CreateParamsController"]
"""
@@ -66,7 +73,7 @@ class CreateParams(TypedDict):
"""
email: NotRequired[str]
"""
- The email address of the account holder. This is only to make the account easier to identify to you. Stripe only emails Custom accounts with your consent.
+ The email address of the account holder. This is only to make the account easier to identify to you. If [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts, Stripe doesn't email the account without your consent.
"""
expand: NotRequired[List[str]]
"""
@@ -76,13 +83,13 @@ class CreateParams(TypedDict):
"str|AccountService.CreateParamsBankAccount|AccountService.CreateParamsCard|AccountService.CreateParamsCardToken"
]
"""
- A card or bank account to attach to the account for receiving [payouts](https://docs.stripe.com/connect/bank-debit-card-payouts) (you won't be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](https://docs.stripe.com/js), or a dictionary, as documented in the `external_account` parameter for [bank account](https://docs.stripe.com/api#account_create_bank_account) creation.
+ A card or bank account to attach to the account for receiving [payouts](https://stripe.com/connect/bank-debit-card-payouts) (you won't be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/js), or a dictionary, as documented in the `external_account` parameter for [bank account](https://stripe.com/api#account_create_bank_account) creation.
- By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the [bank account](https://docs.stripe.com/api#account_create_bank_account) or [card creation](https://docs.stripe.com/api#account_create_card) APIs. After you create an [Account Link](https://docs.stripe.com/api/account_links) or [Account Session](https://docs.stripe.com/api/account_sessions), this property can only be updated for Custom accounts.
+ By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the [bank account](https://stripe.com/api#account_create_bank_account) or [card creation](https://stripe.com/api#account_create_card) APIs. After you create an [Account Link](https://stripe.com/api/account_links) or [Account Session](https://stripe.com/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.
"""
individual: NotRequired["AccountService.CreateParamsIndividual"]
"""
- Information about the person represented by the account. This field is null unless `business_type` is set to `individual`. Once you create an [Account Link](https://docs.stripe.com/api/account_links) or [Account Session](https://docs.stripe.com/api/account_sessions), this property can only be updated for Custom accounts.
+ Information about the person represented by the account. This field is null unless `business_type` is set to `individual`. Once you create an [Account Link](https://stripe.com/api/account_links) or [Account Session](https://stripe.com/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.
"""
metadata: NotRequired["Literal['']|Dict[str, str]"]
"""
@@ -98,7 +105,7 @@ class CreateParams(TypedDict):
"""
tos_acceptance: NotRequired["AccountService.CreateParamsTosAcceptance"]
"""
- Details on the account's acceptance of the [Stripe Services Agreement](https://docs.stripe.com/connect/updating-accounts#tos-acceptance) This property can only be updated for Custom accounts.
+ Details on the account's acceptance of the [Stripe Services Agreement](https://stripe.com/connect/updating-accounts#tos-acceptance). This property can only be updated for accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.
"""
type: NotRequired[Literal["custom", "express", "standard"]]
"""
@@ -1038,7 +1045,7 @@ class CreateParamsControllerDashboard(TypedDict):
class CreateParamsControllerFees(TypedDict):
payer: NotRequired[Literal["account", "application"]]
"""
- A value indicating the responsible payer of Stripe fees on this account. Defaults to `account`.
+ A value indicating the responsible payer of Stripe fees on this account. Defaults to `account`. Learn more about [fee behavior on connected accounts](https://docs.stripe.com/connect/direct-charges-fee-payer-behavior).
"""
class CreateParamsControllerLosses(TypedDict):
@@ -1751,15 +1758,22 @@ class UpdateParams(TypedDict):
Literal["company", "government_entity", "individual", "non_profit"]
]
"""
- The business type. Once you create an [Account Link](https://docs.stripe.com/api/account_links) or [Account Session](https://docs.stripe.com/api/account_sessions), this property can only be updated for Custom accounts.
+ The business type. Once you create an [Account Link](https://stripe.com/api/account_links) or [Account Session](https://stripe.com/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.
"""
capabilities: NotRequired["AccountService.UpdateParamsCapabilities"]
"""
- Each key of the dictionary represents a capability, and each capability maps to its settings (e.g. whether it has been requested or not). Each capability will be inactive until you have provided its specific requirements and Stripe has verified them. An account may have some of its requested capabilities be active and some be inactive.
+ Each key of the dictionary represents a capability, and each capability
+ maps to its settings (for example, whether it has been requested or not). Each
+ capability is inactive until you have provided its specific
+ requirements and Stripe has verified them. An account might have some
+ of its requested capabilities be active and some be inactive.
+
+ Required when [account.controller.stripe_dashboard.type](https://stripe.com/api/accounts/create#create_account-controller-dashboard-type)
+ is `none`, which includes Custom accounts.
"""
company: NotRequired["AccountService.UpdateParamsCompany"]
"""
- Information about the company or business. This field is available for any `business_type`. Once you create an [Account Link](https://docs.stripe.com/api/account_links) or [Account Session](https://docs.stripe.com/api/account_sessions), this property can only be updated for Custom accounts.
+ Information about the company or business. This field is available for any `business_type`. Once you create an [Account Link](https://stripe.com/api/account_links) or [Account Session](https://stripe.com/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.
"""
default_currency: NotRequired[str]
"""
@@ -1771,7 +1785,7 @@ class UpdateParams(TypedDict):
"""
email: NotRequired[str]
"""
- The email address of the account holder. This is only to make the account easier to identify to you. Stripe only emails Custom accounts with your consent.
+ The email address of the account holder. This is only to make the account easier to identify to you. If [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts, Stripe doesn't email the account without your consent.
"""
expand: NotRequired[List[str]]
"""
@@ -1781,13 +1795,13 @@ class UpdateParams(TypedDict):
"Literal['']|str|AccountService.UpdateParamsBankAccount|AccountService.UpdateParamsCard|AccountService.UpdateParamsCardToken"
]
"""
- A card or bank account to attach to the account for receiving [payouts](https://docs.stripe.com/connect/bank-debit-card-payouts) (you won't be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](https://docs.stripe.com/js), or a dictionary, as documented in the `external_account` parameter for [bank account](https://docs.stripe.com/api#account_create_bank_account) creation.
+ A card or bank account to attach to the account for receiving [payouts](https://stripe.com/connect/bank-debit-card-payouts) (you won't be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/js), or a dictionary, as documented in the `external_account` parameter for [bank account](https://stripe.com/api#account_create_bank_account) creation.
- By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the [bank account](https://docs.stripe.com/api#account_create_bank_account) or [card creation](https://docs.stripe.com/api#account_create_card) APIs. After you create an [Account Link](https://docs.stripe.com/api/account_links) or [Account Session](https://docs.stripe.com/api/account_sessions), this property can only be updated for Custom accounts.
+ By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the [bank account](https://stripe.com/api#account_create_bank_account) or [card creation](https://stripe.com/api#account_create_card) APIs. After you create an [Account Link](https://stripe.com/api/account_links) or [Account Session](https://stripe.com/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.
"""
individual: NotRequired["AccountService.UpdateParamsIndividual"]
"""
- Information about the person represented by the account. This field is null unless `business_type` is set to `individual`. Once you create an [Account Link](https://docs.stripe.com/api/account_links) or [Account Session](https://docs.stripe.com/api/account_sessions), this property can only be updated for Custom accounts.
+ Information about the person represented by the account. This field is null unless `business_type` is set to `individual`. Once you create an [Account Link](https://stripe.com/api/account_links) or [Account Session](https://stripe.com/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.
"""
metadata: NotRequired["Literal['']|Dict[str, str]"]
"""
@@ -1803,7 +1817,7 @@ class UpdateParams(TypedDict):
"""
tos_acceptance: NotRequired["AccountService.UpdateParamsTosAcceptance"]
"""
- Details on the account's acceptance of the [Stripe Services Agreement](https://docs.stripe.com/connect/updating-accounts#tos-acceptance) This property can only be updated for Custom accounts.
+ Details on the account's acceptance of the [Stripe Services Agreement](https://stripe.com/connect/updating-accounts#tos-acceptance). This property can only be updated for accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.
"""
class UpdateParamsBankAccount(TypedDict):
@@ -3319,9 +3333,11 @@ def delete(
options: RequestOptions = {},
) -> Account:
"""
- With [Connect](https://stripe.com/docs/connect), you can delete accounts you manage.
+ With [Connect](https://stripe.com/connect), you can delete accounts you manage.
+
+ Test-mode accounts can be deleted at any time.
- Accounts created using test-mode keys can be deleted at any time. Standard accounts created using live-mode keys cannot be deleted. Custom or Express accounts created using live-mode keys can only be deleted once all balances are zero.
+ Live-mode accounts where Stripe is responsible for negative account balances cannot be deleted, which includes Standard accounts. Live-mode accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be deleted when all [balances](https://stripe.com/api/balance/balanace_object) are zero.
If you want to delete your own account, use the [account information tab in your account settings](https://dashboard.stripe.com/settings/account) instead.
"""
@@ -3344,9 +3360,11 @@ async def delete_async(
options: RequestOptions = {},
) -> Account:
"""
- With [Connect](https://stripe.com/docs/connect), you can delete accounts you manage.
+ With [Connect](https://stripe.com/connect), you can delete accounts you manage.
- Accounts created using test-mode keys can be deleted at any time. Standard accounts created using live-mode keys cannot be deleted. Custom or Express accounts created using live-mode keys can only be deleted once all balances are zero.
+ Test-mode accounts can be deleted at any time.
+
+ Live-mode accounts where Stripe is responsible for negative account balances cannot be deleted, which includes Standard accounts. Live-mode accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be deleted when all [balances](https://stripe.com/api/balance/balanace_object) are zero.
If you want to delete your own account, use the [account information tab in your account settings](https://dashboard.stripe.com/settings/account) instead.
"""
@@ -3411,12 +3429,16 @@ def update(
options: RequestOptions = {},
) -> Account:
"""
- Updates a [connected account](https://stripe.com/docs/connect/accounts) by setting the values of the parameters passed. Any parameters not provided are
+ Updates a [connected account](https://stripe.com/connect/accounts) by setting the values of the parameters passed. Any parameters not provided are
left unchanged.
- For Custom accounts, you can update any information on the account. For other accounts, you can update all information until that
- account has started to go through Connect Onboarding. Once you create an [Account Link or Account Session](https://stripe.com/docs/api/account_links),
- some properties can only be changed or updated for Custom accounts.
+ For accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection)
+ is application, which includes Custom accounts, you can update any information on the account.
+
+ For accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection)
+ is stripe, which includes Standard and Express accounts, you can update all information until you create
+ an [Account Link or Account Session](https://stripe.com/api/account_links) to start Connect onboarding,
+ after which some properties can no longer be updated.
To update your own account, use the [Dashboard](https://dashboard.stripe.com/settings/account). Refer to our
[Connect](https://stripe.com/docs/connect/updating-accounts) documentation to learn more about updating accounts.
@@ -3440,12 +3462,16 @@ async def update_async(
options: RequestOptions = {},
) -> Account:
"""
- Updates a [connected account](https://stripe.com/docs/connect/accounts) by setting the values of the parameters passed. Any parameters not provided are
+ Updates a [connected account](https://stripe.com/connect/accounts) by setting the values of the parameters passed. Any parameters not provided are
left unchanged.
- For Custom accounts, you can update any information on the account. For other accounts, you can update all information until that
- account has started to go through Connect Onboarding. Once you create an [Account Link or Account Session](https://stripe.com/docs/api/account_links),
- some properties can only be changed or updated for Custom accounts.
+ For accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection)
+ is application, which includes Custom accounts, you can update any information on the account.
+
+ For accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection)
+ is stripe, which includes Standard and Express accounts, you can update all information until you create
+ an [Account Link or Account Session](https://stripe.com/api/account_links) to start Connect onboarding,
+ after which some properties can no longer be updated.
To update your own account, use the [Dashboard](https://dashboard.stripe.com/settings/account). Refer to our
[Connect](https://stripe.com/docs/connect/updating-accounts) documentation to learn more about updating accounts.
@@ -3599,9 +3625,9 @@ def reject(
options: RequestOptions = {},
) -> Account:
"""
- With [Connect](https://stripe.com/docs/connect), you may flag accounts as suspicious.
+ With [Connect](https://stripe.com/connect), you can reject accounts that you have flagged as suspicious.
- Test-mode Custom and Express accounts can be rejected at any time. Accounts created using live-mode keys may only be rejected once all balances are zero.
+ Only accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be rejected. Test-mode accounts can be rejected at any time. Live-mode accounts can only be rejected after all balances are zero.
"""
return cast(
Account,
@@ -3624,9 +3650,9 @@ async def reject_async(
options: RequestOptions = {},
) -> Account:
"""
- With [Connect](https://stripe.com/docs/connect), you may flag accounts as suspicious.
+ With [Connect](https://stripe.com/connect), you can reject accounts that you have flagged as suspicious.
- Test-mode Custom and Express accounts can be rejected at any time. Accounts created using live-mode keys may only be rejected once all balances are zero.
+ Only accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be rejected. Test-mode accounts can be rejected at any time. Live-mode accounts can only be rejected after all balances are zero.
"""
return cast(
Account,
diff --git a/stripe/_account_session.py b/stripe/_account_session.py
index cc32ac5ab..330e675b4 100644
--- a/stripe/_account_session.py
+++ b/stripe/_account_session.py
@@ -297,6 +297,12 @@ class CreateParamsComponents(TypedDict):
"""
Configuration for the payment details embedded component.
"""
+ payment_method_settings: NotRequired[
+ "AccountSession.CreateParamsComponentsPaymentMethodSettings"
+ ]
+ """
+ Configuration for the payment method settings embedded component.
+ """
payments: NotRequired["AccountSession.CreateParamsComponentsPayments"]
"""
Configuration for the payments embedded component.
@@ -552,6 +558,21 @@ class CreateParamsComponentsPaymentDetailsFeatures(TypedDict):
Whether to allow sending refunds. This is `true` by default.
"""
+ class CreateParamsComponentsPaymentMethodSettings(TypedDict):
+ enabled: bool
+ """
+ Whether the embedded component is enabled.
+ """
+ features: NotRequired[
+ "AccountSession.CreateParamsComponentsPaymentMethodSettingsFeatures"
+ ]
+ """
+ The list of features enabled in the embedded component.
+ """
+
+ class CreateParamsComponentsPaymentMethodSettingsFeatures(TypedDict):
+ pass
+
class CreateParamsComponentsPayments(TypedDict):
enabled: bool
"""
diff --git a/stripe/_account_session_service.py b/stripe/_account_session_service.py
index 419564462..e53754dbe 100644
--- a/stripe/_account_session_service.py
+++ b/stripe/_account_session_service.py
@@ -92,6 +92,12 @@ class CreateParamsComponents(TypedDict):
"""
Configuration for the payment details embedded component.
"""
+ payment_method_settings: NotRequired[
+ "AccountSessionService.CreateParamsComponentsPaymentMethodSettings"
+ ]
+ """
+ Configuration for the payment method settings embedded component.
+ """
payments: NotRequired[
"AccountSessionService.CreateParamsComponentsPayments"
]
@@ -351,6 +357,21 @@ class CreateParamsComponentsPaymentDetailsFeatures(TypedDict):
Whether to allow sending refunds. This is `true` by default.
"""
+ class CreateParamsComponentsPaymentMethodSettings(TypedDict):
+ enabled: bool
+ """
+ Whether the embedded component is enabled.
+ """
+ features: NotRequired[
+ "AccountSessionService.CreateParamsComponentsPaymentMethodSettingsFeatures"
+ ]
+ """
+ The list of features enabled in the embedded component.
+ """
+
+ class CreateParamsComponentsPaymentMethodSettingsFeatures(TypedDict):
+ pass
+
class CreateParamsComponentsPayments(TypedDict):
enabled: bool
"""
diff --git a/stripe/_balance.py b/stripe/_balance.py
index 50b24f8e2..1cbc6312e 100644
--- a/stripe/_balance.py
+++ b/stripe/_balance.py
@@ -173,7 +173,7 @@ class RetrieveParams(RequestOptions):
"""
connect_reserved: Optional[List[ConnectReserved]]
"""
- Funds held due to negative balances on connected Custom accounts. You can find the connect reserve balance for each currency and payment type in the `source_types` property.
+ Funds held due to negative balances on connected accounts where [account.controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. You can find the connect reserve balance for each currency and payment type in the `source_types` property.
"""
instant_available: Optional[List[InstantAvailable]]
"""
diff --git a/stripe/_bank_account.py b/stripe/_bank_account.py
index 39e2d806d..c74515d33 100644
--- a/stripe/_bank_account.py
+++ b/stripe/_bank_account.py
@@ -25,11 +25,12 @@ class BankAccount(
"""
These bank accounts are payment methods on `Customer` objects.
- On the other hand [External Accounts](https://stripe.com/docs/api#external_accounts) are transfer
- destinations on `Account` objects for [Custom accounts](https://stripe.com/docs/connect/custom-accounts).
+ On the other hand [External Accounts](https://stripe.com/api#external_accounts) are transfer
+ destinations on `Account` objects for accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection)
+ is `application`, which includes [Custom accounts](https://stripe.com/connect/custom-accounts).
They can be bank accounts or debit cards as well, and are documented in the links above.
- Related guide: [Bank debits and transfers](https://stripe.com/docs/payments/bank-debits-transfers)
+ Related guide: [Bank debits and transfers](https://stripe.com/payments/bank-debits-transfers)
"""
OBJECT_NAME: ClassVar[Literal["bank_account"]] = "bank_account"
diff --git a/stripe/_capability.py b/stripe/_capability.py
index 8dc7d3185..d365fc781 100644
--- a/stripe/_capability.py
+++ b/stripe/_capability.py
@@ -294,13 +294,13 @@ class Error(StripeObject):
"""
disabled_reason: Optional[str]
"""
- If the capability is disabled, this string describes why. Can be `requirements.past_due`, `requirements.pending_verification`, `listed`, `platform_paused`, `rejected.fraud`, `rejected.listed`, `rejected.terms_of_service`, `rejected.other`, `under_review`, or `other`.
+ If the capability is disabled, this string describes why. Can be `requirements.fields_needed`, `pending.onboarding`, `pending.review`, `rejected.fraud`, `rejected.other`, `platform_paused`, `action_required.requested_capabilities`, `rejected.inactivty`, or `rejected.unsupported_business`.
- `rejected.unsupported_business` means that the account's business is not supported by the capability. For example, payment methods may restrict the businesses they support in their terms of service:
+ `rejected.unsupported_business` means that the account's business is not supported by the capability. For example, payment methods may restrict the businesses they support in their terms of service, such as in [Afterpay Clearpay's terms of service](https://stripe.com/afterpay-clearpay/legal#restricted-businesses).
- - [Afterpay Clearpay's terms of service](https://stripe.com/afterpay-clearpay/legal#restricted-businesses)
+ `rejected.inactivity` means that the capability has been paused for inactivity. This disabled reason currently only applies to the Issuing capability. See [Issuing: Managing Inactive Connects](https://support.stripe.com/questions/issuing-managing-inactive-connect-accounts) for more details.
- If you believe that the rejection is in error, please contact support at https://support.stripe.com/contact/ for assistance.
+ If you believe that a rejection is in error, please contact support at https://support.stripe.com/contact/ for assistance.
"""
errors: List[Error]
"""
diff --git a/stripe/_card.py b/stripe/_card.py
index a83c74af9..434bad80a 100644
--- a/stripe/_card.py
+++ b/stripe/_card.py
@@ -38,7 +38,7 @@ class DeleteParams(RequestOptions):
account: Optional[ExpandableField["Account"]]
"""
- The account this card belongs to. This attribute will not be in the card object if the card belongs to a customer or recipient instead.
+ The account this card belongs to. This attribute will not be in the card object if the card belongs to a customer or recipient instead. This property is only available for accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.
"""
address_city: Optional[str]
"""
@@ -86,7 +86,7 @@ class DeleteParams(RequestOptions):
"""
currency: Optional[str]
"""
- Three-letter [ISO code for currency](https://stripe.com/docs/payouts). Only applicable on accounts (not customers or recipients). The card can be used as a transfer destination for funds in this currency.
+ Three-letter [ISO code for currency](https://stripe.com/docs/payouts). Only applicable on accounts (not customers or recipients). The card can be used as a transfer destination for funds in this currency. This property is only available for accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.
"""
customer: Optional[ExpandableField["Customer"]]
"""
@@ -98,7 +98,7 @@ class DeleteParams(RequestOptions):
"""
default_for_currency: Optional[bool]
"""
- Whether this card is the default external account for its currency.
+ Whether this card is the default external account for its currency. This property is only available for accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.
"""
description: Optional[str]
"""
diff --git a/stripe/_confirmation_token.py b/stripe/_confirmation_token.py
index 98ac3689f..46c770e89 100644
--- a/stripe/_confirmation_token.py
+++ b/stripe/_confirmation_token.py
@@ -1957,7 +1957,7 @@ class RetrieveParams(RequestOptions):
"""
expires_at: Optional[int]
"""
- Time at which this ConfirmationToken expires and can no longer be used to confirm a PaymentIntent or SetupIntent. This is set to null once this ConfirmationToken has been used.
+ Time at which this ConfirmationToken expires and can no longer be used to confirm a PaymentIntent or SetupIntent.
"""
id: str
"""
diff --git a/stripe/_event.py b/stripe/_event.py
index 0769c1b79..8f0d6f923 100644
--- a/stripe/_event.py
+++ b/stripe/_event.py
@@ -31,10 +31,10 @@ class Event(ListableAPIResource["Event"]):
`Event` objects directly to an endpoint on your server. You can manage
webhooks in your
[account settings](https://dashboard.stripe.com/account/webhooks). Learn how
- to [listen for events](https://stripe.com/docs/webhooks)
+ to [listen for events](https://docs.stripe.com/webhooks)
so that your integration can automatically trigger reactions.
- When using [Connect](https://stripe.com/docs/connect), you can also receive event notifications
+ When using [Connect](https://docs.stripe.com/connect), you can also receive event notifications
that occur in connected accounts. For these events, there's an
additional `account` attribute in the received `Event` object.
@@ -68,7 +68,7 @@ class StripeSendWebhookCustomEvent(StripeObject):
trigger: str
"""
The trigger name of the automation that triggered this action.
- Please visit [Revenue and retention automations](https://stripe.com/docs/billing/revenue-recovery/automations#choose-a-trigger) for all possible trigger names.
+ Please visit [Revenue and retention automations](https://docs.stripe.com/billing/automations#choose-a-trigger) for all possible trigger names.
"""
type: Literal["stripe_send_webhook_custom_event"]
"""
@@ -198,7 +198,7 @@ class RetrieveParams(RequestOptions):
"""
reason: Optional[Reason]
"""
- Information about the action that causes the event. Only present when the event is triggered by an API request or an [Automation](https://stripe.com/docs/billing/revenue-recovery/automations) action.
+ Information about the action that causes the event. Only present when the event is triggered by an API request or an [Automation](https://docs.stripe.com/billing/automations) action.
"""
request: Optional[Request]
"""
@@ -469,7 +469,7 @@ class RetrieveParams(RequestOptions):
@classmethod
def list(cls, **params: Unpack["Event.ListParams"]) -> 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://stripe.com/docs/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](https://docs.stripe.com/api/events/object) api_version attribute (not according to your current Stripe API version or Stripe-Version header).
"""
result = cls._static_request(
"get",
@@ -490,7 +490,7 @@ async def list_async(
cls, **params: Unpack["Event.ListParams"]
) -> 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://stripe.com/docs/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](https://docs.stripe.com/api/events/object) api_version attribute (not according to your current Stripe API version or Stripe-Version header).
"""
result = await cls._static_request_async(
"get",
diff --git a/stripe/_event_service.py b/stripe/_event_service.py
index bb816594f..2cdaf6709 100644
--- a/stripe/_event_service.py
+++ b/stripe/_event_service.py
@@ -74,7 +74,7 @@ def list(
options: RequestOptions = {},
) -> 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://stripe.com/docs/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](https://docs.stripe.com/api/events/object) api_version attribute (not according to your current Stripe API version or Stripe-Version header).
"""
return cast(
ListObject[Event],
@@ -94,7 +94,7 @@ async def list_async(
options: RequestOptions = {},
) -> 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://stripe.com/docs/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](https://docs.stripe.com/api/events/object) api_version attribute (not according to your current Stripe API version or Stripe-Version header).
"""
return cast(
ListObject[Event],
diff --git a/stripe/_invoice.py b/stripe/_invoice.py
index 5c4f3ff79..c27dd40bb 100644
--- a/stripe/_invoice.py
+++ b/stripe/_invoice.py
@@ -776,6 +776,7 @@ class FinancialConnections(StripeObject):
"ach_credit_transfer",
"ach_debit",
"acss_debit",
+ "amazon_pay",
"au_becs_debit",
"bacs_debit",
"bancontact",
@@ -794,6 +795,7 @@ class FinancialConnections(StripeObject):
"paynow",
"paypal",
"promptpay",
+ "revolut_pay",
"sepa_credit_transfer",
"sepa_debit",
"sofort",
@@ -1589,7 +1591,7 @@ class CreateParamsPaymentSettings(TypedDict):
Payment-method-specific configuration to provide to the invoice's PaymentIntent.
"""
payment_method_types: NotRequired[
- "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'konbini', 'link', 'p24', 'paynow', 'paypal', 'promptpay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'us_bank_account', 'wechat_pay']]"
+ "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'konbini', 'link', 'p24', 'paynow', 'paypal', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'us_bank_account', 'wechat_pay']]"
]
"""
The list of payment method types (e.g. card) to provide to the invoice's PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice's default payment method, the subscription's default payment method, the customer's default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice).
@@ -4200,7 +4202,7 @@ class ModifyParamsPaymentSettings(TypedDict):
Payment-method-specific configuration to provide to the invoice's PaymentIntent.
"""
payment_method_types: NotRequired[
- "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'konbini', 'link', 'p24', 'paynow', 'paypal', 'promptpay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'us_bank_account', 'wechat_pay']]"
+ "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'konbini', 'link', 'p24', 'paynow', 'paypal', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'us_bank_account', 'wechat_pay']]"
]
"""
The list of payment method types (e.g. card) to provide to the invoice's PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice's default payment method, the subscription's default payment method, the customer's default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice).
@@ -8781,7 +8783,7 @@ class UpdateLinesParams(RequestOptions):
"""
invoice_metadata: NotRequired["Literal['']|Dict[str, str]"]
"""
- Set of [key-value pairs](https://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. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
+ Set of [key-value pairs](https://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. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. For `type=recurring` line items, the incoming metadata specified on the request is directly used to set this value, in contrast to `type=invoiceitem` line items, where any existing metadata on the invoice line is merged with the incoming data.
"""
lines: List["Invoice.UpdateLinesParamsLine"]
"""
@@ -8817,7 +8819,7 @@ class UpdateLinesParamsLine(TypedDict):
"""
metadata: NotRequired["Literal['']|Dict[str, str]"]
"""
- Set of [key-value pairs](https://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. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
+ Set of [key-value pairs](https://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. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. For `type=recurring` line items, the incoming metadata specified on the request is directly used to set this value, in contrast to `type=invoiceitem` line items, where any existing metadata on the invoice line is merged with the incoming data.
"""
period: NotRequired["Invoice.UpdateLinesParamsLinePeriod"]
"""
@@ -10514,7 +10516,7 @@ def upcoming(cls, **params: Unpack["Invoice.UpcomingParams"]) -> "Invoice":
Note that when you are viewing an upcoming invoice, you are simply viewing a preview – the invoice has not yet been created. As such, the upcoming invoice will not show up in invoice listing calls, and you cannot use the API to pay or edit the invoice. If you want to change the amount that your customer will be billed, you can add, remove, or update pending invoice items, or update the customer's discount.
- You can preview the effects of updating a subscription, including a preview of what proration will take place. To ensure that the actual proration is calculated exactly the same as the previewed proration, you should pass the subscription_proration_date parameter when doing the actual subscription update. The recommended way to get only the prorations being previewed is to consider only proration line items where period[start] is equal to the subscription_proration_date value passed in the request.
+ You can preview the effects of updating a subscription, including a preview of what proration will take place. To ensure that the actual proration is calculated exactly the same as the previewed proration, you should pass the subscription_details.proration_date parameter when doing the actual subscription update. The recommended way to get only the prorations being previewed is to consider only proration line items where period[start] is equal to the subscription_details.proration_date value passed in the request.
"""
return cast(
"Invoice",
@@ -10534,7 +10536,7 @@ async def upcoming_async(
Note that when you are viewing an upcoming invoice, you are simply viewing a preview – the invoice has not yet been created. As such, the upcoming invoice will not show up in invoice listing calls, and you cannot use the API to pay or edit the invoice. If you want to change the amount that your customer will be billed, you can add, remove, or update pending invoice items, or update the customer's discount.
- You can preview the effects of updating a subscription, including a preview of what proration will take place. To ensure that the actual proration is calculated exactly the same as the previewed proration, you should pass the subscription_proration_date parameter when doing the actual subscription update. The recommended way to get only the prorations being previewed is to consider only proration line items where period[start] is equal to the subscription_proration_date value passed in the request.
+ You can preview the effects of updating a subscription, including a preview of what proration will take place. To ensure that the actual proration is calculated exactly the same as the previewed proration, you should pass the subscription_details.proration_date parameter when doing the actual subscription update. The recommended way to get only the prorations being previewed is to consider only proration line items where period[start] is equal to the subscription_details.proration_date value passed in the request.
"""
return cast(
"Invoice",
diff --git a/stripe/_invoice_line_item.py b/stripe/_invoice_line_item.py
index a0964ac8e..ecc9dbc96 100644
--- a/stripe/_invoice_line_item.py
+++ b/stripe/_invoice_line_item.py
@@ -144,7 +144,7 @@ class ModifyParams(RequestOptions):
"""
metadata: NotRequired["Literal['']|Dict[str, str]"]
"""
- Set of [key-value pairs](https://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. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
+ Set of [key-value pairs](https://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. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. For `type=recurring` line items, the incoming metadata specified on the request is directly used to set this value, in contrast to `type=invoiceitem` line items, where any existing metadata on the invoice line is merged with the incoming data.
"""
period: NotRequired["InvoiceLineItem.ModifyParamsPeriod"]
"""
@@ -400,7 +400,7 @@ class ModifyParamsTaxAmountTaxRateData(TypedDict):
"""
metadata: Dict[str, str]
"""
- Set of [key-value pairs](https://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. Note that for line items with `type=subscription` this will reflect the metadata of the subscription that caused the line item to be created.
+ Set of [key-value pairs](https://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. Note that for line items with `type=subscription`, `metadata` reflects the current metadata from the subscription associated with the line item, unless the invoice line was directly updated with different metadata after creation.
"""
object: Literal["line_item"]
"""
diff --git a/stripe/_invoice_line_item_service.py b/stripe/_invoice_line_item_service.py
index 795b93234..a12b08c24 100644
--- a/stripe/_invoice_line_item_service.py
+++ b/stripe/_invoice_line_item_service.py
@@ -57,7 +57,7 @@ class UpdateParams(TypedDict):
"""
metadata: NotRequired["Literal['']|Dict[str, str]"]
"""
- Set of [key-value pairs](https://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. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
+ Set of [key-value pairs](https://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. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. For `type=recurring` line items, the incoming metadata specified on the request is directly used to set this value, in contrast to `type=invoiceitem` line items, where any existing metadata on the invoice line is merged with the incoming data.
"""
period: NotRequired["InvoiceLineItemService.UpdateParamsPeriod"]
"""
diff --git a/stripe/_invoice_service.py b/stripe/_invoice_service.py
index 3abb63445..be5fb70c2 100644
--- a/stripe/_invoice_service.py
+++ b/stripe/_invoice_service.py
@@ -555,7 +555,7 @@ class CreateParamsPaymentSettings(TypedDict):
Payment-method-specific configuration to provide to the invoice's PaymentIntent.
"""
payment_method_types: NotRequired[
- "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'konbini', 'link', 'p24', 'paynow', 'paypal', 'promptpay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'us_bank_account', 'wechat_pay']]"
+ "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'konbini', 'link', 'p24', 'paynow', 'paypal', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'us_bank_account', 'wechat_pay']]"
]
"""
The list of payment method types (e.g. card) to provide to the invoice's PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice's default payment method, the subscription's default payment method, the customer's default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice).
@@ -5032,7 +5032,7 @@ class UpdateLinesParams(TypedDict):
"""
invoice_metadata: NotRequired["Literal['']|Dict[str, str]"]
"""
- Set of [key-value pairs](https://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. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
+ Set of [key-value pairs](https://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. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. For `type=recurring` line items, the incoming metadata specified on the request is directly used to set this value, in contrast to `type=invoiceitem` line items, where any existing metadata on the invoice line is merged with the incoming data.
"""
lines: List["InvoiceService.UpdateLinesParamsLine"]
"""
@@ -5068,7 +5068,7 @@ class UpdateLinesParamsLine(TypedDict):
"""
metadata: NotRequired["Literal['']|Dict[str, str]"]
"""
- Set of [key-value pairs](https://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. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
+ Set of [key-value pairs](https://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. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. For `type=recurring` line items, the incoming metadata specified on the request is directly used to set this value, in contrast to `type=invoiceitem` line items, where any existing metadata on the invoice line is merged with the incoming data.
"""
period: NotRequired["InvoiceService.UpdateLinesParamsLinePeriod"]
"""
@@ -5520,7 +5520,7 @@ class UpdateParamsPaymentSettings(TypedDict):
Payment-method-specific configuration to provide to the invoice's PaymentIntent.
"""
payment_method_types: NotRequired[
- "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'konbini', 'link', 'p24', 'paynow', 'paypal', 'promptpay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'us_bank_account', 'wechat_pay']]"
+ "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'konbini', 'link', 'p24', 'paynow', 'paypal', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'us_bank_account', 'wechat_pay']]"
]
"""
The list of payment method types (e.g. card) to provide to the invoice's PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice's default payment method, the subscription's default payment method, the customer's default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice).
@@ -6198,7 +6198,7 @@ def upcoming(
Note that when you are viewing an upcoming invoice, you are simply viewing a preview – the invoice has not yet been created. As such, the upcoming invoice will not show up in invoice listing calls, and you cannot use the API to pay or edit the invoice. If you want to change the amount that your customer will be billed, you can add, remove, or update pending invoice items, or update the customer's discount.
- You can preview the effects of updating a subscription, including a preview of what proration will take place. To ensure that the actual proration is calculated exactly the same as the previewed proration, you should pass the subscription_proration_date parameter when doing the actual subscription update. The recommended way to get only the prorations being previewed is to consider only proration line items where period[start] is equal to the subscription_proration_date value passed in the request.
+ You can preview the effects of updating a subscription, including a preview of what proration will take place. To ensure that the actual proration is calculated exactly the same as the previewed proration, you should pass the subscription_details.proration_date parameter when doing the actual subscription update. The recommended way to get only the prorations being previewed is to consider only proration line items where period[start] is equal to the subscription_details.proration_date value passed in the request.
"""
return cast(
Invoice,
@@ -6222,7 +6222,7 @@ async def upcoming_async(
Note that when you are viewing an upcoming invoice, you are simply viewing a preview – the invoice has not yet been created. As such, the upcoming invoice will not show up in invoice listing calls, and you cannot use the API to pay or edit the invoice. If you want to change the amount that your customer will be billed, you can add, remove, or update pending invoice items, or update the customer's discount.
- You can preview the effects of updating a subscription, including a preview of what proration will take place. To ensure that the actual proration is calculated exactly the same as the previewed proration, you should pass the subscription_proration_date parameter when doing the actual subscription update. The recommended way to get only the prorations being previewed is to consider only proration line items where period[start] is equal to the subscription_proration_date value passed in the request.
+ You can preview the effects of updating a subscription, including a preview of what proration will take place. To ensure that the actual proration is calculated exactly the same as the previewed proration, you should pass the subscription_details.proration_date parameter when doing the actual subscription update. The recommended way to get only the prorations being previewed is to consider only proration line items where period[start] is equal to the subscription_details.proration_date value passed in the request.
"""
return cast(
Invoice,
diff --git a/stripe/_login_link.py b/stripe/_login_link.py
index dae7a85e6..0b6cdd24a 100644
--- a/stripe/_login_link.py
+++ b/stripe/_login_link.py
@@ -7,7 +7,7 @@
class LoginLink(StripeObject):
"""
- Login Links are single-use login link for an Express account to access their Stripe dashboard.
+ Login Links are single-use URLs for a connected account to access the Express Dashboard. The connected account's [account.controller.stripe_dashboard.type](https://stripe.com/api/accounts/object#account_object-controller-stripe_dashboard-type) must be `express` to have access to the Express Dashboard.
"""
OBJECT_NAME: ClassVar[Literal["login_link"]] = "login_link"
diff --git a/stripe/_mandate.py b/stripe/_mandate.py
index 3a948871b..16650f0d4 100644
--- a/stripe/_mandate.py
+++ b/stripe/_mandate.py
@@ -66,6 +66,9 @@ class AcssDebit(StripeObject):
Transaction type of the mandate.
"""
+ class AmazonPay(StripeObject):
+ pass
+
class AuBecsDebit(StripeObject):
url: str
"""
@@ -181,6 +184,9 @@ class Payto(StripeObject):
Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to confirmation time.
"""
+ class RevolutPay(StripeObject):
+ pass
+
class SepaDebit(StripeObject):
reference: str
"""
@@ -198,6 +204,7 @@ class UsBankAccount(StripeObject):
"""
acss_debit: Optional[AcssDebit]
+ amazon_pay: Optional[AmazonPay]
au_becs_debit: Optional[AuBecsDebit]
bacs_debit: Optional[BacsDebit]
card: Optional[Card]
@@ -205,6 +212,7 @@ class UsBankAccount(StripeObject):
link: Optional[Link]
paypal: Optional[Paypal]
payto: Optional[Payto]
+ revolut_pay: Optional[RevolutPay]
sepa_debit: Optional[SepaDebit]
type: str
"""
@@ -213,6 +221,7 @@ class UsBankAccount(StripeObject):
us_bank_account: Optional[UsBankAccount]
_inner_class_types = {
"acss_debit": AcssDebit,
+ "amazon_pay": AmazonPay,
"au_becs_debit": AuBecsDebit,
"bacs_debit": BacsDebit,
"card": Card,
@@ -220,6 +229,7 @@ class UsBankAccount(StripeObject):
"link": Link,
"paypal": Paypal,
"payto": Payto,
+ "revolut_pay": RevolutPay,
"sepa_debit": SepaDebit,
"us_bank_account": UsBankAccount,
}
diff --git a/stripe/_payment_intent.py b/stripe/_payment_intent.py
index 224c563c6..a52c41873 100644
--- a/stripe/_payment_intent.py
+++ b/stripe/_payment_intent.py
@@ -1367,6 +1367,14 @@ class AmazonPay(StripeObject):
"""
Controls when the funds will be captured from the customer's account.
"""
+ setup_future_usage: Optional[Literal["none", "off_session"]]
+ """
+ Indicates that you intend to make future payments with this PaymentIntent's payment method.
+
+ Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
+
+ When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
+ """
class AuBecsDebit(StripeObject):
setup_future_usage: Optional[
@@ -2027,6 +2035,14 @@ class RevolutPay(StripeObject):
"""
Controls when the funds will be captured from the customer's account.
"""
+ setup_future_usage: Optional[Literal["none", "off_session"]]
+ """
+ Indicates that you intend to make future payments with this PaymentIntent's payment method.
+
+ Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
+
+ When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
+ """
class SepaDebit(StripeObject):
class MandateOptions(StripeObject):
diff --git a/stripe/_payment_method_configuration.py b/stripe/_payment_method_configuration.py
index 187921af7..2f4da96cd 100644
--- a/stripe/_payment_method_configuration.py
+++ b/stripe/_payment_method_configuration.py
@@ -587,6 +587,28 @@ class DisplayPreference(StripeObject):
display_preference: DisplayPreference
_inner_class_types = {"display_preference": DisplayPreference}
+ class Mobilepay(StripeObject):
+ class DisplayPreference(StripeObject):
+ overridable: Optional[bool]
+ """
+ For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used.
+ """
+ preference: Literal["none", "off", "on"]
+ """
+ The account's display preference.
+ """
+ value: Literal["off", "on"]
+ """
+ The effective display preference value.
+ """
+
+ available: bool
+ """
+ Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active.
+ """
+ display_preference: DisplayPreference
+ _inner_class_types = {"display_preference": DisplayPreference}
+
class Multibanco(StripeObject):
class DisplayPreference(StripeObject):
overridable: Optional[bool]
@@ -1004,6 +1026,12 @@ class CreateParams(RequestOptions):
"""
[Link](https://stripe.com/docs/payments/link) is a payment method network. With Link, users save their payment details once, then reuse that information to pay with one click for any business on the network.
"""
+ mobilepay: NotRequired[
+ "PaymentMethodConfiguration.CreateParamsMobilepay"
+ ]
+ """
+ MobilePay is a [single-use](https://stripe.com/docs/payments/payment-methods#usage) card wallet payment method used in Denmark and Finland. It allows customers to [authenticate and approve](https://stripe.com/docs/payments/payment-methods#customer-actions) payments using the MobilePay app. Check this [page](https://stripe.com/docs/payments/mobilepay) for more details.
+ """
multibanco: NotRequired[
"PaymentMethodConfiguration.CreateParamsMultibanco"
]
@@ -1441,6 +1469,20 @@ class CreateParamsLinkDisplayPreference(TypedDict):
The account's preference for whether or not to display this payment method.
"""
+ class CreateParamsMobilepay(TypedDict):
+ display_preference: NotRequired[
+ "PaymentMethodConfiguration.CreateParamsMobilepayDisplayPreference"
+ ]
+ """
+ Whether or not the payment method should be displayed.
+ """
+
+ class CreateParamsMobilepayDisplayPreference(TypedDict):
+ preference: NotRequired[Literal["none", "off", "on"]]
+ """
+ The account's preference for whether or not to display this payment method.
+ """
+
class CreateParamsMultibanco(TypedDict):
display_preference: NotRequired[
"PaymentMethodConfiguration.CreateParamsMultibancoDisplayPreference"
@@ -1628,10 +1670,22 @@ class ListParams(RequestOptions):
"""
The Connect application to filter by.
"""
+ ending_before: NotRequired[str]
+ """
+ A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
+ """
expand: NotRequired[List[str]]
"""
Specifies which fields in the response should be expanded.
"""
+ limit: NotRequired[int]
+ """
+ A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ """
+ starting_after: NotRequired[str]
+ """
+ A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
+ """
class ModifyParams(RequestOptions):
acss_debit: NotRequired[
@@ -1768,6 +1822,12 @@ class ModifyParams(RequestOptions):
"""
[Link](https://stripe.com/docs/payments/link) is a payment method network. With Link, users save their payment details once, then reuse that information to pay with one click for any business on the network.
"""
+ mobilepay: NotRequired[
+ "PaymentMethodConfiguration.ModifyParamsMobilepay"
+ ]
+ """
+ MobilePay is a [single-use](https://stripe.com/docs/payments/payment-methods#usage) card wallet payment method used in Denmark and Finland. It allows customers to [authenticate and approve](https://stripe.com/docs/payments/payment-methods#customer-actions) payments using the MobilePay app. Check this [page](https://stripe.com/docs/payments/mobilepay) for more details.
+ """
multibanco: NotRequired[
"PaymentMethodConfiguration.ModifyParamsMultibanco"
]
@@ -2201,6 +2261,20 @@ class ModifyParamsLinkDisplayPreference(TypedDict):
The account's preference for whether or not to display this payment method.
"""
+ class ModifyParamsMobilepay(TypedDict):
+ display_preference: NotRequired[
+ "PaymentMethodConfiguration.ModifyParamsMobilepayDisplayPreference"
+ ]
+ """
+ Whether or not the payment method should be displayed.
+ """
+
+ class ModifyParamsMobilepayDisplayPreference(TypedDict):
+ preference: NotRequired[Literal["none", "off", "on"]]
+ """
+ The account's preference for whether or not to display this payment method.
+ """
+
class ModifyParamsMultibanco(TypedDict):
display_preference: NotRequired[
"PaymentMethodConfiguration.ModifyParamsMultibancoDisplayPreference"
@@ -2434,6 +2508,7 @@ class RetrieveParams(RequestOptions):
"""
Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
"""
+ mobilepay: Optional[Mobilepay]
multibanco: Optional[Multibanco]
name: str
"""
@@ -2624,6 +2699,7 @@ async def retrieve_async(
"klarna": Klarna,
"konbini": Konbini,
"link": Link,
+ "mobilepay": Mobilepay,
"multibanco": Multibanco,
"oxxo": Oxxo,
"p24": P24,
diff --git a/stripe/_payment_method_configuration_service.py b/stripe/_payment_method_configuration_service.py
index 3545bdfe2..3b639f873 100644
--- a/stripe/_payment_method_configuration_service.py
+++ b/stripe/_payment_method_configuration_service.py
@@ -159,6 +159,12 @@ class CreateParams(TypedDict):
"""
[Link](https://stripe.com/docs/payments/link) is a payment method network. With Link, users save their payment details once, then reuse that information to pay with one click for any business on the network.
"""
+ mobilepay: NotRequired[
+ "PaymentMethodConfigurationService.CreateParamsMobilepay"
+ ]
+ """
+ MobilePay is a [single-use](https://stripe.com/docs/payments/payment-methods#usage) card wallet payment method used in Denmark and Finland. It allows customers to [authenticate and approve](https://stripe.com/docs/payments/payment-methods#customer-actions) payments using the MobilePay app. Check this [page](https://stripe.com/docs/payments/mobilepay) for more details.
+ """
multibanco: NotRequired[
"PaymentMethodConfigurationService.CreateParamsMultibanco"
]
@@ -604,6 +610,20 @@ class CreateParamsLinkDisplayPreference(TypedDict):
The account's preference for whether or not to display this payment method.
"""
+ class CreateParamsMobilepay(TypedDict):
+ display_preference: NotRequired[
+ "PaymentMethodConfigurationService.CreateParamsMobilepayDisplayPreference"
+ ]
+ """
+ Whether or not the payment method should be displayed.
+ """
+
+ class CreateParamsMobilepayDisplayPreference(TypedDict):
+ preference: NotRequired[Literal["none", "off", "on"]]
+ """
+ The account's preference for whether or not to display this payment method.
+ """
+
class CreateParamsMultibanco(TypedDict):
display_preference: NotRequired[
"PaymentMethodConfigurationService.CreateParamsMultibancoDisplayPreference"
@@ -791,10 +811,22 @@ class ListParams(TypedDict):
"""
The Connect application to filter by.
"""
+ ending_before: NotRequired[str]
+ """
+ A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
+ """
expand: NotRequired[List[str]]
"""
Specifies which fields in the response should be expanded.
"""
+ limit: NotRequired[int]
+ """
+ A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
+ """
+ starting_after: NotRequired[str]
+ """
+ A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
+ """
class RetrieveParams(TypedDict):
expand: NotRequired[List[str]]
@@ -955,6 +987,12 @@ class UpdateParams(TypedDict):
"""
[Link](https://stripe.com/docs/payments/link) is a payment method network. With Link, users save their payment details once, then reuse that information to pay with one click for any business on the network.
"""
+ mobilepay: NotRequired[
+ "PaymentMethodConfigurationService.UpdateParamsMobilepay"
+ ]
+ """
+ MobilePay is a [single-use](https://stripe.com/docs/payments/payment-methods#usage) card wallet payment method used in Denmark and Finland. It allows customers to [authenticate and approve](https://stripe.com/docs/payments/payment-methods#customer-actions) payments using the MobilePay app. Check this [page](https://stripe.com/docs/payments/mobilepay) for more details.
+ """
multibanco: NotRequired[
"PaymentMethodConfigurationService.UpdateParamsMultibanco"
]
@@ -1396,6 +1434,20 @@ class UpdateParamsLinkDisplayPreference(TypedDict):
The account's preference for whether or not to display this payment method.
"""
+ class UpdateParamsMobilepay(TypedDict):
+ display_preference: NotRequired[
+ "PaymentMethodConfigurationService.UpdateParamsMobilepayDisplayPreference"
+ ]
+ """
+ Whether or not the payment method should be displayed.
+ """
+
+ class UpdateParamsMobilepayDisplayPreference(TypedDict):
+ preference: NotRequired[Literal["none", "off", "on"]]
+ """
+ The account's preference for whether or not to display this payment method.
+ """
+
class UpdateParamsMultibanco(TypedDict):
display_preference: NotRequired[
"PaymentMethodConfigurationService.UpdateParamsMultibancoDisplayPreference"
diff --git a/stripe/_person.py b/stripe/_person.py
index 666320784..d3461e966 100644
--- a/stripe/_person.py
+++ b/stripe/_person.py
@@ -16,10 +16,9 @@ class Person(UpdateableAPIResource["Person"]):
"""
This is an object representing a person associated with a Stripe account.
- A platform cannot access a Standard or Express account's persons after the account starts onboarding, such as after generating an account link for the account.
- See the [Standard onboarding](https://stripe.com/docs/connect/standard-accounts) or [Express onboarding documentation](https://stripe.com/docs/connect/express-accounts) for information about platform prefilling and account onboarding steps.
+ A platform cannot access a person for an account where [account.controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `stripe`, which includes Standard and Express accounts, after creating an Account Link or Account Session to start Connect onboarding.
- Related guide: [Handling identity verification with the API](https://stripe.com/docs/connect/handling-api-verification#person-information)
+ See the [Standard onboarding](https://stripe.com/connect/standard-accounts) or [Express onboarding](https://stripe.com/connect/express-accounts) documentation for information about prefilling information and account onboarding steps. Learn more about [handling identity verification with the API](https://stripe.com/connect/handling-api-verification#person-information).
"""
OBJECT_NAME: ClassVar[Literal["person"]] = "person"
diff --git a/stripe/_price.py b/stripe/_price.py
index 9be70b821..267747758 100644
--- a/stripe/_price.py
+++ b/stripe/_price.py
@@ -276,7 +276,7 @@ class CreateParams(RequestOptions):
"""
unit_amount: NotRequired[int]
"""
- A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. One of `unit_amount` or `custom_unit_amount` is required, unless `billing_scheme=tiered`.
+ A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. One of `unit_amount`, `unit_amount_decimal`, or `custom_unit_amount` is required, unless `billing_scheme=tiered`.
"""
unit_amount_decimal: NotRequired[str]
"""
diff --git a/stripe/_price_service.py b/stripe/_price_service.py
index b4e49e767..07bb02caf 100644
--- a/stripe/_price_service.py
+++ b/stripe/_price_service.py
@@ -90,7 +90,7 @@ class CreateParams(TypedDict):
"""
unit_amount: NotRequired[int]
"""
- A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. One of `unit_amount` or `custom_unit_amount` is required, unless `billing_scheme=tiered`.
+ A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. One of `unit_amount`, `unit_amount_decimal`, or `custom_unit_amount` is required, unless `billing_scheme=tiered`.
"""
unit_amount_decimal: NotRequired[str]
"""
diff --git a/stripe/_product.py b/stripe/_product.py
index 7505e560e..4abd22822 100644
--- a/stripe/_product.py
+++ b/stripe/_product.py
@@ -111,7 +111,7 @@ class FixedAmount(StripeObject):
class CreateFeatureParams(RequestOptions):
entitlement_feature: str
"""
- The ID of the [Feature](docs/api/entitlements/feature) object attached to this product.
+ The ID of the [Feature](https://stripe.com/docs/api/entitlements/feature) object attached to this product.
"""
expand: NotRequired[List[str]]
"""
diff --git a/stripe/_product_feature_service.py b/stripe/_product_feature_service.py
index 700cb234c..dfda8ed8f 100644
--- a/stripe/_product_feature_service.py
+++ b/stripe/_product_feature_service.py
@@ -13,7 +13,7 @@ class ProductFeatureService(StripeService):
class CreateParams(TypedDict):
entitlement_feature: str
"""
- The ID of the [Feature](docs/api/entitlements/feature) object attached to this product.
+ The ID of the [Feature](https://stripe.com/docs/api/entitlements/feature) object attached to this product.
"""
expand: NotRequired[List[str]]
"""
diff --git a/stripe/_quote.py b/stripe/_quote.py
index 396e14cf1..3e68da05f 100644
--- a/stripe/_quote.py
+++ b/stripe/_quote.py
@@ -1101,6 +1101,12 @@ class CreateParamsLine(TypedDict):
"""
For a point-in-time operation, this attribute lets you set or update whether the subscription's billing cycle anchor is reset at the `starts_at` timestamp.
"""
+ cancel_subscription_schedule: NotRequired[
+ "Quote.CreateParamsLineCancelSubscriptionSchedule"
+ ]
+ """
+ A point-in-time operation that cancels an existing subscription schedule at the line's starts_at timestamp. Currently only compatible with `quote_acceptance_date` for `starts_at`. When using cancel_subscription_schedule, the subscription schedule on the quote remains unalterable, except for modifications to the metadata, collection_method or invoice_settings.
+ """
ends_at: NotRequired["Quote.CreateParamsLineEndsAt"]
"""
Details to identify the end of the time range modified by the proposed change. If not supplied, the quote line is considered a point-in-time operation that only affects the exact timestamp at `starts_at`, and a restricted set of attributes is supported on the quote line.
@@ -1436,6 +1442,20 @@ class CreateParamsLineAppliesTo(TypedDict):
Describes whether the quote line is affecting a new schedule or an existing schedule.
"""
+ class CreateParamsLineCancelSubscriptionSchedule(TypedDict):
+ cancel_at: Literal["line_starts_at"]
+ """
+ Timestamp helper to cancel the underlying schedule on the accompanying line's start date. Must be set to `line_starts_at`.
+ """
+ invoice_now: NotRequired[bool]
+ """
+ If the subscription schedule is `active`, indicates if a final invoice will be generated that contains any un-invoiced metered usage and new/pending proration invoice items. Boolean that defaults to `true`.
+ """
+ prorate: NotRequired[bool]
+ """
+ If the subscription schedule is `active`, indicates if the cancellation should be prorated. Boolean that defaults to `true`.
+ """
+
class CreateParamsLineEndsAt(TypedDict):
discount_end: NotRequired["Quote.CreateParamsLineEndsAtDiscountEnd"]
"""
@@ -2581,6 +2601,12 @@ class ModifyParamsLine(TypedDict):
"""
For a point-in-time operation, this attribute lets you set or update whether the subscription's billing cycle anchor is reset at the `starts_at` timestamp.
"""
+ cancel_subscription_schedule: NotRequired[
+ "Quote.ModifyParamsLineCancelSubscriptionSchedule"
+ ]
+ """
+ A point-in-time operation that cancels an existing subscription schedule at the line's starts_at timestamp. Currently only compatible with `quote_acceptance_date` for `starts_at`. When using cancel_subscription_schedule, the subscription schedule on the quote remains unalterable, except for modifications to the metadata, collection_method or invoice_settings.
+ """
ends_at: NotRequired["Quote.ModifyParamsLineEndsAt"]
"""
Details to identify the end of the time range modified by the proposed change. If not supplied, the quote line is considered a point-in-time operation that only affects the exact timestamp at `starts_at`, and a restricted set of attributes is supported on the quote line.
@@ -2920,6 +2946,20 @@ class ModifyParamsLineAppliesTo(TypedDict):
Describes whether the quote line is affecting a new schedule or an existing schedule.
"""
+ class ModifyParamsLineCancelSubscriptionSchedule(TypedDict):
+ cancel_at: Literal["line_starts_at"]
+ """
+ Timestamp helper to cancel the underlying schedule on the accompanying line's start date. Must be set to `line_starts_at`.
+ """
+ invoice_now: NotRequired[bool]
+ """
+ If the subscription schedule is `active`, indicates if a final invoice will be generated that contains any un-invoiced metered usage and new/pending proration invoice items. Boolean that defaults to `true`.
+ """
+ prorate: NotRequired[bool]
+ """
+ If the subscription schedule is `active`, indicates if the cancellation should be prorated. Boolean that defaults to `true`.
+ """
+
class ModifyParamsLineEndsAt(TypedDict):
discount_end: NotRequired["Quote.ModifyParamsLineEndsAtDiscountEnd"]
"""
diff --git a/stripe/_quote_line.py b/stripe/_quote_line.py
index 0362e9d9b..680683a1a 100644
--- a/stripe/_quote_line.py
+++ b/stripe/_quote_line.py
@@ -321,6 +321,20 @@ class AppliesTo(StripeObject):
Describes whether the quote line is affecting a new schedule or an existing schedule.
"""
+ class CancelSubscriptionSchedule(StripeObject):
+ cancel_at: Literal["line_starts_at"]
+ """
+ Timestamp helper to cancel the underlying schedule on the accompanying line's start date. Must be set to `line_starts_at`.
+ """
+ invoice_now: Optional[bool]
+ """
+ If the subscription schedule is `active`, indicates if a final invoice will be generated that contains any un-invoiced metered usage and new/pending proration invoice items. Boolean that defaults to `true`.
+ """
+ prorate: Optional[bool]
+ """
+ If the subscription schedule is `active`, indicates if the cancellation should be prorated. Boolean that defaults to `true`.
+ """
+
class EndsAt(StripeObject):
class DiscountEnd(StripeObject):
discount: str
@@ -459,6 +473,10 @@ class EndBehavior(StripeObject):
"""
For a point-in-time operation, this attribute lets you set or update whether the subscription's billing cycle anchor is reset at the `starts_at` timestamp.
"""
+ cancel_subscription_schedule: Optional[CancelSubscriptionSchedule]
+ """
+ A point-in-time operation that cancels an existing subscription schedule at the line's starts_at timestamp. Currently only compatible with `quote_acceptance_date` for `starts_at`. When using cancel_subscription_schedule, the subscription schedule on the quote remains unalterable, except for modifications to the metadata, collection_method or invoice_settings.
+ """
ends_at: Optional[EndsAt]
"""
Details to identify the end of the time range modified by the proposed change. If not supplied, the quote line is considered a point-in-time operation that only affects the exact timestamp at `starts_at`, and a restricted set of attributes is supported on the quote line.
@@ -496,6 +514,7 @@ class EndBehavior(StripeObject):
_inner_class_types = {
"actions": Action,
"applies_to": AppliesTo,
+ "cancel_subscription_schedule": CancelSubscriptionSchedule,
"ends_at": EndsAt,
"set_pause_collection": SetPauseCollection,
"starts_at": StartsAt,
diff --git a/stripe/_quote_preview_invoice.py b/stripe/_quote_preview_invoice.py
index f3fffba2c..31d0bdb18 100644
--- a/stripe/_quote_preview_invoice.py
+++ b/stripe/_quote_preview_invoice.py
@@ -759,6 +759,7 @@ class FinancialConnections(StripeObject):
"ach_credit_transfer",
"ach_debit",
"acss_debit",
+ "amazon_pay",
"au_becs_debit",
"bacs_debit",
"bancontact",
@@ -777,6 +778,7 @@ class FinancialConnections(StripeObject):
"paynow",
"paypal",
"promptpay",
+ "revolut_pay",
"sepa_credit_transfer",
"sepa_debit",
"sofort",
diff --git a/stripe/_quote_service.py b/stripe/_quote_service.py
index aceedb654..069edb93e 100644
--- a/stripe/_quote_service.py
+++ b/stripe/_quote_service.py
@@ -271,6 +271,12 @@ class CreateParamsLine(TypedDict):
"""
For a point-in-time operation, this attribute lets you set or update whether the subscription's billing cycle anchor is reset at the `starts_at` timestamp.
"""
+ cancel_subscription_schedule: NotRequired[
+ "QuoteService.CreateParamsLineCancelSubscriptionSchedule"
+ ]
+ """
+ A point-in-time operation that cancels an existing subscription schedule at the line's starts_at timestamp. Currently only compatible with `quote_acceptance_date` for `starts_at`. When using cancel_subscription_schedule, the subscription schedule on the quote remains unalterable, except for modifications to the metadata, collection_method or invoice_settings.
+ """
ends_at: NotRequired["QuoteService.CreateParamsLineEndsAt"]
"""
Details to identify the end of the time range modified by the proposed change. If not supplied, the quote line is considered a point-in-time operation that only affects the exact timestamp at `starts_at`, and a restricted set of attributes is supported on the quote line.
@@ -614,6 +620,20 @@ class CreateParamsLineAppliesTo(TypedDict):
Describes whether the quote line is affecting a new schedule or an existing schedule.
"""
+ class CreateParamsLineCancelSubscriptionSchedule(TypedDict):
+ cancel_at: Literal["line_starts_at"]
+ """
+ Timestamp helper to cancel the underlying schedule on the accompanying line's start date. Must be set to `line_starts_at`.
+ """
+ invoice_now: NotRequired[bool]
+ """
+ If the subscription schedule is `active`, indicates if a final invoice will be generated that contains any un-invoiced metered usage and new/pending proration invoice items. Boolean that defaults to `true`.
+ """
+ prorate: NotRequired[bool]
+ """
+ If the subscription schedule is `active`, indicates if the cancellation should be prorated. Boolean that defaults to `true`.
+ """
+
class CreateParamsLineEndsAt(TypedDict):
discount_end: NotRequired[
"QuoteService.CreateParamsLineEndsAtDiscountEnd"
@@ -1713,6 +1733,12 @@ class UpdateParamsLine(TypedDict):
"""
For a point-in-time operation, this attribute lets you set or update whether the subscription's billing cycle anchor is reset at the `starts_at` timestamp.
"""
+ cancel_subscription_schedule: NotRequired[
+ "QuoteService.UpdateParamsLineCancelSubscriptionSchedule"
+ ]
+ """
+ A point-in-time operation that cancels an existing subscription schedule at the line's starts_at timestamp. Currently only compatible with `quote_acceptance_date` for `starts_at`. When using cancel_subscription_schedule, the subscription schedule on the quote remains unalterable, except for modifications to the metadata, collection_method or invoice_settings.
+ """
ends_at: NotRequired["QuoteService.UpdateParamsLineEndsAt"]
"""
Details to identify the end of the time range modified by the proposed change. If not supplied, the quote line is considered a point-in-time operation that only affects the exact timestamp at `starts_at`, and a restricted set of attributes is supported on the quote line.
@@ -2060,6 +2086,20 @@ class UpdateParamsLineAppliesTo(TypedDict):
Describes whether the quote line is affecting a new schedule or an existing schedule.
"""
+ class UpdateParamsLineCancelSubscriptionSchedule(TypedDict):
+ cancel_at: Literal["line_starts_at"]
+ """
+ Timestamp helper to cancel the underlying schedule on the accompanying line's start date. Must be set to `line_starts_at`.
+ """
+ invoice_now: NotRequired[bool]
+ """
+ If the subscription schedule is `active`, indicates if a final invoice will be generated that contains any un-invoiced metered usage and new/pending proration invoice items. Boolean that defaults to `true`.
+ """
+ prorate: NotRequired[bool]
+ """
+ If the subscription schedule is `active`, indicates if the cancellation should be prorated. Boolean that defaults to `true`.
+ """
+
class UpdateParamsLineEndsAt(TypedDict):
discount_end: NotRequired[
"QuoteService.UpdateParamsLineEndsAtDiscountEnd"
diff --git a/stripe/_setup_attempt.py b/stripe/_setup_attempt.py
index 8517f3712..15c4dbb86 100644
--- a/stripe/_setup_attempt.py
+++ b/stripe/_setup_attempt.py
@@ -41,6 +41,9 @@ class PaymentMethodDetails(StripeObject):
class AcssDebit(StripeObject):
pass
+ class AmazonPay(StripeObject):
+ pass
+
class AuBecsDebit(StripeObject):
pass
@@ -334,6 +337,9 @@ class Paypal(StripeObject):
class Payto(StripeObject):
pass
+ class RevolutPay(StripeObject):
+ pass
+
class SepaDebit(StripeObject):
pass
@@ -377,6 +383,7 @@ class UsBankAccount(StripeObject):
pass
acss_debit: Optional[AcssDebit]
+ amazon_pay: Optional[AmazonPay]
au_becs_debit: Optional[AuBecsDebit]
bacs_debit: Optional[BacsDebit]
bancontact: Optional[Bancontact]
@@ -389,6 +396,7 @@ class UsBankAccount(StripeObject):
link: Optional[Link]
paypal: Optional[Paypal]
payto: Optional[Payto]
+ revolut_pay: Optional[RevolutPay]
sepa_debit: Optional[SepaDebit]
sofort: Optional[Sofort]
type: str
@@ -398,6 +406,7 @@ class UsBankAccount(StripeObject):
us_bank_account: Optional[UsBankAccount]
_inner_class_types = {
"acss_debit": AcssDebit,
+ "amazon_pay": AmazonPay,
"au_becs_debit": AuBecsDebit,
"bacs_debit": BacsDebit,
"bancontact": Bancontact,
@@ -410,6 +419,7 @@ class UsBankAccount(StripeObject):
"link": Link,
"paypal": Paypal,
"payto": Payto,
+ "revolut_pay": RevolutPay,
"sepa_debit": SepaDebit,
"sofort": Sofort,
"us_bank_account": UsBankAccount,
diff --git a/stripe/_subscription.py b/stripe/_subscription.py
index c67984b04..17d985663 100644
--- a/stripe/_subscription.py
+++ b/stripe/_subscription.py
@@ -336,6 +336,7 @@ class FinancialConnections(StripeObject):
"ach_credit_transfer",
"ach_debit",
"acss_debit",
+ "amazon_pay",
"au_becs_debit",
"bacs_debit",
"bancontact",
@@ -354,6 +355,7 @@ class FinancialConnections(StripeObject):
"paynow",
"paypal",
"promptpay",
+ "revolut_pay",
"sepa_credit_transfer",
"sepa_debit",
"sofort",
@@ -1031,7 +1033,7 @@ class CreateParamsPaymentSettings(TypedDict):
Payment-method-specific configuration to provide to invoices created by the subscription.
"""
payment_method_types: NotRequired[
- "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'konbini', 'link', 'p24', 'paynow', 'paypal', 'promptpay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'us_bank_account', 'wechat_pay']]"
+ "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'konbini', 'link', 'p24', 'paynow', 'paypal', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'us_bank_account', 'wechat_pay']]"
]
"""
The list of payment method types (e.g. card) to provide to the invoice's PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice's default payment method, the subscription's default payment method, the customer's default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice).
@@ -1961,7 +1963,7 @@ class ModifyParamsPaymentSettings(TypedDict):
Payment-method-specific configuration to provide to invoices created by the subscription.
"""
payment_method_types: NotRequired[
- "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'konbini', 'link', 'p24', 'paynow', 'paypal', 'promptpay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'us_bank_account', 'wechat_pay']]"
+ "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'konbini', 'link', 'p24', 'paynow', 'paypal', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'us_bank_account', 'wechat_pay']]"
]
"""
The list of payment method types (e.g. card) to provide to the invoice's PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice's default payment method, the subscription's default payment method, the customer's default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice).
diff --git a/stripe/_subscription_service.py b/stripe/_subscription_service.py
index a5c4a826a..750ed2fa2 100644
--- a/stripe/_subscription_service.py
+++ b/stripe/_subscription_service.py
@@ -601,7 +601,7 @@ class CreateParamsPaymentSettings(TypedDict):
Payment-method-specific configuration to provide to invoices created by the subscription.
"""
payment_method_types: NotRequired[
- "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'konbini', 'link', 'p24', 'paynow', 'paypal', 'promptpay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'us_bank_account', 'wechat_pay']]"
+ "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'konbini', 'link', 'p24', 'paynow', 'paypal', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'us_bank_account', 'wechat_pay']]"
]
"""
The list of payment method types (e.g. card) to provide to the invoice's PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice's default payment method, the subscription's default payment method, the customer's default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice).
@@ -1585,7 +1585,7 @@ class UpdateParamsPaymentSettings(TypedDict):
Payment-method-specific configuration to provide to invoices created by the subscription.
"""
payment_method_types: NotRequired[
- "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'konbini', 'link', 'p24', 'paynow', 'paypal', 'promptpay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'us_bank_account', 'wechat_pay']]"
+ "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'konbini', 'link', 'p24', 'paynow', 'paypal', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'us_bank_account', 'wechat_pay']]"
]
"""
The list of payment method types (e.g. card) to provide to the invoice's PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice's default payment method, the subscription's default payment method, the customer's default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice).
diff --git a/stripe/_token.py b/stripe/_token.py
index 030021238..8da78239c 100644
--- a/stripe/_token.py
+++ b/stripe/_token.py
@@ -35,7 +35,7 @@ class Token(CreateableAPIResource["Token"]):
You can't store or use tokens more than once. To store card or bank account
information for later use, create [Customer](https://stripe.com/docs/api#customers)
- objects or [Custom accounts](https://stripe.com/docs/api#external_accounts).
+ objects or [External accounts](https://stripe.com/api#external_accounts).
[Radar](https://stripe.com/docs/radar), our integrated solution for automatic fraud protection,
performs best with integrations that use client-side tokenization.
"""
@@ -1068,11 +1068,12 @@ class RetrieveParams(RequestOptions):
"""
These bank accounts are payment methods on `Customer` objects.
- On the other hand [External Accounts](https://stripe.com/docs/api#external_accounts) are transfer
- destinations on `Account` objects for [Custom accounts](https://stripe.com/docs/connect/custom-accounts).
+ On the other hand [External Accounts](https://stripe.com/api#external_accounts) are transfer
+ destinations on `Account` objects for accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection)
+ is `application`, which includes [Custom accounts](https://stripe.com/connect/custom-accounts).
They can be bank accounts or debit cards as well, and are documented in the links above.
- Related guide: [Bank debits and transfers](https://stripe.com/docs/payments/bank-debits-transfers)
+ Related guide: [Bank debits and transfers](https://stripe.com/payments/bank-debits-transfers)
"""
card: Optional["Card"]
"""
@@ -1115,7 +1116,7 @@ class RetrieveParams(RequestOptions):
def create(cls, **params: Unpack["Token.CreateParams"]) -> "Token":
"""
Creates a single-use token that represents a bank account's details.
- You can use this token with any API method in place of a bank account dictionary. You can only use this token once. To do so, attach it to a [Custom account](https://stripe.com/docs/api#accounts).
+ You can use this token with any API method in place of a bank account dictionary. You can only use this token once. To do so, attach it to a [connected account](https://stripe.com/docs/api#accounts) where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is application, which includes Custom accounts.
"""
return cast(
"Token",
@@ -1132,7 +1133,7 @@ async def create_async(
) -> "Token":
"""
Creates a single-use token that represents a bank account's details.
- You can use this token with any API method in place of a bank account dictionary. You can only use this token once. To do so, attach it to a [Custom account](https://stripe.com/docs/api#accounts).
+ You can use this token with any API method in place of a bank account dictionary. You can only use this token once. To do so, attach it to a [connected account](https://stripe.com/docs/api#accounts) where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is application, which includes Custom accounts.
"""
return cast(
"Token",
diff --git a/stripe/_token_service.py b/stripe/_token_service.py
index 2348e62af..445eeb773 100644
--- a/stripe/_token_service.py
+++ b/stripe/_token_service.py
@@ -1094,7 +1094,7 @@ def create(
) -> Token:
"""
Creates a single-use token that represents a bank account's details.
- You can use this token with any API method in place of a bank account dictionary. You can only use this token once. To do so, attach it to a [Custom account](https://stripe.com/docs/api#accounts).
+ You can use this token with any API method in place of a bank account dictionary. You can only use this token once. To do so, attach it to a [connected account](https://stripe.com/docs/api#accounts) where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is application, which includes Custom accounts.
"""
return cast(
Token,
@@ -1115,7 +1115,7 @@ async def create_async(
) -> Token:
"""
Creates a single-use token that represents a bank account's details.
- You can use this token with any API method in place of a bank account dictionary. You can only use this token once. To do so, attach it to a [Custom account](https://stripe.com/docs/api#accounts).
+ You can use this token with any API method in place of a bank account dictionary. You can only use this token once. To do so, attach it to a [connected account](https://stripe.com/docs/api#accounts) where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is application, which includes Custom accounts.
"""
return cast(
Token,
diff --git a/stripe/_webhook_endpoint.py b/stripe/_webhook_endpoint.py
index 86d3f4a57..d5c906baa 100644
--- a/stripe/_webhook_endpoint.py
+++ b/stripe/_webhook_endpoint.py
@@ -18,13 +18,13 @@ class WebhookEndpoint(
UpdateableAPIResource["WebhookEndpoint"],
):
"""
- You can configure [webhook endpoints](https://stripe.com/docs/webhooks/) via the API to be
+ You can configure [webhook endpoints](https://docs.stripe.com/webhooks/) via the API to be
notified about events that happen in your Stripe account or connected
accounts.
Most users configure webhooks from [the dashboard](https://dashboard.stripe.com/webhooks), which provides a user interface for registering and testing your webhook endpoints.
- Related guide: [Setting up webhooks](https://stripe.com/docs/webhooks/configure)
+ Related guide: [Setting up webhooks](https://docs.stripe.com/webhooks/configure)
"""
OBJECT_NAME: ClassVar[Literal["webhook_endpoint"]] = "webhook_endpoint"
@@ -776,7 +776,7 @@ class RetrieveParams(RequestOptions):
"""
secret: Optional[str]
"""
- The endpoint's secret, used to generate [webhook signatures](https://stripe.com/docs/webhooks/signatures). Only returned at creation.
+ The endpoint's secret, used to generate [webhook signatures](https://docs.stripe.com/webhooks/signatures). Only returned at creation.
"""
status: str
"""
diff --git a/stripe/checkout/_session.py b/stripe/checkout/_session.py
index 6870ec943..0f9174513 100644
--- a/stripe/checkout/_session.py
+++ b/stripe/checkout/_session.py
@@ -590,7 +590,14 @@ class Alipay(StripeObject):
"""
class AmazonPay(StripeObject):
- pass
+ setup_future_usage: Optional[Literal["none", "off_session"]]
+ """
+ Indicates that you intend to make future payments with this PaymentIntent's payment method.
+
+ Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
+
+ When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
+ """
class AuBecsDebit(StripeObject):
setup_future_usage: Optional[Literal["none"]]
@@ -901,7 +908,14 @@ class Pix(StripeObject):
"""
class RevolutPay(StripeObject):
- pass
+ setup_future_usage: Optional[Literal["none", "off_session"]]
+ """
+ Indicates that you intend to make future payments with this PaymentIntent's payment method.
+
+ Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
+
+ When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
+ """
class SepaDebit(StripeObject):
setup_future_usage: Optional[
diff --git a/stripe/entitlements/_active_entitlement.py b/stripe/entitlements/_active_entitlement.py
index 82298a396..7fa4f76f8 100644
--- a/stripe/entitlements/_active_entitlement.py
+++ b/stripe/entitlements/_active_entitlement.py
@@ -1,10 +1,14 @@
# -*- coding: utf-8 -*-
# File generated from our OpenAPI spec
+from stripe._expandable_field import ExpandableField
from stripe._list_object import ListObject
from stripe._listable_api_resource import ListableAPIResource
from stripe._request_options import RequestOptions
from typing import ClassVar, List
-from typing_extensions import Literal, NotRequired, Unpack
+from typing_extensions import Literal, NotRequired, Unpack, TYPE_CHECKING
+
+if TYPE_CHECKING:
+ from stripe.entitlements._feature import Feature
class ActiveEntitlement(ListableAPIResource["ActiveEntitlement"]):
@@ -44,9 +48,9 @@ class RetrieveParams(RequestOptions):
Specifies which fields in the response should be expanded.
"""
- feature: str
+ feature: ExpandableField["Feature"]
"""
- The feature that the customer is entitled to.
+ The [Feature](https://stripe.com/docs/api/entitlements/feature) that the customer is entitled to.
"""
id: str
"""
diff --git a/stripe/identity/_verification_session.py b/stripe/identity/_verification_session.py
index 85e8fca6a..333126995 100644
--- a/stripe/identity/_verification_session.py
+++ b/stripe/identity/_verification_session.py
@@ -249,11 +249,11 @@ class CreateParams(RequestOptions):
"""
type: NotRequired[Literal["document", "id_number"]]
"""
- The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed.
+ The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed. You must provide a `type` if not passing `verification_flow`.
"""
verification_flow: NotRequired[str]
"""
- The ID of a Verification Flow from the Dashboard.
+ The ID of a Verification Flow from the Dashboard. See https://docs.stripe.com/identity/verification-flows.
"""
class CreateParamsOptions(TypedDict):
@@ -263,18 +263,6 @@ class CreateParamsOptions(TypedDict):
"""
Options that apply to the [document check](https://stripe.com/docs/identity/verification-checks?type=document).
"""
- email: NotRequired[
- "Literal['']|VerificationSession.CreateParamsOptionsEmail"
- ]
- """
- Options that apply to the email check.
- """
- phone: NotRequired[
- "Literal['']|VerificationSession.CreateParamsOptionsPhone"
- ]
- """
- Options that apply to the phone check.
- """
class CreateParamsOptionsDocument(TypedDict):
allowed_types: NotRequired[
@@ -296,18 +284,6 @@ class CreateParamsOptionsDocument(TypedDict):
Capture a face image and perform a [selfie check](https://stripe.com/docs/identity/verification-checks?type=selfie) comparing a photo ID and a picture of your user's face. [Learn more](https://stripe.com/docs/identity/selfie).
"""
- class CreateParamsOptionsEmail(TypedDict):
- require_verification: NotRequired[bool]
- """
- Request one time password verification of `provided_details.email`.
- """
-
- class CreateParamsOptionsPhone(TypedDict):
- require_verification: NotRequired[bool]
- """
- Request one time password verification of `provided_details.phone`.
- """
-
class CreateParamsProvidedDetails(TypedDict):
email: NotRequired[str]
"""
@@ -399,18 +375,6 @@ class ModifyParamsOptions(TypedDict):
"""
Options that apply to the [document check](https://stripe.com/docs/identity/verification-checks?type=document).
"""
- email: NotRequired[
- "Literal['']|VerificationSession.ModifyParamsOptionsEmail"
- ]
- """
- Options that apply to the email check.
- """
- phone: NotRequired[
- "Literal['']|VerificationSession.ModifyParamsOptionsPhone"
- ]
- """
- Options that apply to the phone check.
- """
class ModifyParamsOptionsDocument(TypedDict):
allowed_types: NotRequired[
@@ -432,18 +396,6 @@ class ModifyParamsOptionsDocument(TypedDict):
Capture a face image and perform a [selfie check](https://stripe.com/docs/identity/verification-checks?type=selfie) comparing a photo ID and a picture of your user's face. [Learn more](https://stripe.com/docs/identity/selfie).
"""
- class ModifyParamsOptionsEmail(TypedDict):
- require_verification: NotRequired[bool]
- """
- Request one time password verification of `provided_details.email`.
- """
-
- class ModifyParamsOptionsPhone(TypedDict):
- require_verification: NotRequired[bool]
- """
- Request one time password verification of `provided_details.phone`.
- """
-
class ModifyParamsProvidedDetails(TypedDict):
email: NotRequired[str]
"""
diff --git a/stripe/identity/_verification_session_service.py b/stripe/identity/_verification_session_service.py
index 81e30c25c..f615b461e 100644
--- a/stripe/identity/_verification_session_service.py
+++ b/stripe/identity/_verification_session_service.py
@@ -45,11 +45,11 @@ class CreateParams(TypedDict):
"""
type: NotRequired[Literal["document", "id_number"]]
"""
- The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed.
+ The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed. You must provide a `type` if not passing `verification_flow`.
"""
verification_flow: NotRequired[str]
"""
- The ID of a Verification Flow from the Dashboard.
+ The ID of a Verification Flow from the Dashboard. See https://docs.stripe.com/identity/verification-flows.
"""
class CreateParamsOptions(TypedDict):
@@ -59,18 +59,6 @@ class CreateParamsOptions(TypedDict):
"""
Options that apply to the [document check](https://stripe.com/docs/identity/verification-checks?type=document).
"""
- email: NotRequired[
- "Literal['']|VerificationSessionService.CreateParamsOptionsEmail"
- ]
- """
- Options that apply to the email check.
- """
- phone: NotRequired[
- "Literal['']|VerificationSessionService.CreateParamsOptionsPhone"
- ]
- """
- Options that apply to the phone check.
- """
class CreateParamsOptionsDocument(TypedDict):
allowed_types: NotRequired[
@@ -92,18 +80,6 @@ class CreateParamsOptionsDocument(TypedDict):
Capture a face image and perform a [selfie check](https://stripe.com/docs/identity/verification-checks?type=selfie) comparing a photo ID and a picture of your user's face. [Learn more](https://stripe.com/docs/identity/selfie).
"""
- class CreateParamsOptionsEmail(TypedDict):
- require_verification: NotRequired[bool]
- """
- Request one time password verification of `provided_details.email`.
- """
-
- class CreateParamsOptionsPhone(TypedDict):
- require_verification: NotRequired[bool]
- """
- Request one time password verification of `provided_details.phone`.
- """
-
class CreateParamsProvidedDetails(TypedDict):
email: NotRequired[str]
"""
@@ -209,18 +185,6 @@ class UpdateParamsOptions(TypedDict):
"""
Options that apply to the [document check](https://stripe.com/docs/identity/verification-checks?type=document).
"""
- email: NotRequired[
- "Literal['']|VerificationSessionService.UpdateParamsOptionsEmail"
- ]
- """
- Options that apply to the email check.
- """
- phone: NotRequired[
- "Literal['']|VerificationSessionService.UpdateParamsOptionsPhone"
- ]
- """
- Options that apply to the phone check.
- """
class UpdateParamsOptionsDocument(TypedDict):
allowed_types: NotRequired[
@@ -242,18 +206,6 @@ class UpdateParamsOptionsDocument(TypedDict):
Capture a face image and perform a [selfie check](https://stripe.com/docs/identity/verification-checks?type=selfie) comparing a photo ID and a picture of your user's face. [Learn more](https://stripe.com/docs/identity/selfie).
"""
- class UpdateParamsOptionsEmail(TypedDict):
- require_verification: NotRequired[bool]
- """
- Request one time password verification of `provided_details.email`.
- """
-
- class UpdateParamsOptionsPhone(TypedDict):
- require_verification: NotRequired[bool]
- """
- Request one time password verification of `provided_details.phone`.
- """
-
class UpdateParamsProvidedDetails(TypedDict):
email: NotRequired[str]
"""
diff --git a/test-requirements.txt b/test-requirements.txt
index 843756dad..f2e9a43ba 100644
--- a/test-requirements.txt
+++ b/test-requirements.txt
@@ -5,7 +5,7 @@ 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.9.2; python_version > "3.7"
+aiohttp == 3.9.4; python_version > "3.7"
anyio[trio] == 3.6.2
pytest-cov >= 2.8.1, < 2.11.0