#hiroshi nishio

1 messages · Page 1 of 1 (latest)

vagrant flickerBOT
wind citrus
wicked moat
#

req_jQNqsXi2YWOuWw

wind citrus
wicked moat
#

Which product id and price id should be filled in this case? Because I don't want to allow users to update product and price

#

API doc does not mention it.

wind citrus
#

The prod_xxx IDs of the Products you want your customer's to be able to update quantities for on their Subscription(s)

wicked moat
#

ah

#

Indeed...why didn't I notice it?

So what if I want to allow users to change to a different price ID for a different product ID? Do I just set it in an array? Just wanted to know a sample.

wind citrus
#

I thought you only wanted to allow quantity updates and plan switches?

wicked moat
#

Originally yes

#

But now I want to allow users to change quantity for the product A (and price a) and also change product B (and price b) from A

wind citrus
#

It'd look something like this with stripe-node I think:

subscription_update: {
  enabled: "true",
  default_allowed_updates: ['price', 'quantity'],
  proration_behavior: "create_prorations",
  products: [{
    prices: ['price_abc'],
    product: 'prod_xyz'
  }]
}
wicked moat
#

Now I understand!!!!!!!