#Giriraj

1 messages · Page 1 of 1 (latest)

sharp summitBOT
#

Hello! 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.

  • Giriraj, 58 minutes ago, 39 messages
  • Giriraj, 20 hours ago, 66 messages
willow kite
vernal wave
willow kite
#

here i have integrate

willow kite
vernal wave
willow kite
#

checking billingPortalSession request id

#

req_gC1XdJbd9D4Rz4

vernal wave
#

This request failed because message: "This subscription cannot be updated because the subscription update feature in the portal configuration is disabled.",

willow kite
#

oh so how can i enable it?

vernal wave
willow kite
#

ok let me check

#

checking plz wait

#

will get back to you

sharp summitBOT
willow kite
#

requestId:
req_Je8JwL8NsKQUHr

#

i need to update subscription

modern sigil
#

What's the issue exactly?

modern sigil
willow kite
#

here i have passed

modern sigil
willow kite
#

this is issue

#

ok checking above link

modern sigil
#

Yep, just shared that

willow kite
#

this error is coming now

modern sigil
#

products[prices] needs to be an array: prices: ['price_xxx']

willow kite
#

ok let me try

modern sigil
#

Have you looked at the API reference for these parameters? There's a clear error in the payload you're sending to what the API expects: https://stripe.com/docs/api/customer_portal/configurations/create#create_portal_configuration-features-subscription_update-default_allowed_updates

willow kite
#

ok checking

#

right now i m passing different price id and qty but still it's return Invalid string error

modern sigil
#

That's because default_allowed_updates expects a string/enum, not an array. See the link above

willow kite
#

ok

#

checking

#

yes, that correct now. issue is resolved but now

#

but stripe.billingPortal.sessions is not creating

modern sigil
#

There must be an error returned. Please share

willow kite
#

ok sure wait

#

here is have set enable is true
subscription_update: {
default_allowed_updates: [
"price"
],
products: [{
prices: ["price_1O65pWGas8wwyOqg95am1nnj"],
product: "prod_OttcOdSa0q0GOu"
}],
enabled: true,
}

#

you can look same thing on my screenshot

modern sigil
willow kite
#

sure

#

req_AdhadOTzioyey8

modern sigil
#
#

You must have subscription updates disabled there:

willow kite
#

ok checking

#

yes, working fine but i can't able to switch plan

#

from above i m able to update qty. but i need to swich new plan

modern sigil
#

I suspect you haven't included a different prod_xxx/price_xxx ID that you want to upgrade/downgrade to in the payload

#

When you create the session you need to specify which plans you will allow them to switch to

willow kite
#

you mean product here i have set new price id

modern sigil
willow kite
#

oh

#

let me check

#

my current plan is Bussiness i need to switch to Enterprise plan

#

both plan exist in one product

frosty yacht
#

Hi! I'm taking over from my colleague. Please, give me a moment to catch up.

willow kite
#

ok

modern sigil
#

Can you share the bps_xxx ID returned by the API?

willow kite
#

yes

#

bpc_1O7F3lGas8wwyOqgEVhpxrEz

modern sigil
#

No, bps_xxx

willow kite
#

oh wait

#

bps_1O7F3lGas8wwyOqgcortJpN6

#

Are you checking?

modern sigil
#

Yes, please be patient

willow kite
#

Ok no problem

modern sigil
#

Still checking

willow kite
#

ok

modern sigil
#

Ok, it's because you've set tax_behavior: 'unspecififed' on the Price object(s)

#

The portal doesn't allow updates to prices with unspecified value

willow kite
#

ok check

#

can i set Exclusive?

modern sigil
#

Yep, either that on inclusive

sharp summitBOT
modern sigil
#

Can you just share the bps_xxx IDs please. The URLs aren't helpful

modern sigil
#

Ah, this is why:

Customers can’t define multiple Prices with the same product and recurring.interval values. For example, to offer a magazine product for either 4.00 USD per month or 3.00 USD per month for students, create a separate student magazine Product version.

#

The prices you're using are both monthly prices and have the same parent Product (prod_OttcOdSa0q0GOu). You need to model it differently, which each plan being it's own unique Product

willow kite
#

oh let me try with new product

cloud flame
#

Hey, taking over here. Let me know if there's any follow-up Qs I can answer!

willow kite
#

when i try with new product . it's return me this error

cloud flame
willow kite
#

sure

#

req_HmBCM5LB5jZtZZ

cloud flame
#

Here is the error message:

Invalid string: {:quantity=>"2", :price=>"price_1O65pWGas8wwyOqg95am1nnj"}

willow kite
#

ok got it thank

#

now it's working fine