⚡ Solution Summary
- additional_verifications is a beta feature not publicly documented.
- The stripe-python SDK only supports public API parameters.
- Type errors are expected for beta features.
- No immediate fix available until the feature is public.
### Describe the bug
`additional_verifications` isn't defined in `CreateParams`. This poses issues with typing when creating an account with `additional_verifications` like `us_w8_or_w9`, `tax_id`, or `address`:
```
return stripe.Account.create(
type="express",
country=country,
additional_verifications=_get_additional_verifications(
country, earnings_over_tax_info_threshold
),
capabilities=_get_capabilities(country),
tos_acceptance={"service_agreement": _get_service_agreement(country)},
api_key=a.model.earnings.producer.stripe.get_stripe_spaces_secret_key(),
stripe_version=stripe_api_version.get(),
)
```
### To Reproduce
1. Write the following code:
```
import stripe
api_key = "***" # loaded from env
account = stripe.Account.create(
type="express",
country='US',
additional_verifications={'tax_id': {'requested': True, 'upfront': [{'disables': 'payouts_and_payments'}]}},
api_key=api_key,
)
```
2. Run a type checker. I use `pyanalyze`.
3. You will run into a typing error claiming that `additional_verifications` is not a valid parameter.
### Expected behavior
By adding `additional_verifications` into `stripe.Account.CreateParams`, this typing error should no longer occur.
### Code snippets
_No response_
### OS
macOS
### Language version
3.9.14
### Library version
stripe-python 9.4.0
### API version
2024-04-10
### Additional context
_No response_
Discussion & Fixes