#rob-portal-products
1 messages · Page 1 of 1 (latest)
Hello rob1986, we'll be with you shortly! Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
• rob1986, 2 hours ago, 18 messages
• rob1986, 5 hours ago, 4 messages
• rob1986, 6 hours ago, 11 messages
• rob1986, 3 days ago, 8 messages
this is my code
$stripeConfig = $stripe->billingPortal->configurations->create([
'features' => [
'customer_update' => [
'enabled' => true,
],
'invoice_history' => [
'enabled' => true
],
'subscription_cancel' => [
'enabled' => true,
'mode' => 'at_period_end'
],
'subscription_update' => [
'enabled' => true,
'default_allowed_updates' => [],
'products' => [
'prices' => ['price_1M6clz2irv3PMEuHzSwwQv6s'],
'product' => ['prod_MqJOhGeeFuyMOU']
],
],
'payment_method_update' => [
'enabled' => true,
]
],
'business_profile' => [
'privacy_policy_url' => 'https://example.com/',
'terms_of_service_url' => 'https://example.com/',
],
]);
i keep getting this error
invalid_request_error - features[subscription_update][products]
products is an array or arrays
so its needs to be
'products' => [[
'prices' => ['price_1M6clz2irv3PMEuHzSwwQv6s'],
'product' => ['prod_MqJOhGeeFuyMOU']
] ],
the error has now moved onto ....
Missing required param: features[subscription_update][default_allowed_updates].
cool so now pass that
i dont want to allow users to change any of price, quantity and promotion_code so i passed in an empty array
i assume that is incorrect?
Correct that is incorrect. If you don't want them to change anything you should disable that feature entirely no?
i want them to change plan but not quantity etc