#mtanzi-portal-configs
1 messages ยท Page 1 of 1 (latest)
Hi!
I can provide the json that I am passing to the method
I am trying to create the configuration via console
Stripe::BillingPortal::Configuration.create({
business_profile: {
privacy_policy_url: 'https://test.com/privacy',
terms_of_service_url: 'https://test.com/terms',
},
features: {
subscription_update: {
default_allowed_updates: ['price'],
enabled: true,
products: {
prices: [ 'price_1', 'price_2' ],
},
proration_behavior: 'always_invoice'
}
},
})
I followed those API docs : https://stripe.com/docs/api/customer_portal/configurations/create
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Ah okay
Yeah so you need products.prices and products.product. And that should be an array of objects
prices:'price_1',
product: 'prod_abc'
},
{ prices: 'price_2',
product: 'prod_abc'
}]```
ah!
it's not very clear from the API doc ๐ - maybe it can be added to the example
Thanks!
Sure!
@candid wagon with this configuration now I am getting the following error:
Stripe::InvalidRequestError: Cannot enable subscription updates while disabling payment method update.
Do you know what is it about?
Hmmm I wasn't familiar with that requirement but it is likely due to the fact that updates can generate invoices which then would require payment and potentially updating payment methods.
I can look into it further in a sec
I see, I have them enabled by default through the stripe dashboard, should I define them also here?
Oh my, totally missed that you weren't even passing it as disabled here
Hmm if enabled in the Dashboard then this should definitely just work
Try passing it here as well
But also if you can send me a request ID I can check if this is a bug
I have to head off for half hour, if you leave the thread open Iโll find the req Iโd for you ๐๐ป
๐
Hey @candid wagon I am back, here is the req_id: req_6f11MPedmeX6ct
๐
Yeah this feels like a bug to me
Can you test setting the payment_method_update: enbaled on the config creation?
Want to know if that works as a workaround in the meantime. But I'll file internally to get this fixed as you shouldn't need to pass that as it is on in your default settings
passing that parameter I am getting this error:
Stripe::InvalidRequestError: Received unknown parameter: features[subscription_update][payment_method_update]
look like is not a valid parameter
Shouldn't be under subscription_update
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
It is its own object within features
ah right, my bad ๐คฆโโ๏ธ
now I get invalid_request_error, here is the request req_6f11MPedmeX6ct
That didn't pass payment_method_update
That's the same as before as far as I can tell
wait.. I thinbk is the following:
payment_method_update: {
enabled: true,
},
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
worked!