In stripe it is mentioned that buisness_profile is required but the child parameters are option and I am still getting this error stripe.error.InvalidRequestError: Request req_Z2KfeZdvlmvT: Missing required param: business_profile. Here's the link.
response = stripe.billing_portal.Configuration.create(
business_profile={
'headline': None,
'privacy_policy_url': None,
'terms_of_service_url': None
},
features={
'customer_update': {
'allowed_updates': ['name', 'email', 'address', 'phone'],
'enabled': True
},
'invoice_history': {
'enabled': True
},
'payment_method_update': {
'enabled': True
},
'subscription_cancel': {
'cancellation_reason': {
'enabled': True,
'options': ['too_expensive', 'switched_service', 'unused', 'other']
},
'enabled': True,
'mode': 'immediately',
'proration_behavior': 'create_prorations'
},
'subscription_pause': {
'enabled': False
},
'subscription_update': {
'default_allowed_updates': [],
'enabled': False,
'proration_behavior': 'always_invoice'
}
},
login_page={
'enabled': True,
}
)
what is the possible reason for this error?
Does the error go away if you set a value for one of the child parameters? I wonder if the API reference just lists it as optional but API doesn't like it when the values are set to
None.The other thing you can check is in your Stripe logs, does the incoming request body contain
business_profilekey? If not, then that could be the issue.