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 a813c1bf7..431dfc556 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" @@ -565,7 +570,7 @@ class Fees(StripeObject): "application_express", ] """ - 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): @@ -1029,7 +1034,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] @@ -1196,15 +1201,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"] """ @@ -1224,7 +1236,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]] """ @@ -1234,13 +1246,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]"] """ @@ -1252,7 +1264,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"]] """ @@ -2114,7 +2126,7 @@ class CreateParamsController(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): @@ -3722,7 +3734,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] @@ -3745,7 +3757,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] """ @@ -3764,10 +3776,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]] """ @@ -3789,7 +3800,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]] """ @@ -3841,9 +3852,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. """ @@ -3863,9 +3876,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. """ @@ -3874,9 +3889,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. """ @@ -3887,9 +3904,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. """ @@ -3904,9 +3923,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. """ @@ -3926,9 +3947,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. """ @@ -3939,9 +3962,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. """ @@ -3952,9 +3977,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. """ @@ -4121,9 +4148,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", @@ -4142,18 +4169,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. """ ... @@ -4162,9 +4189,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", @@ -4182,9 +4209,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", @@ -4203,9 +4230,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. """ ... @@ -4214,9 +4241,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. """ ... @@ -4225,9 +4252,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", @@ -4504,9 +4531,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"], @@ -4527,9 +4559,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"], @@ -4629,9 +4666,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", @@ -4649,9 +4686,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 bb2b92c09..2c483cf5c 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]"] """ @@ -94,7 +101,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"]] """ @@ -966,7 +973,7 @@ class CreateParamsController(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): @@ -1645,15 +1652,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] """ @@ -1665,7 +1679,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]] """ @@ -1675,13 +1689,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]"] """ @@ -1693,7 +1707,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): @@ -3139,9 +3153,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. """ @@ -3164,9 +3180,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. """ @@ -3231,12 +3249,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. @@ -3260,12 +3282,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. @@ -3419,9 +3445,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, @@ -3444,9 +3470,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/_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 42a2e924f..10e6c25f6 100644 --- a/stripe/_confirmation_token.py +++ b/stripe/_confirmation_token.py @@ -1861,7 +1861,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 ea1575245..53297eb5e 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. @@ -391,7 +391,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", @@ -412,7 +412,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 ff6018a11..b8ddbecb1 100644 --- a/stripe/_invoice.py +++ b/stripe/_invoice.py @@ -726,6 +726,7 @@ class FinancialConnections(StripeObject): "ach_credit_transfer", "ach_debit", "acss_debit", + "amazon_pay", "au_becs_debit", "bacs_debit", "bancontact", @@ -744,6 +745,7 @@ class FinancialConnections(StripeObject): "paynow", "paypal", "promptpay", + "revolut_pay", "sepa_credit_transfer", "sepa_debit", "sofort", @@ -1197,7 +1199,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). @@ -2842,7 +2844,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). @@ -6628,7 +6630,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", @@ -6648,7 +6650,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 54e82ebfe..837e0b337 100644 --- a/stripe/_invoice_line_item.py +++ b/stripe/_invoice_line_item.py @@ -129,7 +129,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"] """ @@ -345,7 +345,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 98ce93306..5c0733d1c 100644 --- a/stripe/_invoice_line_item_service.py +++ b/stripe/_invoice_line_item_service.py @@ -53,7 +53,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 4f076c612..059dc0fc6 100644 --- a/stripe/_invoice_service.py +++ b/stripe/_invoice_service.py @@ -234,7 +234,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). @@ -3071,7 +3071,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). @@ -3742,7 +3742,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, @@ -3766,7 +3766,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 84e56fb05..e93bf7b68 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 """ @@ -119,6 +122,9 @@ class Paypal(StripeObject): PayPal account PayerID. This identifier uniquely identifies the PayPal customer. """ + class RevolutPay(StripeObject): + pass + class SepaDebit(StripeObject): reference: str """ @@ -136,12 +142,14 @@ class UsBankAccount(StripeObject): """ acss_debit: Optional[AcssDebit] + amazon_pay: Optional[AmazonPay] au_becs_debit: Optional[AuBecsDebit] bacs_debit: Optional[BacsDebit] card: Optional[Card] cashapp: Optional[Cashapp] link: Optional[Link] paypal: Optional[Paypal] + revolut_pay: Optional[RevolutPay] sepa_debit: Optional[SepaDebit] type: str """ @@ -150,12 +158,14 @@ 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, "cashapp": Cashapp, "link": Link, "paypal": Paypal, + "revolut_pay": RevolutPay, "sepa_debit": SepaDebit, "us_bank_account": UsBankAccount, } diff --git a/stripe/_payment_intent.py b/stripe/_payment_intent.py index 7f3731fbc..ddb8229c1 100644 --- a/stripe/_payment_intent.py +++ b/stripe/_payment_intent.py @@ -1031,6 +1031,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[ @@ -1568,6 +1576,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 3101ac39d..7670d57dc 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 Oxxo(StripeObject): class DisplayPreference(StripeObject): overridable: Optional[bool] @@ -982,6 +1004,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. + """ name: NotRequired[str] """ Configuration name. @@ -1413,6 +1441,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 CreateParamsOxxo(TypedDict): display_preference: NotRequired[ "PaymentMethodConfiguration.CreateParamsOxxoDisplayPreference" @@ -1586,10 +1628,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[ @@ -1726,6 +1780,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. + """ name: NotRequired[str] """ Configuration name. @@ -2153,6 +2213,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 ModifyParamsOxxo(TypedDict): display_preference: NotRequired[ "PaymentMethodConfiguration.ModifyParamsOxxoDisplayPreference" @@ -2372,6 +2446,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] name: str """ The configuration's name. @@ -2561,6 +2636,7 @@ async def retrieve_async( "klarna": Klarna, "konbini": Konbini, "link": Link, + "mobilepay": Mobilepay, "oxxo": Oxxo, "p24": P24, "paynow": Paynow, diff --git a/stripe/_payment_method_configuration_service.py b/stripe/_payment_method_configuration_service.py index 31de308a0..49b1ce3f7 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. + """ name: NotRequired[str] """ Configuration name. @@ -598,6 +604,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 CreateParamsOxxo(TypedDict): display_preference: NotRequired[ "PaymentMethodConfigurationService.CreateParamsOxxoDisplayPreference" @@ -771,10 +791,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]] @@ -935,6 +967,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. + """ name: NotRequired[str] """ Configuration name. @@ -1370,6 +1408,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 UpdateParamsOxxo(TypedDict): display_preference: NotRequired[ "PaymentMethodConfigurationService.UpdateParamsOxxoDisplayPreference" 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 955c35396..4539ee5d8 100644 --- a/stripe/_price.py +++ b/stripe/_price.py @@ -262,7 +262,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 ce990af5f..f43af4019 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 03303e9d7..52acddacf 100644 --- a/stripe/_product.py +++ b/stripe/_product.py @@ -85,7 +85,7 @@ class PackageDimensions(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/_setup_attempt.py b/stripe/_setup_attempt.py index 8e5f78172..7a36f1d9f 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 @@ -331,6 +334,9 @@ class Link(StripeObject): class Paypal(StripeObject): pass + class RevolutPay(StripeObject): + pass + class SepaDebit(StripeObject): pass @@ -374,6 +380,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] @@ -385,6 +392,7 @@ class UsBankAccount(StripeObject): klarna: Optional[Klarna] link: Optional[Link] paypal: Optional[Paypal] + revolut_pay: Optional[RevolutPay] sepa_debit: Optional[SepaDebit] sofort: Optional[Sofort] type: str @@ -394,6 +402,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, @@ -405,6 +414,7 @@ class UsBankAccount(StripeObject): "klarna": Klarna, "link": Link, "paypal": Paypal, + "revolut_pay": RevolutPay, "sepa_debit": SepaDebit, "sofort": Sofort, "us_bank_account": UsBankAccount, diff --git a/stripe/_subscription.py b/stripe/_subscription.py index 933fa2450..f2ec1273e 100644 --- a/stripe/_subscription.py +++ b/stripe/_subscription.py @@ -329,6 +329,7 @@ class FinancialConnections(StripeObject): "ach_credit_transfer", "ach_debit", "acss_debit", + "amazon_pay", "au_becs_debit", "bacs_debit", "bancontact", @@ -347,6 +348,7 @@ class FinancialConnections(StripeObject): "paynow", "paypal", "promptpay", + "revolut_pay", "sepa_credit_transfer", "sepa_debit", "sofort", @@ -888,7 +890,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). @@ -1701,7 +1703,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 a2b7c45bf..d36ad3315 100644 --- a/stripe/_subscription_service.py +++ b/stripe/_subscription_service.py @@ -487,7 +487,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). @@ -1354,7 +1354,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 c242f485e..59d21d78f 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" @@ -718,7 +718,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 f4a958c37..0c4afc0b3 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"]] @@ -897,7 +904,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] """